mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 21:02:09 +02:00
Deprecated Function cleanup and PHP Notice removal.
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user