Merge 2ce42038de into 2ae67af572
This commit is contained in:
commit
60d24914c8
14 changed files with 96 additions and 77 deletions
|
|
@ -13,7 +13,8 @@ class JlogUpdater
|
|||
'1.0.2' => '1.1.0',
|
||||
'1.1.0' => '1.1.1',
|
||||
'1.1.1' => '1.1.2',
|
||||
'1.1.2' => '1.1.3'
|
||||
'1.1.2' => '1.1.3',
|
||||
'1.1.3' => '1.2.0'
|
||||
);
|
||||
|
||||
function JlogUpdater()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ class Categories {
|
|||
var $categories = array();
|
||||
var $l = array();
|
||||
|
||||
function Categories($l) {
|
||||
function __construct($l) {
|
||||
|
||||
$this->l = $l;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,16 @@
|
|||
var $_error = "";
|
||||
|
||||
//Konstruktor
|
||||
function Query($sql)
|
||||
function __construct($sql)
|
||||
{
|
||||
// Query in der Klasse speichern
|
||||
$this->_sql = trim($sql);
|
||||
$this->_result = mysql_query($this->_sql);
|
||||
global $mysql;
|
||||
// Query in der Klasse speichern
|
||||
$this->_sql = trim($sql);
|
||||
$this->_result = mysqli_query($mysql, $this->_sql);
|
||||
if(!$this->_result) {
|
||||
$this->_errno = mysql_errno();
|
||||
$this->_error = mysql_error();
|
||||
}
|
||||
$this->_errno = mysqli_errno($mysql);
|
||||
$this->_error = mysqli_error($mysql);
|
||||
}
|
||||
}
|
||||
|
||||
//Methoden
|
||||
|
|
@ -46,11 +47,12 @@
|
|||
}
|
||||
|
||||
function fetch() {
|
||||
global $mysql;
|
||||
if($this->error()) {
|
||||
echo "An Error has occurred, please check your MySQL-Query.";
|
||||
$return = null;
|
||||
}
|
||||
else $return = mysql_fetch_assoc($this->_result);
|
||||
else $return = mysqli_fetch_assoc($this->_result);
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
|
@ -58,13 +60,13 @@
|
|||
if($this->error()) {
|
||||
$return = -1;
|
||||
}
|
||||
else $return = mysql_num_rows($this->_result);
|
||||
else $return = mysqli_num_rows($this->_result);
|
||||
return $return;
|
||||
}
|
||||
|
||||
function free() {
|
||||
// Speicher freimachen
|
||||
mysql_free_result($this->_result);
|
||||
mysqli_free_result($this->_result);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ function archive() {
|
|||
// get year links
|
||||
class Year_Links {
|
||||
|
||||
function Year_Links($get, $start, $page, $l, $cat="") {
|
||||
function __construct($get, $start, $page, $l, $cat="") {
|
||||
$date = getdate();
|
||||
$this->_now = $date['year'];
|
||||
$this->_start = $start;
|
||||
|
|
@ -88,10 +88,11 @@ function strip($_data) {
|
|||
}
|
||||
// escape input for mysql
|
||||
function escape_for_mysql($_data) {
|
||||
global $mysql;
|
||||
if (is_array($_data))
|
||||
foreach($_data as $key => $val) $_data[$key] = escape_for_mysql($val);
|
||||
else
|
||||
$_data = mysql_real_escape_string($_data);
|
||||
$_data = mysqli_real_escape_string($mysql, $_data);
|
||||
// uses last opened MySQL link implicitly
|
||||
// assumption is valid because this function is never called
|
||||
// before mysql_connect
|
||||
|
|
@ -295,7 +296,7 @@ function my_serialize_cfg($arg) {
|
|||
class JLOG_Tags {
|
||||
var $tree = array();
|
||||
|
||||
function JLOG_Tags($body) {
|
||||
function __construct($body) {
|
||||
preg_match_all('/<jlog:([a-z]\w+)\s?([^>]*)\/?>(<\/(\1):(\2)>)?/ims', $body, $this->tree);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,38 +4,38 @@
|
|||
class JlogPlugin {
|
||||
|
||||
/* Hooks */
|
||||
function hook_body ($t) { return $t; } // string body
|
||||
function hook_commentForm ($t) { return $t; } // string with comment form output + array with form data
|
||||
function hook_adminContent ($t) { return $t; } // string content
|
||||
function hook_newComment ($t) { return $t; } // array form data
|
||||
function hook_updateComment ($t) { return $t; } // array form data
|
||||
function hook_deleteComment ($t) { return $t; } // string comment id
|
||||
function hook_showComment ($t) { return $t; } // string comment output
|
||||
function hook_onUpdate ($t) { return $t; } // array with all rss feeds and sub
|
||||
function hook_doEntry ($t) { return $t; } // string with entry + array with data from database + string count comments + string section
|
||||
function hook_doTeaser ($t) { return $t; } // string with entry + array with data from database + string count comments + string pre + string post
|
||||
function hook_bbcode ($t) { return $t; } // bbcode object
|
||||
function hook_bbcomments ($t) { return $t; } // bbcomments object
|
||||
function hook_adminForm ($t) { return $t; } // admin formular
|
||||
function hook_insertEntry ($t) { return $t; } // int id + array with form data
|
||||
function hook_updateEntry ($t) { return $t; } // int id + array with form data
|
||||
function hook_permalink ($t) { return $t; } // string permalink + string date + string url + string section
|
||||
function hook_xmlrpcPermalink ($t) { return $t; } // string url
|
||||
function hook_countComments ($t) { return $t; } // array with id and count
|
||||
function hook_adminMail ($t) { return $t; } // array with mail + array blogentry
|
||||
function hook_commentorMail ($t) { return $t; } // array with mail + array blogentry
|
||||
function hook_commentAdminList($t) { return $t; } // string with actual tr + array with comment data
|
||||
function hook_previewComment ($t) { return $t; } // same as newComment
|
||||
function hook_dispatchLogin ($t) { return $t; } //
|
||||
function hook_loginForm ($t) { return $t; } //
|
||||
function hook_adminMenu ($t) { return $t; } // string with the admin menu html
|
||||
function hook_adminList ($t) { return $t; } //
|
||||
function hook_body ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string body
|
||||
function hook_commentForm ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string with comment form output + array with form data
|
||||
function hook_adminContent ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string content
|
||||
function hook_newComment ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // array form data
|
||||
function hook_updateComment ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // array form data
|
||||
function hook_deleteComment ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string comment id
|
||||
function hook_showComment ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string comment output
|
||||
function hook_onUpdate ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // array with all rss feeds and sub
|
||||
function hook_doEntry ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string with entry + array with data from database + string count comments + string section
|
||||
function hook_doTeaser ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string with entry + array with data from database + string count comments + string pre + string post
|
||||
function hook_bbcode ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // bbcode object
|
||||
function hook_bbcomments ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // bbcomments object
|
||||
function hook_adminForm ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // admin formular
|
||||
function hook_insertEntry ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // int id + array with form data
|
||||
function hook_updateEntry ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // int id + array with form data
|
||||
function hook_permalink ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string permalink + string date + string url + string section
|
||||
function hook_xmlrpcPermalink ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string url
|
||||
function hook_countComments ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // array with id and count
|
||||
function hook_adminMail ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // array with mail + array blogentry
|
||||
function hook_commentorMail ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // array with mail + array blogentry
|
||||
function hook_commentAdminList($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string with actual tr + array with comment data
|
||||
function hook_previewComment ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // same as newComment
|
||||
function hook_dispatchLogin ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } //
|
||||
function hook_loginForm ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } //
|
||||
function hook_adminMenu ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } // string with the admin menu html
|
||||
function hook_adminList ($t, $a = null, $b = null, $c = null, $d = null, $e = null, $f = null) { return $t; } //
|
||||
}
|
||||
|
||||
class JlogPluginManager {
|
||||
var $plugins = array();
|
||||
|
||||
function JlogPluginManager($plugindirectory) {
|
||||
function __construct($plugindirectory) {
|
||||
$handle = "";
|
||||
$file = "";
|
||||
$this->get = strip($_GET);
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class Jlog_Mail
|
|||
* Jlog_Mail() - constructor
|
||||
*
|
||||
*/
|
||||
function Jlog_Mail()
|
||||
function __construct()
|
||||
{
|
||||
# XXX don't know if needed
|
||||
mb_internal_encoding('UTF-8');
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
// load settings and version information
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR."..".DIRECTORY_SEPARATOR."personal".DIRECTORY_SEPARATOR."settings.inc.php");
|
||||
require_once(JLOG_BASEPATH."scripts".DIRECTORY_SEPARATOR."version.inc.php");
|
||||
|
||||
|
|
@ -62,20 +64,15 @@ require_once(JLOG_BASEPATH.'scripts'.DIRECTORY_SEPARATOR.'comments.php');
|
|||
if(defined('JLOG_ADMIN')) require_once(JLOG_BASEPATH.'lang'.DIRECTORY_SEPARATOR.'lang-admin.'.JLOG_LANGUAGE.'.inc.php');
|
||||
|
||||
// connect to database
|
||||
$connect = @mysql_connect(JLOG_DB_URL, JLOG_DB_USER, JLOG_DB_PWD);
|
||||
if ($connect == FALSE) {
|
||||
mail(JLOG_EMAIL, $l['admin']['e_db'], $l['admin']['e_db_is']."\n".mysql_error());
|
||||
die("<strong>".$l['db_error']."</strong><br />".$l['plz_try_again'].".");
|
||||
}
|
||||
// select our database
|
||||
$select = @mysql_select_db(JLOG_DB);
|
||||
if ($connect == FALSE) {
|
||||
mail(JLOG_EMAIL, $l['admin']['e_db'], $l['admin']['e_db_is']."\n".mysql_error());
|
||||
$mysql = @mysqli_connect(JLOG_DB_URL, JLOG_DB_USER, JLOG_DB_PWD, JLOG_DB);
|
||||
if ($mysql == FALSE) {
|
||||
mail(JLOG_EMAIL, $l['admin']['e_db'], $l['admin']['e_db_is']."\n".mysqli_connect_error());
|
||||
die("<strong>".$l['db_error']."</strong><br />".$l['plz_try_again'].".");
|
||||
}
|
||||
|
||||
// do some settings
|
||||
@mysql_query("SET NAMES utf8");
|
||||
@mysql_query("SET sql_mode=''");
|
||||
@mysqli_query($mysql, "SET NAMES utf8");
|
||||
@mysqli_query($mysql, "SET sql_mode=''");
|
||||
|
||||
// some more code that needs to run for every page - however, this
|
||||
// code requires an established connection to the database
|
||||
|
|
@ -88,4 +85,4 @@ $plugins = new JlogPluginManager(JLOG_BASEPATH.'plugins'.DIRECTORY_SEPARATOR);
|
|||
$bbcode = $plugins->callHook('bbcode', $bbcode);
|
||||
$bbcomments = $plugins->callHook('bbcomments', $bbcomments);
|
||||
|
||||
// eof
|
||||
// eof
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ class StringParser {
|
|||
*
|
||||
* @access public
|
||||
*/
|
||||
function StringParser () {
|
||||
function __construct () {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -910,7 +910,7 @@ class StringParser_Node {
|
|||
* occurred at. If not determinable, it is -1.
|
||||
* @global __STRINGPARSER_NODE_ID
|
||||
*/
|
||||
function StringParser_Node ($occurredAt = -1) {
|
||||
function __constructor ($occurredAt = -1) {
|
||||
$this->_id = $GLOBALS['__STRINGPARSER_NODE_ID']++;
|
||||
$this->occurredAt = $occurredAt;
|
||||
}
|
||||
|
|
@ -1248,7 +1248,7 @@ class StringParser_Node {
|
|||
* @param object $node The node to destroy
|
||||
* @return bool True on success, else false.
|
||||
*/
|
||||
function destroyNode (&$node) {
|
||||
static function destroyNode (&$node) {
|
||||
if ($node === null) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1486,8 +1486,8 @@ class StringParser_Node_Text extends StringParser_Node {
|
|||
* occurred at. If not determinable, it is -1.
|
||||
* @see StringParser_Node_Text::content
|
||||
*/
|
||||
function StringParser_Node_Text ($content, $occurredAt = -1) {
|
||||
parent::StringParser_Node ($occurredAt);
|
||||
function __construct ($content, $occurredAt = -1) {
|
||||
# parent::__construct ($occurredAt);
|
||||
$this->content = $content;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
$now_date = getdate();
|
||||
|
||||
$errors = array();
|
||||
$data['rss'] = "";
|
||||
$data['rss_full'] = "";
|
||||
$data['sub'] = "";
|
||||
|
|
|
|||
15
scripts/update/113To120.php
Normal file
15
scripts/update/113To120.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
class JlogUpdate_113To120
|
||||
{
|
||||
function getForm($l)
|
||||
{
|
||||
return '<p>Bitte beachten Sie, dass nach Durchführung dieses Updates eventuell einzelne Plugins nicht mehr funktionieren.<br />'
|
||||
. 'Kontaktieren Sie in einem solchen Fall den Plugin-Autor bzzgl. eines Updates für das Plugin.</p>';
|
||||
}
|
||||
|
||||
function performUpdate($l, $settings)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -23,9 +23,9 @@
|
|||
* $Date: 2009-01-13 21:58:12 +0100 (Tis, 13 Jan 2009) $
|
||||
*/
|
||||
|
||||
define('JLOG_SOFTWARE_VERSION', '1.1.3');
|
||||
define('JLOG_SOFTWARE_URL', 'http://jeenaparadies.net/projects/jlog');
|
||||
define('JLOG_SOFTWARE_VERSION', '1.2.0');
|
||||
define('JLOG_SOFTWARE_URL', 'https://github.com/jeena/jlog/');
|
||||
define('JLOG_SOFTWARE_PHPV', '4.1.1');
|
||||
define('JLOG_SOFTWARE_MYSQLV', '4.1.0');
|
||||
|
||||
// eof
|
||||
// eof
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue