1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 05:11:42 +02:00

Code cleanup

This commit is contained in:
Cameron
2016-12-02 12:04:08 -08:00
parent c3df2134e2
commit e22eb860f1
12 changed files with 69 additions and 47 deletions

View File

@@ -274,7 +274,8 @@ class emotec
$tp = e107::getParser();
$fl = e107::getFile();
$ns = e107::getRender();
$packID = $tp->filter($packID);
$corea = "emote_".$packID;
$emotecode = $sysprefs -> getArray($corea);
@@ -362,6 +363,8 @@ class emotec
$fl = e107::getFile();
$tp = e107::getParser();
$packID = $tp->filter($packID);
$fname = e_IMAGE."emotes/".$packID."/emoticons.xml";
$backname = e_IMAGE."emotes/".$packID."/emoticons.bak";
@@ -445,9 +448,9 @@ class emotec
// Pick up a list of emote packs from the database
$pack_local = array();
if ($sql->db_Select("core","*","`e107_name` LIKE 'emote_%'"))
if ($sql->select("core","*","`e107_name` LIKE 'emote_%'"))
{
while ($row = $sql->db_Fetch())
while ($row = $sql->fetch())
{
$pack_local[substr($row['e107_name'],6)] = TRUE;
}
@@ -518,7 +521,7 @@ class emotec
$confArray[$confIC] = trim($tmp[2]);
}
// $tmp = addslashes(serialize($confArray));
$tmp = e107::getArrayStorage()->WriteArray($confArray);
$tmp = e107::serialize($confArray);
$File_type = EMOLAN_22.":";
}
/* end */
@@ -643,11 +646,11 @@ class emotec
{
if ($do_one)
{ // Assume existing pack
$sql->db_Update("core", "`e107_value`='{$tmp}' WHERE `e107_name`='emote_".$value."'");
$sql->update("core", "`e107_value`='{$tmp}' WHERE `e107_name`='emote_".$value."'");
}
else
{ // Assume new pack
$sql->db_Insert("core", "'emote_".$value."', '{$tmp}' ");
$sql->insert("core", "'emote_".$value."', '{$tmp}' ");
}
$mes->addInfo("<strong>{$File_type}</strong> '{$value}'");
}