diff --git a/e107_admin/db.php b/e107_admin/db.php
index 7f5288dd8..2cf1f4323 100644
--- a/e107_admin/db.php
+++ b/e107_admin/db.php
@@ -2,17 +2,12 @@
/*
* e107 website system
*
- * Copyright (C) 2008-2009 e107 Inc (e107.org)
+ * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Administration - Database Utilities
*
- * $URL$
- * $Revision$
- * $Id$
- * $Author$
- *
*/
require_once ("../class2.php");
@@ -69,7 +64,7 @@ if(isset($_POST['exportXmlFile']))
{
if(exportXmlFile($_POST['xml_prefs'],$_POST['xml_tables'],$_POST['package_images']))
{
- $mes = eMessage::getInstance();
+ $mes = e107::getMessage();
$mes->add(LAN_SUCCESS, E_MESSAGE_SUCCESS);
}
@@ -246,13 +241,6 @@ class system_tools
}
-
-
-
-
-
-
-
private function convertUTF8Form()
{
$mes = e107::getMessage();
@@ -467,7 +455,6 @@ class system_tools
}
-
/**
* Render Options
* @return none
@@ -537,7 +524,7 @@ class system_tools
// Get largest allowable file upload
$frm = e107::getSingleton('e_form');
- $mes = eMessage::getInstance();
+ $mes = e107::getMessage();
require_once(e_HANDLER.'upload_handler.php');
$max_file_size = get_user_max_upload();
@@ -582,7 +569,7 @@ class system_tools
*/
private function exportXmlForm()
{
- $mes = eMessage::getInstance();
+ $mes = e107::getMessage();
$frm = e107::getSingleton('e_form');
@@ -702,12 +689,12 @@ class system_tools
foreach($ret['success'] as $table)
{
- eMessage::getInstance()->add("Inserted $table", E_MESSAGE_SUCCESS);
+ e107::getMessage()->addSuccess("Inserted $table");
}
foreach($ret['failed'] as $table)
{
- eMessage::getInstance()->add("Failed to Insert $table", E_MESSAGE_ERROR);
+ e107::getMessage()->addError("Failed to Insert $table");
}
}
@@ -736,12 +723,11 @@ class system_tools
{
//TODO Add drop-down for editing personal perfs also. ie. user pref of self. (admin)
- global $pref, $e107;
+ global $e107;
$frm = e107::getForm();
$mes = e107::getMessage();
-
-
-
+ $tp = e107::getParser();
+ $pref = e107::getPref();
$config = ($type == 'core') ? e107::getConfig('core') : e107::getPlugConfig($type);
@@ -790,7 +776,7 @@ class system_tools
foreach($spref as $key => $val)
{
$ptext = (is_array($val)) ? "
".print_r($val, TRUE)."
" : htmlspecialchars($val, ENT_QUOTES, 'utf-8');
- $ptext = $e107->tp->textclean($ptext, 80);
+ $ptext = $tp->textclean($ptext, 80);
$text .= "
@@ -824,8 +810,7 @@ class system_tools
*/
private function scan_override()
{
- global $pref, $mes;
-
+ $pref = e107::getPref();
$mes = e107::getMessage();
$f = e107::getFile();
$config = e107::getConfig();
@@ -931,7 +916,7 @@ class system_tools
$text .= "
- ".$e107->tp->toHtml($row['plugin_name'], FALSE, "defs,emotes_off")." |
+ ".$tp->toHtml($row['plugin_name'], FALSE, "defs,emotes_off")." |
".$row['plugin_path']." |
";
@@ -1020,7 +1005,7 @@ function exportXmlFile($prefs,$tables,$package=FALSE,$debug=FALSE)
{
$xml = e107::getSingleton('xmlClass');
$tp = e107::getParser();
- $mes = eMessage::getInstance();
+ $mes = e107::getMessage();
//TODO LANs
@@ -1220,7 +1205,7 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
";
- $e107->ns->tablerender(DBLAN_10.SEP.DBLAN_39, $mes->render().$text);
+ $ns->tablerender(DBLAN_10.SEP.DBLAN_39, $mes->render().$text);
}
else
{
@@ -1527,7 +1512,7 @@ function verify_sql_record() // deprecated by db_verify.php ( i think).
";
- $e107->ns->tablerender(DBLAN_10.SEP.DBLAN_50, $mes->render().$text);
+ $ns->tablerender(DBLAN_10.SEP.DBLAN_50, $mes->render().$text);
}
}
diff --git a/e107_admin/docs.php b/e107_admin/docs.php
index 9bf80ccd1..2ea559dfc 100644
--- a/e107_admin/docs.php
+++ b/e107_admin/docs.php
@@ -107,6 +107,6 @@ $text .= "
";
-$e107->ns->tablerender(LAN_DOCS, $text, 'docs');
+$ns->tablerender(LAN_DOCS, $text, 'docs');
require_once("footer.php");
?>
\ No newline at end of file
diff --git a/e107_admin/emoticon.php b/e107_admin/emoticon.php
index f7c4ac04a..b8347bf05 100644
--- a/e107_admin/emoticon.php
+++ b/e107_admin/emoticon.php
@@ -351,7 +351,7 @@ class emotec
";
- $e107->ns->tablerender(EMOLAN_PAGE_TITLE.SEP.LAN_EDIT.": '".$packID."'", $text);
+ $ns->tablerender(EMOLAN_PAGE_TITLE.SEP.LAN_EDIT.": '".$packID."'", $text);
}
diff --git a/e107_admin/fla.php b/e107_admin/fla.php
index 0494d2379..ef7e5d10b 100644
--- a/e107_admin/fla.php
+++ b/e107_admin/fla.php
@@ -2,16 +2,11 @@
/*
* e107 website system
*
- * Copyright (C) 2008-2009 e107 Inc (e107.org)
+ * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
- * Manage/View failed login attempts
- *
- * $Source: /cvs_backup/e107_0.8/e107_admin/fla.php,v $
- * $Revision$
- * $Date$
- * $Author$
+ * Manage failed login attempts
*
*/
require_once('../class2.php');
@@ -137,7 +132,6 @@ $gen = new convert;
$fla_total = $sql->db_Count('generic', '(*)', "WHERE gen_type='failed_login'");
if(!$sql->db_Select('generic', '*', "gen_type='failed_login' ORDER BY gen_datestamp DESC LIMIT {$from},{$amount}"))
{
- //$text = $mes->render()." ".FLALAN_2." ";
$mes->addInfo(FLALAN_2);
}
else
@@ -179,7 +173,7 @@ else
{
extract($fa);//FIXME kill extract()
- $gen_chardata = str_replace(":::", " ", $e107->tp->toHTML($gen_chardata));
+ $gen_chardata = str_replace(":::", " ", $tp->toHTML($gen_chardata));
$host = e107::getIPHandler()->get_host_name(getenv($gen_ip));
$text .= "
|
@@ -212,8 +206,6 @@ else
$text .= "".$nextprev."
";
-
-
}
$ns->tablerender(ADLAN_146, $mes->render().$text);
diff --git a/e107_admin/mailout.php b/e107_admin/mailout.php
index d1903c2b6..b92a964f3 100644
--- a/e107_admin/mailout.php
+++ b/e107_admin/mailout.php
@@ -683,15 +683,15 @@ function saveMailPrefs(&$mes) // $emessage to $mes, working?
// Allow qmail as an option as well - works much as sendmail
if ((strpos($_POST['sendmail'],'sendmail') !== FALSE) || (strpos($_POST['sendmail'],'qmail') !== FALSE))
{
- $temp['sendmail'] = $e107->tp->toDB($_POST['sendmail']);
+ $temp['sendmail'] = $tp->toDB($_POST['sendmail']);
}
else
{
$temp['sendmail'] = '';
}
- $temp['smtp_server'] = $e107->tp->toDB($_POST['smtp_server']);
- $temp['smtp_username'] = $e107->tp->toDB($_POST['smtp_username']);
- $temp['smtp_password'] = $e107->tp->toDB($_POST['smtp_password']);
+ $temp['smtp_server'] = $tp->toDB($_POST['smtp_server']);
+ $temp['smtp_username'] = $tp->toDB($_POST['smtp_username']);
+ $temp['smtp_password'] = $tp->toDB($_POST['smtp_password']);
$smtp_opts = array();
switch (trim($_POST['smtp_options']))
@@ -711,7 +711,7 @@ function saveMailPrefs(&$mes) // $emessage to $mes, working?
$temp['smtp_options'] = implode(',',$smtp_opts);
- $temp['mail_sendstyle'] = $e107->tp->toDB($_POST['mail_sendstyle']);
+ $temp['mail_sendstyle'] = $tp->toDB($_POST['mail_sendstyle']);
$temp['mail_pause'] = intval($_POST['mail_pause']);
$temp['mail_pausetime'] = intval($_POST['mail_pausetime']);
$temp['mail_workpertick'] = intval($_POST['mail_workpertick']);
@@ -724,17 +724,17 @@ function saveMailPrefs(&$mes) // $emessage to $mes, working?
$temp['mail_bounce_email'] = '';
break;
case 'auto' :
- $temp['mail_bounce_email'] = $e107->tp->toDB($_POST['mail_bounce_email2']);
+ $temp['mail_bounce_email'] = $tp->toDB($_POST['mail_bounce_email2']);
break;
case 'mail' :
- $temp['mail_bounce_email'] = $e107->tp->toDB($_POST['mail_bounce_email']);
+ $temp['mail_bounce_email'] = $tp->toDB($_POST['mail_bounce_email']);
$temp['mail_bounce_auto'] = intval($_POST['mail_bounce_auto']);
break;
}
- $temp['mail_bounce_pop3'] = $e107->tp->toDB($_POST['mail_bounce_pop3']);
- $temp['mail_bounce_user'] = $e107->tp->toDB($_POST['mail_bounce_user']);
- $temp['mail_bounce_pass'] = $e107->tp->toDB($_POST['mail_bounce_pass']);
- $temp['mail_bounce_type'] = $e107->tp->toDB($_POST['mail_bounce_type']);
+ $temp['mail_bounce_pop3'] = $tp->toDB($_POST['mail_bounce_pop3']);
+ $temp['mail_bounce_user'] = $tp->toDB($_POST['mail_bounce_user']);
+ $temp['mail_bounce_pass'] = $tp->toDB($_POST['mail_bounce_pass']);
+ $temp['mail_bounce_type'] = $tp->toDB($_POST['mail_bounce_type']);
$temp['mail_bounce_delete'] = intval(varset($_POST['mail_bounce_delete'], 0));
$temp['mailout_enabled'] = implode(',',varset($_POST['mail_mailer_enabled'], ''));
diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php
index 1d4684827..c65ffad5d 100644
--- a/e107_admin/newspost.php
+++ b/e107_admin/newspost.php
@@ -2,14 +2,12 @@
/*
* e107 website system
*
- * Copyright (C) e107 Inc (e107.org)
+ * Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* News Administration
*
- * $URL $
- * $Id$
*/
require_once('../class2.php');
@@ -218,7 +216,7 @@ class news_sub_ui extends e_admin_ui
{
$sql = e107::getDb();
$sql->db_Select_gen("SELECT category_id,category_name FROM #news_category");
- while($row = $sql->db_Fetch())
+ while($row = $sql->fetch())
{
$cat = $row['category_id'];
$this->cats[$cat] = $row['category_name'];
@@ -425,7 +423,7 @@ class news_admin_ui extends e_admin_ui
$sql = e107::getDb();
$sql->db_Select_gen("SELECT category_id,category_name FROM #news_category");
- while($row = $sql->db_Fetch())
+ while($row = $sql->fetch())
{
$cat = $row['category_id'];
$this->cats[$cat] = $row['category_name'];
@@ -508,7 +506,7 @@ class news_admin_ui extends e_admin_ui
if ($sql->select("submitnews", "*", "submitnews_id=".intval($id)))
{
- //list($id, $submitnews_name, $submitnews_email, $_POST['news_title'], $submitnews_category, $_POST['news_body'], $submitnews_datestamp, $submitnews_ip, $submitnews_auth, $submitnews_file) = $sql->db_Fetch();
+ //list($id, $submitnews_name, $submitnews_email, $_POST['news_title'], $submitnews_category, $_POST['news_body'], $submitnews_datestamp, $submitnews_ip, $submitnews_auth, $submitnews_file) = $sql->fetch();
$row = $sql->fetch();
$_POST['news_title'] = $row['submitnews_title'];
$_POST['news_body'] = $row['submitnews_item'];
@@ -558,9 +556,9 @@ class news_admin_ui extends e_admin_ui
{
if(!isset($_POST['submit_news']))
{
- if(e107::getDb()->db_Select('news', '*', 'news_id='.intval($_GET['id'])))
+ if(e107::getDb()->select('news', '*', 'news_id='.intval($_GET['id'])))
{
- $row = e107::getDb()->db_Fetch();
+ $row = e107::getDb()->fetch();
// if(!isset($this->news_categories[$row['news_category']]))
{
@@ -1013,7 +1011,7 @@ class admin_newspost
{
e107::getDb()->db_Mark_Time('News Administration');
$this->news_categories = array();
- if(e107::getDb()->db_Select('news_category', '*', (getperms('0') ? '' : 'category_manager IN ('.USERCLASS_LIST.')')))
+ if(e107::getDb()->select('news_category', '*', (getperms('0') ? '' : 'category_manager IN ('.USERCLASS_LIST.')')))
{
$this->news_categories = e107::getDb()->db_getList('ALL', FALSE, FALSE, 'category_id');
}
@@ -1128,10 +1126,10 @@ class admin_newspost
switch ($delete) {
case 'main':
- if ($e107->sql->db_Count('news','(*)',"news_id={$del_id}"))
+ if ($sql->count('news','(*)',"news_id={$del_id}"))
{
e107::getEvent()->trigger("newsdel", $del_id);
- if($e107->sql->db_Delete("news", "news_id={$del_id}"))
+ if($sql->delete("news", "news_id={$del_id}"))
{
$admin_log->log_event('NEWS_01',$del_id,E_LOG_INFORMATIVE,'');
$this->show_message(NWSLAN_31." #".$del_id." ".NWSLAN_32, E_MESSAGE_SUCCESS);
@@ -1149,16 +1147,16 @@ class admin_newspost
if(!getperms('0|7')) $this->noPermissions();
- if (($count = $e107->sql->db_Count('news','(news_id)',"news_category={$del_id}")) === false || $count > 0)
+ if (($count = $sql->count('news','(news_id)',"news_category={$del_id}")) === false || $count > 0)
{
$this->show_message('Category is in used in '.$count.' news items and cannot be deleted.', E_MESSAGE_ERROR);
return false;
}
- if ($e107->sql->db_Count('news_category','(*)',"category_id={$del_id}"))
+ if ($sql->count('news_category','(*)',"category_id={$del_id}"))
{
e107::getEvent()->trigger("newscatdel", $del_id);
- if ($e107->sql->db_Delete("news_category", "category_id={$del_id}"))
+ if ($sql->delete("news_category", "category_id={$del_id}"))
{
$admin_log->log_event('NEWS_02',$del_id,E_LOG_INFORMATIVE,'');
$this->show_message(NWSLAN_33." #".$del_id." ".NWSLAN_32, E_MESSAGE_SUCCESS);
@@ -1168,7 +1166,7 @@ class admin_newspost
break;
case 'sn':
- if ($e107->sql->db_Delete("submitnews", "submitnews_id={$del_id}"))
+ if ($sql->delete("submitnews", "submitnews_id={$del_id}"))
{
$admin_log->log_event('NEWS_03',$del_id,E_LOG_INFORMATIVE,'');
$this->show_message(NWSLAN_34." #".$del_id." ".NWSLAN_32);
@@ -1385,7 +1383,7 @@ class admin_newspost
{
$this->error = true;
$this->show_message('mySQL Error detected!', E_MESSAGE_ERROR);
- eMessage::getInstance()->addS('mySQL error #'.e107::getDb()->getLastErrorNumber().': '.e107::getDb()->getLastErrorText(), E_MESSAGE_DEBUG);
+ e107::getMessage()->addDebug('mySQL error #'.e107::getDb()->getLastErrorNumber().': '.e107::getDb()->getLastErrorText());
}
}
}
@@ -1518,7 +1516,7 @@ class admin_newspost
$order = $_POST['multi_category_order'][$cid];
$cnt += (int) e107::getDb()->db_Update('news_category', 'category_manager='.intval($val).', category_order='.intval($order).' WHERE category_id='.intval($cid));
}
- if($cnt) eMessage::getInstance()->add(LAN_UPDATED, E_MESSAGE_SUCCESS);
+ if($cnt) e107::getMessage()->addSuccess(LAN_UPDATED);
}
function _observe_save_prefs()
@@ -1704,7 +1702,7 @@ class admin_newspost
// PREPARE SOME DATA
// safe to pass $row as it contains username and id only (no sensitive data), user_id and user_name will be internal converted to 'id', 'name' vars
$row['user_name'] = "{$row['user_name']}";
- $row['news_title'] = "".$e107->tp->toHTML($row['news_title'], false, 'TITLE')."";
+ $row['news_title'] = "".$tp->toHTML($row['news_title'], false, 'TITLE')."";
$row['category_name'] = "".$row['category_name']."";
$row['news_render_type'] = $ren_type[$row['news_render_type']];
@@ -1743,14 +1741,14 @@ class admin_newspost
- // $newsposts = $e107->sql->db_Count('news');
+ // $newsposts = $sql->count('news');
if ($newsposts > $amount)
{
// $parms = $newsposts.",".$amount.",".$this->getFrom().",".e_SELF."?".$this->getAction().'.'.($this->getSubAction() ? $this->getSubAction() : 0).'.'.$this->_sort_order.".[FROM]";
$parms = $newsposts.",".$amount.",".$this->getFrom().",".e_SELF."?action=".$this->getAction().'&sub='.($this->getSubAction() ? $this->getSubAction() : 0).'&id='.$this->_sort_order.'&filter='.intval($_GET['filter']).'&srch='.$_GET['srch']."&frm=[FROM]";
- $nextprev = $e107->tp->parseTemplate("{NEXTPREV={$parms}}");
+ $nextprev = $tp->parseTemplate("{NEXTPREV={$parms}}");
if ($nextprev) $text .= "".$nextprev."
";
}
@@ -1765,7 +1763,7 @@ class admin_newspost
$classes = e107::getUserClass()->uc_get_classlist();
// Grab news Category Names;
- e107::getDb()->db_Select('news_category', '*');
+ e107::getDb()->select('news_category', '*');
$newscatarray = e107::getDb()->db_getList();
$news_category = $news_manage = array();
foreach($newscatarray as $val)
@@ -1886,9 +1884,9 @@ class admin_newspost
{
if(!isset($_POST['submit_news']))
{
- if(e107::getDb()->db_Select('news', '*', 'news_id='.intval($this->getId())))
+ if(e107::getDb()->select('news', '*', 'news_id='.intval($this->getId())))
{
- $row = e107::getDb()->db_Fetch();
+ $row = e107::getDb()->fetch();
if(!isset($this->news_categories[$row['news_category']]))
{
@@ -1943,10 +1941,10 @@ class admin_newspost
if ($sub_action == "sn" && !varset($_POST['preview']))
{
- if ($sql->db_Select("submitnews", "*", "submitnews_id=".$this->getId(), TRUE))
+ if ($sql->select("submitnews", "*", "submitnews_id=".$this->getId(), TRUE))
{
- //list($id, $submitnews_name, $submitnews_email, $_POST['news_title'], $submitnews_category, $_POST['news_body'], $submitnews_datestamp, $submitnews_ip, $submitnews_auth, $submitnews_file) = $sql->db_Fetch();
- $row = $sql->db_Fetch();
+ //list($id, $submitnews_name, $submitnews_email, $_POST['news_title'], $submitnews_category, $_POST['news_body'], $submitnews_datestamp, $submitnews_ip, $submitnews_auth, $submitnews_file) = $sql->fetch();
+ $row = $sql->fetch();
$_POST['news_title'] = $row['submitnews_title'];
$_POST['news_body'] = $row['submitnews_item'];
$_POST['cat_id'] = $row['submitnews_category'];
@@ -1971,8 +1969,8 @@ class admin_newspost
if ($sub_action == "upload" && !varset($_POST['preview']))
{
- if ($sql->db_Select('upload', '*', "upload_id=".$this->getId())) {
- $row = $sql->db_Fetch();
+ if ($sql->select('upload', '*', "upload_id=".$this->getId())) {
+ $row = $sql->fetch();
$post_author_id = substr($row['upload_poster'], 0, strpos($row['upload_poster'], "."));
$post_author_name = substr($row['upload_poster'], (strpos($row['upload_poster'], ".")+1));
$match = array();
@@ -2083,8 +2081,8 @@ class admin_newspost
if(!getperms('0') && !check_class($pref['news_editauthor']))
{
$auth = ($_POST['news_author']) ? intval($_POST['news_author']) : USERID;
- $e107->sql->db_Select("user", "user_name", "user_id={$auth} LIMIT 1");
- $row = $e107->sql->db_Fetch(MYSQL_ASSOC);
+ $sql->select("user", "user_name", "user_id={$auth} LIMIT 1");
+ $row = $sql->fetch(MYSQL_ASSOC);
$text .= "";
$text .= "".$row['user_name']."";
}
@@ -2109,7 +2107,7 @@ class admin_newspost
}
$sql->db_Select_gen($qry);
- while($row = $sql->db_Fetch())
+ while($row = $sql->fetch())
{
if(vartrue($_POST['news_author']))
{
@@ -2410,8 +2408,8 @@ class admin_newspost
$e107 = &e107::getInstance();
- $_POST['news_title'] = $e107->tp->toDB($_POST['news_title']);
- $_POST['news_summary'] = $e107->tp->toDB($_POST['news_summary']);
+ $_POST['news_title'] = $tp->toDB($_POST['news_title']);
+ $_POST['news_summary'] = $tp->toDB($_POST['news_summary']);
$_POST['news_id'] = $id;
@@ -2450,18 +2448,18 @@ class admin_newspost
$_POST['news_datestamp'] = time();
}
- $e107->sql->db_Select("news_category", "*", "category_id='".intval($_POST['cat_id'])."'");
- list($_POST['category_id'], $_POST['category_name'], $_POST['category_icon']) = $e107->sql->db_Fetch();
+ $sql->select("news_category", "*", "category_id='".intval($_POST['cat_id'])."'");
+ list($_POST['category_id'], $_POST['category_name'], $_POST['category_icon']) = $sql->fetch();
list($_POST['user_id'],$_POST['user_name']) = explode(chr(35), $_POST['news_author']);
$_POST['news_author'] = $_POST['user_id'];
- $_POST['comment_total'] = $id ? $e107->sql->db_Count("comments", "(*)", " WHERE comment_item_id={$id} AND comment_type='0'") : 0;
+ $_POST['comment_total'] = $id ? $sql->count("comments", "(*)", " WHERE comment_item_id={$id} AND comment_type='0'") : 0;
$_PR = $_POST;
- $_PR['news_body'] = $e107->tp->post_toHTML($_PR['news_body'],FALSE);
- $_PR['news_title'] = $e107->tp->post_toHTML($_PR['news_title'],FALSE,"emotes_off, no_make_clickable");
- $_PR['news_summary'] = $e107->tp->post_toHTML($_PR['news_summary']);
- $_PR['news_extended'] = $e107->tp->post_toHTML($_PR['news_extended']);
+ $_PR['news_body'] = $tp->post_toHTML($_PR['news_body'],FALSE);
+ $_PR['news_title'] = $tp->post_toHTML($_PR['news_title'],FALSE,"emotes_off, no_make_clickable");
+ $_PR['news_summary'] = $tp->post_toHTML($_PR['news_summary']);
+ $_PR['news_extended'] = $tp->post_toHTML($_PR['news_extended']);
$_PR['news_file'] = $_POST['news_file'];
$_PR['news_thumbnail'] = basename($_POST['news_thumbnail']);
@@ -2474,7 +2472,7 @@ class admin_newspost
- ".$e107->tp->parseTemplate('{NEWSINFO}').$ix->render_newsitem($_PR, 'return')."
+ ".$tp->parseTemplate('{NEWSINFO}').$ix->render_newsitem($_PR, 'return')."
|
@@ -2493,9 +2491,9 @@ class admin_newspost
$e107 = e107::getInstance();
$category = array();
- if ($e107->sql->db_Select("news_category", "*", "category_id=".$this->getId()))
+ if ($sql->select("news_category", "*", "category_id=".$this->getId()))
{
- $category = $e107->sql->db_Fetch();
+ $category = $sql->fetch();
}
if(empty($category))
@@ -2576,9 +2574,9 @@ class admin_newspost
if ($this->getSubAction() == "edit" && !isset($_POST['update_category']))
{
- if (e107::getDb()->db_Select("news_category", "*", "category_id=".$this->getId()))
+ if (e107::getDb()->select("news_category", "*", "category_id=".$this->getId()))
{
- $category = e107::getDb()->db_Fetch();
+ $category = e107::getDb()->fetch();
}
}
@@ -2957,14 +2955,14 @@ class admin_newspost
$sql = e107::getDb();
$newsCat = array();
- $sql->db_Select('news_category');
- while($row = $sql->db_Fetch())
+ $sql->select('news_category');
+ while($row = $sql->fetch())
{
$newsCat[$row['category_id']] = $tp->toHTML($row['category_name'],FALSE,'TITLE');
}
- if ($sql->db_Select("submitnews", "*", "submitnews_id !='' ORDER BY submitnews_id DESC"))
+ if ($sql->select("submitnews", "*", "submitnews_id !='' ORDER BY submitnews_id DESC"))
{
$text .= "