mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
PHP7 fixes
This commit is contained in:
@@ -2343,15 +2343,22 @@ class users_ext
|
|||||||
|
|
||||||
function field_deactivate()
|
function field_deactivate()
|
||||||
{
|
{
|
||||||
global $ue, $ns, $tp, $sql, $admin_log;
|
|
||||||
|
$tp = e107::getParser();
|
||||||
|
$sql = e107::getDb();
|
||||||
|
$ue = e107::getUserExt();
|
||||||
|
|
||||||
$ret = "";
|
$ret = "";
|
||||||
foreach(array_keys($_POST['deactivate']) as $f)
|
foreach(array_keys($_POST['deactivate']) as $f)
|
||||||
{
|
{
|
||||||
|
$f = $tp->filter($f);
|
||||||
|
|
||||||
if($ue->user_extended_remove($f, $f))
|
if($ue->user_extended_remove($f, $f))
|
||||||
{
|
{
|
||||||
$ret .= EXTLAN_68." $f ".EXTLAN_72."<br />";
|
$ret .= EXTLAN_68." $f ".EXTLAN_72."<br />";
|
||||||
if(is_readable(e_CORE."sql/extended_".$f.".php")){
|
if(is_readable(e_CORE."sql/extended_".$f.".php"))
|
||||||
$ret .= (mysql_query("DROP TABLE ".MPREFIX."user_extended_".$f)) ? LAN_DELETED." user_extended_".$f."<br />" : LAN_DELETED_FAILED." user_extended_".$f."<br />";
|
{
|
||||||
|
$ret .= ($sql->gen("DROP TABLE ".MPREFIX."user_extended_".$f)) ? LAN_DELETED." user_extended_".$f."<br />" : LAN_DELETED_FAILED." user_extended_".$f."<br />";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2360,6 +2367,7 @@ class users_ext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
e107::getLog()->add('EUF_12',implode(', ',$_POST['deactivate']),E_LOG_INFORMATIVE,'');
|
e107::getLog()->add('EUF_12',implode(', ',$_POST['deactivate']),E_LOG_INFORMATIVE,'');
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2378,7 +2386,7 @@ class users_ext
|
|||||||
preg_match_all("/create(.*?)myisam;/si", $sql_data, $creation);
|
preg_match_all("/create(.*?)myisam;/si", $sql_data, $creation);
|
||||||
foreach($creation[0] as $tab){
|
foreach($creation[0] as $tab){
|
||||||
$query = str_replace($search,$replace,$tab);
|
$query = str_replace($search,$replace,$tab);
|
||||||
if(!mysql_query($query)){
|
if(!$sql->gen($query)){
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2386,7 +2394,7 @@ class users_ext
|
|||||||
preg_match_all("/insert(.*?);/si", $sql_data, $inserts);
|
preg_match_all("/insert(.*?);/si", $sql_data, $inserts);
|
||||||
foreach($inserts[0] as $ins){
|
foreach($inserts[0] as $ins){
|
||||||
$qry = str_replace($search,$replace,$ins);
|
$qry = str_replace($search,$replace,$ins);
|
||||||
if(!mysql_query($qry)){
|
if(!$sql->gen($qry)){
|
||||||
$error = TRUE;
|
$error = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user