1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-13 09:01:59 +02:00

Fixes for old-style plugins

This commit is contained in:
e107steved 2009-12-09 20:35:58 +00:00
parent 9f6c8ad8f1
commit 2ab1a3c5ee
2 changed files with 20 additions and 14 deletions

View File

@ -9,8 +9,8 @@
* General purpose file
*
* $Source: /cvs_backup/e107_0.8/class2.php,v $
* $Revision: 1.165 $
* $Date: 2009-12-07 20:47:37 $
* $Revision: 1.166 $
* $Date: 2009-12-09 20:35:57 $
* $Author: e107steved $
*
*/
@ -2096,6 +2096,7 @@ function __autoload($className)
case 'plugin':
array_shift($tmp);
// 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';
$filename = e_PLUGIN.implode('/', $tmp).'.php';
//TODO add debug screen Auto-loaded classes - ['plugin: '.$filename.' - '.$className];

View File

@ -9,9 +9,9 @@
* e107 Preference Handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $
* $Revision: 1.32 $
* $Date: 2009-12-02 16:50:58 $
* $Author: secretr $
* $Revision: 1.33 $
* $Date: 2009-12-09 20:35:58 $
* $Author: e107steved $
*/
if (!defined('e107_INIT')) { exit; }
@ -1027,27 +1027,32 @@ class prefs
*
* all pref sets other than menu_pref get toDB()
*/
function setArray($name = "", $table = "core", $uid = USERID) {
global $tp;
function setArray($name = '', $table = 'core', $uid = USERID)
{
$tp = e107::getParser();
if (!strlen($name)) {
switch ($table) {
if (!strlen($name))
{
switch ($table)
{
case 'core':
$name = "pref";
$name = 'pref';
break;
case 'user':
$name = "user_pref";
$name = 'user_pref';
break;
}
}
global $$name;
if ($name != "menu_pref") {
foreach($$name as $key => $prefvalue) {
if ($name != 'menu_pref')
{
foreach($$name as $key => $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);
$this->set($tmp, $name, $table, $uid);
}