mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 13:11:52 +02:00
Deprecated Function cleanup and PHP Notice removal.
This commit is contained in:
parent
cb75547c27
commit
2c50a06517
18
class2.php
18
class2.php
@ -1042,7 +1042,7 @@ if(($pref['membersonly_enabled'] && !isset($_E107['allow_guest'])) || ($pref['ma
|
||||
|
||||
if(!isset($_E107['no_prunetmp']))
|
||||
{
|
||||
$sql->db_Delete('tmp', 'tmp_time < '.(time() - 300)." AND tmp_ip!='data' AND tmp_ip!='submitted_link'");
|
||||
$sql->delete('tmp', 'tmp_time < '.(time() - 300)." AND tmp_ip!='data' AND tmp_ip!='submitted_link'");
|
||||
}
|
||||
|
||||
|
||||
@ -1076,7 +1076,7 @@ if (($_SERVER['QUERY_STRING'] == 'logout')/* || (($pref['user_tracking'] == 'ses
|
||||
// TODO - should be done inside online handler, more core areas need it (session handler for example)
|
||||
if (isset($pref['track_online']) && $pref['track_online'])
|
||||
{
|
||||
$sql->db_Update('online', "online_user_id = 0, online_pagecount=online_pagecount+1 WHERE online_user_id = '{$udata}'");
|
||||
$sql->update('online', "online_user_id = 0, online_pagecount=online_pagecount+1 WHERE online_user_id = '{$udata}'");
|
||||
}
|
||||
|
||||
// earlier event trigger with user data still available
|
||||
@ -1505,9 +1505,9 @@ function getperms($arg, $ap = ADMINPERMS)
|
||||
$sql = e107::getDb('psql');
|
||||
|
||||
// FIXME - cache it, avoid sql query here
|
||||
if ($sql->db_Select('plugin', 'plugin_id', "plugin_path = '".$matches[2]."' LIMIT 1 "))
|
||||
if ($sql->select('plugin', 'plugin_id', "plugin_path = '".$matches[2]."' LIMIT 1 "))
|
||||
{
|
||||
$row = $sql->db_Fetch();
|
||||
$row = $sql->fetch();
|
||||
$arg = 'P'.$row['plugin_id'];
|
||||
}
|
||||
}
|
||||
@ -1603,7 +1603,7 @@ function save_prefs($table = 'core', $uid = USERID, $row_val = '')
|
||||
default:
|
||||
$_user_pref = $tp->toDB($user_pref, true, true, 'pReFs');
|
||||
$tmp = $eArrayStorage->WriteArray($_user_pref);
|
||||
$sql->db_Update('user', "user_prefs='$tmp' WHERE user_id=".intval($uid));
|
||||
$sql->update('user', "user_prefs='$tmp' WHERE user_id=".intval($uid));
|
||||
return $tmp;
|
||||
break;
|
||||
}
|
||||
@ -1654,8 +1654,8 @@ class floodprotect
|
||||
|
||||
if (FLOODPROTECT == true)
|
||||
{
|
||||
$sql->db_Select($table, '*', 'ORDER BY '.$orderfield.' DESC LIMIT 1', 'no_where');
|
||||
$row=$sql->db_Fetch();
|
||||
$sql->select($table, '*', 'ORDER BY '.$orderfield.' DESC LIMIT 1', 'no_where');
|
||||
$row=$sql->fetch();
|
||||
return ($row[$orderfield] > (time() - FLOODTIMEOUT) ? false : true);
|
||||
}
|
||||
else
|
||||
@ -2055,9 +2055,9 @@ function force_userupdate($currentUser)
|
||||
|
||||
if (!e107::getPref('disable_emailcheck',TRUE) && !trim($currentUser['user_email'])) return TRUE;
|
||||
|
||||
if(e107::getDb()->db_Select('user_extended_struct', 'user_extended_struct_applicable, user_extended_struct_write, user_extended_struct_name, user_extended_struct_type', 'user_extended_struct_required = 1 AND user_extended_struct_applicable != '.e_UC_NOBODY))
|
||||
if(e107::getDb()->select('user_extended_struct', 'user_extended_struct_applicable, user_extended_struct_write, user_extended_struct_name, user_extended_struct_type', 'user_extended_struct_required = 1 AND user_extended_struct_applicable != '.e_UC_NOBODY))
|
||||
{
|
||||
while($row = e107::getDb()->db_Fetch())
|
||||
while($row = e107::getDb()->fetch())
|
||||
{
|
||||
if (!check_class($row['user_extended_struct_applicable'])) { continue; } // Must be applicable to this user class
|
||||
if (!check_class($row['user_extended_struct_write'])) { continue; } // And user must be able to change it
|
||||
|
@ -539,16 +539,16 @@ class admin_shortcodes
|
||||
if (e_QUERY == 'logall')
|
||||
{
|
||||
$text .= "<div id='adminlog'>";
|
||||
$cnt = $sql -> db_Select('admin_log', '*', "ORDER BY `dblog_datestamp` DESC", 'no_where');
|
||||
$cnt = $sql ->select('admin_log', '*', "ORDER BY `dblog_datestamp` DESC", 'no_where');
|
||||
}
|
||||
else
|
||||
{
|
||||
$text .= "<div style='display: none;' id='adminlog'>";
|
||||
$cnt = $sql -> db_Select('admin_log', '*', 'ORDER BY `dblog_datestamp` DESC LIMIT 0,10', 'no_where');
|
||||
$cnt = $sql ->select('admin_log', '*', 'ORDER BY `dblog_datestamp` DESC LIMIT 0,10', 'no_where');
|
||||
}
|
||||
$text .= ($cnt) ? '<ul>' : '';
|
||||
$gen = e107::getDateConvert();
|
||||
while ($row = $sql -> db_Fetch())
|
||||
while ($row = $sql ->fetch())
|
||||
{
|
||||
$datestamp = $gen->convert_date($row['dblog_datestamp'], 'short');
|
||||
$text .= "<li>{$datestamp} - {$row['dblog_title']}</li>";
|
||||
@ -832,7 +832,7 @@ class admin_shortcodes
|
||||
$xml->filter = array('@attributes' => FALSE, 'administration' => FALSE); // .. and they're all going to need the same filter
|
||||
|
||||
$nav_sql = new db;
|
||||
if ($nav_sql -> db_Select('plugin', '*', 'plugin_installflag=1'))
|
||||
if ($nav_sql ->select('plugin', '*', 'plugin_installflag=1'))
|
||||
{
|
||||
$tmp = array();
|
||||
$e107_var['plugm']['text'] = ADLAN_95;
|
||||
@ -844,7 +844,7 @@ class admin_shortcodes
|
||||
$tmp['plugm']['link'] = e_ADMIN.'plugin.php';
|
||||
$tmp['plugm']['perm'] = 'P';
|
||||
|
||||
while($rowplug = $nav_sql -> db_Fetch())
|
||||
while($rowplug = $nav_sql ->fetch())
|
||||
{
|
||||
$plugin_id = $rowplug['plugin_id'];
|
||||
$plugin_path = $rowplug['plugin_path'];
|
||||
@ -897,9 +897,9 @@ class admin_shortcodes
|
||||
if (strstr(e_SELF, '/admin.php'))
|
||||
{
|
||||
global $sql;
|
||||
if ($sql -> db_Select('plugin', '*', 'plugin_installflag=1'))
|
||||
if ($sql ->select('plugin', '*', 'plugin_installflag=1'))
|
||||
{
|
||||
while($rowplug = $sql -> db_Fetch())
|
||||
while($rowplug = $sql->fetch())
|
||||
{
|
||||
extract($rowplug);
|
||||
if(varset($rowplug[1]))
|
||||
|
@ -30,7 +30,7 @@ function iconpicker_shortcode($parm)
|
||||
|
||||
if($sql->gen($qry))
|
||||
{
|
||||
while($row = $sql->db_Fetch())
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
list($tmp,$tmp2,$size) = explode("_",$row['media_category']);
|
||||
|
||||
|
@ -44,7 +44,7 @@ function imageselector_shortcode($parm = '', $mod = '')
|
||||
// FIXME - media_type=image?
|
||||
if($sql->gen($qry))
|
||||
{
|
||||
while($row = $sql->db_Fetch())
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
//$imagelist[$row['media_category']][$row['media_url']] = $row['media_name']. " (".$row['media_dimensions'].") ";
|
||||
$imagelist[$row['media_category']][] = array('path' => $row['media_url'], 'fname' => $row['media_name']. " (".$row['media_dimensions'].") ");
|
||||
|
@ -24,12 +24,12 @@ function sublinks_shortcode($parm)
|
||||
|
||||
$text = "\n\n<!-- Sublinks Start -->\n\n";
|
||||
$text .= $style['prelink'];
|
||||
$sql->db_Select("links", "link_id","link_url= '{$page}' AND link_category = {$cat} LIMIT 1");
|
||||
$row = $sql->db_Fetch();
|
||||
$sql->select("links", "link_id","link_url= '{$page}' AND link_category = {$cat} LIMIT 1");
|
||||
$row = $sql->fetch();
|
||||
$parent = $row['link_id'];
|
||||
|
||||
$link_total = $sql->db_Select("links", "*", "link_class IN (".USERCLASS_LIST.") AND link_parent={$parent} ORDER BY link_order ASC");
|
||||
while($linkInfo = $sql->db_Fetch())
|
||||
$link_total = $sql->select("links", "*", "link_class IN (".USERCLASS_LIST.") AND link_parent={$parent} ORDER BY link_order ASC");
|
||||
while($linkInfo = $sql->fetch())
|
||||
{
|
||||
$text .= $sublinks->makeLink($linkInfo,TRUE, $style, false);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ function usersearch_shortcode($parm)
|
||||
if($sql->gen($qry))
|
||||
{
|
||||
if($emailSrch) $info_field = 'user_email';
|
||||
while($row = $sql->db_Fetch())
|
||||
while($row = $sql->fetch())
|
||||
{
|
||||
$ret .= "<li id='{$row['user_id']}'>{$row[$search_field]}<span class='informal'> [{$row['user_id']}] ".$row[$info_field].$email." </span></li>";
|
||||
}
|
||||
|
@ -94,9 +94,9 @@ class core_news_sef_full_url extends eUrlConfig
|
||||
|
||||
$sql = e107::getDb('url');
|
||||
$name = e107::getParser()->toDB($name);
|
||||
if($sql->db_Select('news', 'news_id', "news_sef='{$name}'")) // TODO - it'll be news_sef (new) field
|
||||
if($sql->select('news', 'news_id', "news_sef='{$name}'")) // TODO - it'll be news_sef (new) field
|
||||
{
|
||||
$name = $sql->db_Fetch();
|
||||
$name = $sql->fetch();
|
||||
$request->setRequestParam('name', $name['news_id']);
|
||||
}
|
||||
else $request->setRequestParam('name', 0);
|
||||
@ -122,9 +122,9 @@ class core_news_sef_full_url extends eUrlConfig
|
||||
|
||||
$sql = e107::getDb('url');
|
||||
$id = e107::getParser()->toDB($name);
|
||||
if($sql->db_Select('news_category', 'category_id', "category_sef='{$name}'")) // TODO - it'll be category_sef (new) field
|
||||
if($sql->select('news_category', 'category_id', "category_sef='{$name}'")) // TODO - it'll be category_sef (new) field
|
||||
{
|
||||
$name = $sql->db_Fetch();
|
||||
$name = $sql->fetch();
|
||||
$request->setRequestParam('name', $name['category_id']);
|
||||
}
|
||||
else $request->setRequestParam('name', 0);
|
||||
|
@ -191,8 +191,8 @@ class core_news_sef_noid_url extends eUrlConfig
|
||||
switch ($parts[0])
|
||||
{
|
||||
# map to list.xxx.xxx
|
||||
case 'short':
|
||||
case 'category':
|
||||
case 'short':
|
||||
case 'category':
|
||||
# Hardcoded leading string for categories, could be pref or LAN constant
|
||||
if(!vartrue($parts[1]))
|
||||
{
|
||||
@ -202,7 +202,7 @@ class core_news_sef_noid_url extends eUrlConfig
|
||||
else
|
||||
{
|
||||
if(!is_numeric($parts[1])) $id = $this->categoryIdByTitle($parts[1]);
|
||||
else $id = intval($parts[1]);
|
||||
else $id = intval($parts[1]);
|
||||
}
|
||||
if(!$id)
|
||||
{
|
||||
@ -211,8 +211,8 @@ class core_news_sef_noid_url extends eUrlConfig
|
||||
}
|
||||
$action = $parts[0] == 'short' ? 'cat' : 'list';
|
||||
$this->legacyQueryString = $action.'.'.$id.'.'.$page;
|
||||
return 'item/list';
|
||||
break;
|
||||
return 'item/list';
|
||||
break;
|
||||
|
||||
# could be pref or LAN constant
|
||||
case 'day':
|
||||
@ -251,10 +251,10 @@ class core_news_sef_noid_url extends eUrlConfig
|
||||
return 'list/tag';
|
||||
break;
|
||||
|
||||
# force not found
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
# force not found
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -290,9 +290,9 @@ class core_news_sef_noid_url extends eUrlConfig
|
||||
$sql = e107::getDb('url');
|
||||
$tp = e107::getParser();
|
||||
$id = $tp->toDB($id);
|
||||
if($sql->db_Select('news', 'news_id', "news_sef='{$id}'"))
|
||||
if($sql->select('news', 'news_id', "news_sef='{$id}'"))
|
||||
{
|
||||
$id = $sql->db_Fetch();
|
||||
$id = $sql->fetch();
|
||||
return $id['news_id'];
|
||||
}
|
||||
return false;
|
||||
@ -304,9 +304,9 @@ class core_news_sef_noid_url extends eUrlConfig
|
||||
$sql = e107::getDb('url');
|
||||
$tp = e107::getParser();
|
||||
$id = $tp->toDB($id);
|
||||
if($sql->db_Select('news_category', 'category_id', "category_sef='{$id}'"))
|
||||
if($sql->select('news_category', 'category_id', "category_sef='{$id}'"))
|
||||
{
|
||||
$id = $sql->db_Fetch();
|
||||
$id = $sql->fetch();
|
||||
return $id['category_id'];
|
||||
}
|
||||
return false;
|
||||
|
@ -92,9 +92,9 @@ class core_user_rewrite_url extends eUrlConfig
|
||||
|
||||
$sql = e107::getDb('url');
|
||||
$name = e107::getParser()->toDB($name);
|
||||
if($sql->db_Select('user', 'user_id', "user_name='{$name}'")) // XXX - new user_sef field? Discuss.
|
||||
if($sql->select('user', 'user_id', "user_name='{$name}'")) // XXX - new user_sef field? Discuss.
|
||||
{
|
||||
$name = $sql->db_Fetch();
|
||||
$name = $sql->fetch();
|
||||
$request->setRequestParam('id', $name['user_id']);
|
||||
}
|
||||
}
|
||||
|
@ -336,14 +336,14 @@ class _system_cron
|
||||
$table = $tab[0];
|
||||
$text = "";
|
||||
|
||||
$sql->db_Select_gen("SHOW CREATE TABLE `".$table."`");
|
||||
$sql->gen("SHOW CREATE TABLE `".$table."`");
|
||||
$row2 = $sql->db_Fetch();
|
||||
$text .= $row2['Create Table'];
|
||||
$text .= ";\n\n";
|
||||
|
||||
ob_end_clean(); // prevent memory exhaustian
|
||||
|
||||
$count = $sql->db_Select_gen("SELECT * FROM `".$table."`");
|
||||
$count = $sql->gen("SELECT * FROM `".$table."`");
|
||||
$data_array = "";
|
||||
|
||||
while($row = $sql->db_Fetch())
|
||||
|
@ -44,9 +44,9 @@ class db_table_admin
|
||||
$prefix = MPREFIX;
|
||||
}
|
||||
// echo "Get table structure for: {$table_name}, prefix: {$prefix}<br />";
|
||||
$sql->db_Select_gen('SET SQL_QUOTE_SHOW_CREATE = 1');
|
||||
$sql->gen('SET SQL_QUOTE_SHOW_CREATE = 1');
|
||||
$qry = 'SHOW CREATE TABLE `'.$prefix.$table_name."`";
|
||||
if (!($z = $sql->db_Select_gen($qry)))
|
||||
if (!($z = $sql->gen($qry)))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@ -621,7 +621,7 @@ class db_table_admin
|
||||
{
|
||||
return 'Table doesn\'t exist';
|
||||
}
|
||||
if ($sql->db_Select_gen($newStructure[0]))
|
||||
if ($sql->gen($newStructure[0]))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1271,7 +1271,7 @@ class banlistManager
|
||||
}
|
||||
}
|
||||
|
||||
if ($sql->db_Select_gen($qry))
|
||||
if ($sql->gen($qry))
|
||||
{
|
||||
while ($row = $sql->db_Fetch())
|
||||
{
|
||||
|
@ -1615,7 +1615,7 @@ class e107MailManager
|
||||
$query .= " LIMIT {$start}, {$count}";
|
||||
}
|
||||
//echo "{$start}, {$count} Mail query: {$query}<br />";
|
||||
$result = $this->db->db_Select_gen($query);
|
||||
$result = $this->db->gen($query);
|
||||
if ($result !== FALSE)
|
||||
{
|
||||
$this->queryCount[1] = $this->db->total_results; // Save number of records found
|
||||
@ -1684,7 +1684,7 @@ class e107MailManager
|
||||
$query .= " LIMIT {$start}, {$count}";
|
||||
}
|
||||
// echo "{$start}, {$count} Target query: {$query}<br />";
|
||||
$result = $this->db2->db_Select_gen($query);
|
||||
$result = $this->db2->gen($query);
|
||||
if ($result !== FALSE)
|
||||
{
|
||||
$this->queryCount[2] = $this->db2->total_results; // Save number of records found
|
||||
|
@ -1934,7 +1934,7 @@ class mailoutAdminClass extends e107MailManager
|
||||
|
||||
//Finally - check for inconsistent recipient and content status records -
|
||||
// basically verify counts
|
||||
if(($res = $this->db2->db_Select_gen("SELECT COUNT(mr.`mail_status`) AS mr_count, mr.`mail_status`,
|
||||
if(($res = $this->db2->gen("SELECT COUNT(mr.`mail_status`) AS mr_count, mr.`mail_status`,
|
||||
mc.`mail_source_id`, mc.`mail_togo_count`, mc.`mail_sent_count`, mc.`mail_fail_count`, mc.`mail_bounce_count`, mc.`mail_source_id` FROM `#mail_recipients` AS mr
|
||||
LEFT JOIN `#mail_content` AS mc ON mr.`mail_detail_id` = mc.`mail_source_id`
|
||||
WHERE mc.`mail_content_status` <= " . MAIL_STATUS_MAX_ACTIVE . "
|
||||
|
@ -216,7 +216,7 @@ class core_mailout
|
||||
|
||||
e107::getMessage()->addDebug("Selector query: ".$qry);
|
||||
|
||||
if (!( $this->mail_count = $sql->db_Select_gen($qry))) return FALSE;
|
||||
if (!( $this->mail_count = $sql->gen($qry))) return FALSE;
|
||||
$this->mail_read = 0;
|
||||
return $this->mail_count;
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ class e_media
|
||||
$query .= " AND ( ".implode(" OR ",$searchinc)." ) " ;
|
||||
}
|
||||
|
||||
return e107::getDb()->db_Select_gen($query);
|
||||
return e107::getDb()->gen($query);
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -1676,7 +1676,7 @@ class e_model extends e_object
|
||||
/**
|
||||
* Set parameter array
|
||||
* Core implemented:
|
||||
* - db_query: string db query to be passed to load() ($sql->db_Select_gen())
|
||||
* - db_query: string db query to be passed to load() ($sql->gen())
|
||||
* - db_query
|
||||
* - db_fields
|
||||
* - db_where
|
||||
@ -3237,7 +3237,7 @@ class e_tree_model extends e_front_model
|
||||
$sql = e107::getDb($this->getParam('model_class', 'e_model'));
|
||||
$this->_total = $sql->total_results = false;
|
||||
|
||||
if($sql->db_Select_gen($this->getParam('db_query'), $this->getParam('db_debug') ? true : false))
|
||||
if($sql->gen($this->getParam('db_query'), $this->getParam('db_debug') ? true : false))
|
||||
{
|
||||
$this->_total = is_integer($sql->total_results) ? $sql->total_results : false; //requires SQL_CALC_FOUND_ROWS in query - see db handler
|
||||
while($tmp = $sql->db_Fetch())
|
||||
|
@ -1168,41 +1168,46 @@ class e_db_mysql
|
||||
switch ($type)
|
||||
{
|
||||
case 'both':
|
||||
case 3:
|
||||
case 3: // MYSQL_BOTH:
|
||||
$type = ($this->pdo) ? PDO::FETCH_BOTH: MYSQL_BOTH; // 3
|
||||
break;
|
||||
|
||||
case 'num':
|
||||
case 2:
|
||||
case 2; // MYSQL_NUM: // 2
|
||||
$type = ($this->pdo) ? PDO::FETCH_NUM : MYSQL_NUM;
|
||||
break;
|
||||
|
||||
case 'assoc':
|
||||
case 1:
|
||||
case 1; //: // 1
|
||||
default:
|
||||
$type = ($this->pdo) ? PDO::FETCH_ASSOC : MYSQL_ASSOC;
|
||||
break;
|
||||
}
|
||||
}
|
||||
elseif($this->pdo) // convert type to PDO.
|
||||
else
|
||||
{
|
||||
switch ($type)
|
||||
|
||||
if($this->pdo) // convert type to PDO.
|
||||
{
|
||||
case 'both': // 3
|
||||
$type = PDO::FETCH_BOTH;
|
||||
break;
|
||||
case 'num': // 2
|
||||
$type = PDO::FETCH_NUM;
|
||||
break;
|
||||
switch ($type)
|
||||
{
|
||||
case 'both': // 3
|
||||
$type = PDO::FETCH_BOTH;
|
||||
break;
|
||||
|
||||
case 'num': // 2
|
||||
$type = PDO::FETCH_NUM;
|
||||
break;
|
||||
|
||||
case 'assoc': // 1
|
||||
default:
|
||||
$type = PDO::FETCH_ASSOC;
|
||||
break;
|
||||
default:
|
||||
$type = PDO::FETCH_ASSOC;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$b = microtime();
|
||||
if($this->mySQLresult)
|
||||
{
|
||||
|
@ -1796,7 +1796,7 @@ class e107plugin
|
||||
}
|
||||
break;
|
||||
case 'mysql': // all should be lowercase
|
||||
if (isset($dv['@attributes']['min_version']) && (version_compare($dv['@attributes']['min_version'], mysql_get_server_info(), '<=') === FALSE))
|
||||
if (isset($dv['@attributes']['min_version']) && (version_compare($dv['@attributes']['min_version'], e107::getDb()->mySqlServerInfo(), '<=') === FALSE))
|
||||
{
|
||||
$error[] = EPL_ADLAN_75.$dv['@attributes']['min_version'];
|
||||
$canContinue = FALSE;
|
||||
|
@ -144,7 +144,7 @@ $total_topics = $sql->count("forum_thread", "(*)");
|
||||
$total_replies = $sql->count("forum_post", "(*)");
|
||||
$total_members = $sql->count("user");
|
||||
$newest_member = $sql->select("user", "*", "user_ban='0' ORDER BY user_join DESC LIMIT 0,1");
|
||||
list($nuser_id, $nuser_name) = $sql->fetch(); // FIXME $nuser_id & $user_name return empty even though print_a($newest_member); returns proper result.
|
||||
list($nuser_id, $nuser_name) = $sql->fetch('num'); // FIXME $nuser_id & $user_name return empty even though print_a($newest_member); returns proper result.
|
||||
|
||||
if(!defined('e_TRACKING_DISABLED'))
|
||||
{
|
||||
|
@ -229,7 +229,7 @@
|
||||
|
||||
if($user_profile->identifier >0)
|
||||
{
|
||||
if (!$sql->db_Select("user", "*", "user_xup = '".$prov_id."' ")) // New User
|
||||
if (!$sql->select("user", "*", "user_xup = '".$prov_id."' ")) // New User
|
||||
{
|
||||
$user_join = time();
|
||||
$user_pass = md5($user_profile->identifier.$user_join);
|
||||
@ -245,7 +245,7 @@
|
||||
'user_xup' => $prov_id
|
||||
);
|
||||
|
||||
if($newid = $sql->db_Insert('user',$insert,true))
|
||||
if($newid = $sql->insert('user',$insert,true))
|
||||
{
|
||||
e107::getEvent()->trigger('usersup', $insert);
|
||||
if(!USERID)
|
||||
|
@ -1791,7 +1791,7 @@ if($this->pdo == true)
|
||||
|
||||
if(!$link)
|
||||
{
|
||||
return nl2br(LANINS_084."\n\n<b>".LANINS_083."\n</b><i>".mysql_error($link)."</i>");
|
||||
return nl2br(LANINS_084."\n\n<b>".LANINS_083."\n</b><i>".e107::getDb()->getLastErrorText()."</i>");
|
||||
}
|
||||
|
||||
$this->dbLink = $link; // Needed for mysql_close() to work round bug in PHP 5.3
|
||||
|
@ -194,7 +194,7 @@ elseif ($action == 'forums')
|
||||
ORDER BY p.post_datestamp DESC LIMIT {$from}, 10
|
||||
";
|
||||
|
||||
if (!$sql->db_Select_gen($qry))
|
||||
if (!$sql->gen($qry))
|
||||
{
|
||||
$ftext .= "<span class='mediumtext'>".UP_LAN_8.'</span>';
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ if ($dataToSave && !$promptPassword)
|
||||
validatorClass::addFieldTypes($userMethods->userVettingInfo,$changedData);
|
||||
|
||||
// print_a($changedData);
|
||||
if (FALSE === $sql->db_Update('user', $changedData))
|
||||
if (FALSE === $sql->update('user', $changedData))
|
||||
{
|
||||
$message .= '<br />'.LAN_USET_43;
|
||||
}
|
||||
@ -476,10 +476,10 @@ if ($dataToSave && !$promptPassword)
|
||||
if (false === $sql->retrieve('user_extended', 'user_extended_id', 'user_extended_id='.$inp))
|
||||
{
|
||||
// ***** Next line creates a record which presumably should be there anyway, so could generate an error if no test first
|
||||
$sql->db_Select_gen("INSERT INTO #user_extended (user_extended_id, user_hidden_fields) values ('".$inp."', '')");
|
||||
$sql->gen("INSERT INTO #user_extended (user_extended_id, user_hidden_fields) values ('".$inp."', '')");
|
||||
//print_a('New extended fields added: '.$inp.'<br />');
|
||||
}
|
||||
if (false === $sql->db_Update('user_extended', $changedEUFData))
|
||||
if (false === $sql->update('user_extended', $changedEUFData))
|
||||
{
|
||||
$message .= '<br />Error updating EUF';
|
||||
}
|
||||
@ -582,7 +582,7 @@ if ($dataToSave && !$promptPassword)
|
||||
// If user has changed display name, update the record in the online table
|
||||
if (isset($changedUserData['user_name']) && !$_uid)
|
||||
{
|
||||
$sql->db_Update('online', "online_user_id = '".USERID.".".$changedUserData['user_name']."' WHERE online_user_id = '".USERID.".".USERNAME."'");
|
||||
$sql->update('online', "online_user_id = '".USERID.".".$changedUserData['user_name']."' WHERE online_user_id = '".USERID.".".USERNAME."'");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user