mirror of
https://github.com/e107inc/e107.git
synced 2025-08-25 15:31:41 +02:00
Convert serialized core prefs to e107 arrayStorage during upgrade. Modified pref_class. expecting some things to break.. work in progress. default_install.xml should now install default emoticon pack correctly.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| <20>Steve Dunstan 2001-2002
|
||||
| http://e107.org
|
||||
| jalist@e107.org
|
||||
|
|
||||
@@ -11,9 +11,9 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/emote_filter.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2009-07-25 07:54:34 $
|
||||
| $Author: marj_nl_fr $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2009-09-01 20:09:35 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
@@ -32,6 +32,8 @@ class e_emotefilter {
|
||||
$pref['emotepack'] = "default";
|
||||
save_prefs();
|
||||
}
|
||||
|
||||
|
||||
$this->emotes = $sysprefs->getArray("emote_".$pref['emotepack']);
|
||||
|
||||
foreach($this->emotes as $key => $value)
|
||||
@@ -46,6 +48,7 @@ class e_emotefilter {
|
||||
$key = str_replace("!", "_", $key);
|
||||
|
||||
$filename = e_IMAGE."emotes/" . $pref['emotepack'] . "/" . $key;
|
||||
|
||||
$fileloc = SITEURLBASE.e_IMAGE_ABS."emotes/" . $pref['emotepack'] . "/" . $key;
|
||||
|
||||
if(file_exists($filename))
|
||||
|
@@ -9,8 +9,8 @@
|
||||
* mySQL Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $
|
||||
* $Revision: 1.41 $
|
||||
* $Date: 2009-08-31 02:00:51 $
|
||||
* $Revision: 1.42 $
|
||||
* $Date: 2009-09-01 20:09:35 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ if(defined('MYSQL_LIGHT'))
|
||||
$sql = new db;
|
||||
$sql->db_Connect($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);
|
||||
}
|
||||
elseif(defined('E107_INSTALL'))
|
||||
elseif(defined('E107_INSTALL')) //TODO Remove the need for this if possible
|
||||
{
|
||||
class dummyTraffic {
|
||||
function Bump() { return; }
|
||||
@@ -61,7 +61,7 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s
|
||||
* MySQL Abstraction class
|
||||
*
|
||||
* @package e107
|
||||
* @version $Revision: 1.41 $
|
||||
* @version $Revision: 1.42 $
|
||||
* @author $Author: e107coders $
|
||||
*/
|
||||
class db {
|
||||
|
@@ -9,8 +9,8 @@
|
||||
* e107 Preference Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $
|
||||
* $Revision: 1.15 $
|
||||
* $Date: 2009-08-31 02:49:01 $
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 2009-09-01 20:09:36 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
@@ -619,7 +619,7 @@ final class e_core_pref extends e_pref
|
||||
'core' => 'SitePrefs',
|
||||
'core_backup' => 'SitePrefs_Backup',
|
||||
'core_old' => 'pref',
|
||||
'emote' => 'emote',
|
||||
'emote' => 'emote_default', //TODO include other emote packs of the user.
|
||||
'menu' => 'menu_pref',
|
||||
'search' => 'search_prefs',
|
||||
'notify' => 'notify_prefs',
|
||||
@@ -631,7 +631,8 @@ final class e_core_pref extends e_pref
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $serial_bc_array = array('core_old', 'emote', 'menu', 'search');
|
||||
// protected $serial_bc_array = array('core_old', 'emote', 'menu', 'search');
|
||||
protected $serial_bc_array = array('core_old');
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -858,8 +859,10 @@ class prefs
|
||||
* - @access public
|
||||
*/
|
||||
// retrieve prefs as an array of values
|
||||
function getArray($name) {
|
||||
return unserialize($this->get($name));
|
||||
function getArray($name)
|
||||
{
|
||||
return e107::getArrayStorage()->ReadArray($this->get($name));
|
||||
// return unserialize($this->get($name));
|
||||
}
|
||||
|
||||
|
||||
@@ -945,8 +948,8 @@ class prefs
|
||||
$$name[$key] = $tp->toDB($prefvalue);
|
||||
}
|
||||
}
|
||||
|
||||
$tmp = serialize($$name);
|
||||
$tmp = e107::getArrayStorage()->WriteArray($$name);
|
||||
// $tmp = serialize($$name);
|
||||
$this->set($tmp, $name, $table, $uid);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user