mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Fixes for old-style plugins
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
* General purpose file
|
* General purpose file
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||||
* $Revision: 1.165 $
|
* $Revision: 1.166 $
|
||||||
* $Date: 2009-12-07 20:47:37 $
|
* $Date: 2009-12-09 20:35:57 $
|
||||||
* $Author: e107steved $
|
* $Author: e107steved $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -2096,6 +2096,7 @@ function __autoload($className)
|
|||||||
case 'plugin':
|
case 'plugin':
|
||||||
array_shift($tmp);
|
array_shift($tmp);
|
||||||
// folder 'includes' is not part of the class name
|
// folder 'includes' is not part of the class name
|
||||||
|
if (!$tmp[0]) return; // In case we get an empty class part
|
||||||
$tmp[0] = $tmp[0].'/includes';
|
$tmp[0] = $tmp[0].'/includes';
|
||||||
$filename = e_PLUGIN.implode('/', $tmp).'.php';
|
$filename = e_PLUGIN.implode('/', $tmp).'.php';
|
||||||
//TODO add debug screen Auto-loaded classes - ['plugin: '.$filename.' - '.$className];
|
//TODO add debug screen Auto-loaded classes - ['plugin: '.$filename.' - '.$className];
|
||||||
|
@@ -9,9 +9,9 @@
|
|||||||
* e107 Preference Handler
|
* e107 Preference Handler
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $
|
||||||
* $Revision: 1.32 $
|
* $Revision: 1.33 $
|
||||||
* $Date: 2009-12-02 16:50:58 $
|
* $Date: 2009-12-09 20:35:58 $
|
||||||
* $Author: secretr $
|
* $Author: e107steved $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -1027,27 +1027,32 @@ class prefs
|
|||||||
*
|
*
|
||||||
* all pref sets other than menu_pref get toDB()
|
* all pref sets other than menu_pref get toDB()
|
||||||
*/
|
*/
|
||||||
function setArray($name = "", $table = "core", $uid = USERID) {
|
function setArray($name = '', $table = 'core', $uid = USERID)
|
||||||
global $tp;
|
{
|
||||||
|
$tp = e107::getParser();
|
||||||
|
|
||||||
if (!strlen($name)) {
|
if (!strlen($name))
|
||||||
switch ($table) {
|
{
|
||||||
|
switch ($table)
|
||||||
|
{
|
||||||
case 'core':
|
case 'core':
|
||||||
$name = "pref";
|
$name = 'pref';
|
||||||
break;
|
break;
|
||||||
case 'user':
|
case 'user':
|
||||||
$name = "user_pref";
|
$name = 'user_pref';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
global $$name;
|
global $$name;
|
||||||
if ($name != "menu_pref") {
|
if ($name != 'menu_pref')
|
||||||
foreach($$name as $key => $prefvalue) {
|
{
|
||||||
|
foreach($$name as $key => $prefvalue)
|
||||||
|
{
|
||||||
$$name[$key] = $tp->toDB($prefvalue);
|
$$name[$key] = $tp->toDB($prefvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$tmp = e107::getArrayStorage()->WriteArray($$name);
|
$tmp = e107::getArrayStorage()->WriteArray($$name, FALSE); // $this->set() adds slashes now
|
||||||
// $tmp = serialize($$name);
|
// $tmp = serialize($$name);
|
||||||
$this->set($tmp, $name, $table, $uid);
|
$this->set($tmp, $name, $table, $uid);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user