mirror of
https://github.com/e107inc/e107.git
synced 2025-08-27 00:05:46 +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:
@@ -9,9 +9,9 @@
|
||||
* Administration Area - Emotions Settings & Packs
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/emoticon.php,v $
|
||||
* $Revision: 1.16 $
|
||||
* $Date: 2009-08-28 16:11:00 $
|
||||
* $Author: marj_nl_fr $
|
||||
* $Revision: 1.17 $
|
||||
* $Date: 2009-09-01 20:09:35 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,10 +30,11 @@ require_once("auth.php");
|
||||
require_once(e_HANDLER."message_handler.php");
|
||||
$emessage = &eMessage::getInstance();
|
||||
|
||||
if(!$sql->db_Count("core", "(*)", "WHERE e107_name = 'emote_default'"))
|
||||
if(!$sql->db_Count("core", "(*)", "WHERE e107_name = 'emote_default' AND e107_value !='' "))
|
||||
{ // Set up the default emotes
|
||||
$tmp = 'a:28:{s:9:"alien!png";s:6:"!alien";s:10:"amazed!png";s:7:"!amazed";s:9:"angry!png";s:11:"!grr !angry";s:12:"biglaugh!png";s:4:"!lol";s:11:"cheesey!png";s:10:":D :oD :-D";s:12:"confused!png";s:10:":? :o? :-?";s:7:"cry!png";s:19:"&| &-| &o| :(( !cry";s:8:"dead!png";s:21:"x) xo) x-) x( xo( x-(";s:9:"dodge!png";s:6:"!dodge";s:9:"frown!png";s:10:":( :o( :-(";s:7:"gah!png";s:10:":@ :o@ :o@";s:8:"grin!png";s:10:":D :oD :-D";s:9:"heart!png";s:6:"!heart";s:8:"idea!png";s:10:":! :o! :-!";s:7:"ill!png";s:4:"!ill";s:7:"mad!png";s:13:"~:( ~:o( ~:-(";s:12:"mistrust!png";s:9:"!mistrust";s:11:"neutral!png";s:10:":| :o| :-|";s:12:"question!png";s:2:"?!";s:12:"rolleyes!png";s:10:"B) Bo) B-)";s:7:"sad!png";s:4:"!sad";s:10:"shades!png";s:10:"8) 8o) 8-)";s:7:"shy!png";s:4:"!shy";s:9:"smile!png";s:10:":) :o) :-)";s:11:"special!png";s:3:"%-6";s:12:"suprised!png";s:10:":O :oO :-O";s:10:"tongue!png";s:21:":p :op :-p :P :oP :-P";s:8:"wink!png";s:10:";) ;o) ;-)";}';
|
||||
$sql->db_Insert("core", "'emote_default', '{$tmp}' ");
|
||||
$insert = array("e107_name"=>"emote_default", "e107_value"=>$tmp);
|
||||
$sql->db_Replace("core", $insert);
|
||||
}
|
||||
|
||||
|
||||
@@ -260,8 +261,7 @@ class emotec
|
||||
global $e107, $fl, $sysprefs, $tp;
|
||||
$corea = "emote_".$packID;
|
||||
|
||||
$emotecode = $sysprefs -> getArray($corea);
|
||||
|
||||
$emotecode = $sysprefs -> getArray($corea);
|
||||
$reject = '~^emoteconf|\.html$|\.php$|\.txt$|\.pak$|\.xml|\.phpBB'; // Files to exclude
|
||||
$emoteArray = $fl -> get_files(e_IMAGE."emotes/".$packID, $reject);
|
||||
|
||||
@@ -394,7 +394,8 @@ class emotec
|
||||
$packID = $_POST['packID'];
|
||||
unset($_POST['sub_conf'], $_POST['packID']);
|
||||
$encoded_emotes = $tp->toDB($_POST);
|
||||
$tmp = addslashes(serialize($encoded_emotes));
|
||||
// $tmp = addslashes(serialize($encoded_emotes));
|
||||
$tmp = e107::getArrayStorage()->WriteArray($encoded_emotes);
|
||||
|
||||
if ($sql->db_Select("core", "*", "e107_name='emote_".$packID."'"))
|
||||
{
|
||||
@@ -487,7 +488,8 @@ class emotec
|
||||
$confIC = str_replace(".", "!", $tmp[0]);
|
||||
$confArray[$confIC] = trim($tmp[2]);
|
||||
}
|
||||
$tmp = addslashes(serialize($confArray));
|
||||
// $tmp = addslashes(serialize($confArray));
|
||||
$tmp = e107::getArrayStorage()->WriteArray($confArray);
|
||||
$File_type = EMOLAN_22;
|
||||
}
|
||||
/* end */
|
||||
@@ -596,7 +598,8 @@ class emotec
|
||||
|
||||
|
||||
// Save pack info in the database
|
||||
$tmp = addslashes(serialize($confArray));
|
||||
// $tmp = addslashes(serialize($confArray));
|
||||
$tmp = e107::getArrayStorage()->WriteArray($confArray);
|
||||
$File_type = EMOLAN_23;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user