From 43478aabfa125b1408428ce6758e7a8c7219dc89 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 25 Feb 2013 17:45:19 -0800 Subject: [PATCH] Removed references to deprecated preset handler. --- e107_admin/download.php | 24 ++------- e107_admin/newspost.php | 6 +-- .../shortcodes/batch/admin_shortcodes.php | 50 +------------------ e107_plugins/download/admin_download.php | 8 --- .../download/handlers/adminDownload_class.php | 10 ++-- e107_plugins/download/includes/admin.php | 2 +- 6 files changed, 13 insertions(+), 87 deletions(-) diff --git a/e107_admin/download.php b/e107_admin/download.php index f4a258f22..8126aa9ea 100644 --- a/e107_admin/download.php +++ b/e107_admin/download.php @@ -43,14 +43,6 @@ require_once(e_HANDLER."file_class.php"); $fl = new e_file; -// -------- Presets. ------------ -require_once(e_HANDLER."preset_class.php"); -$pst = new e_preset; -$pst->form = array("myform","dlform"); // form id of the form that will have it's values saved. -$pst->page = array("download.php?create","download.php?cat"); // display preset options on which page(s). -$pst->id = array("admin_downloads","admin_dl_cat"); -// ------------------------------- - $rs = new form; $frm = new e_form; @@ -58,12 +50,7 @@ $download = new download; require_once("auth.php"); - /* -One form example (no arrays needed) -$pst->form = "myform"; // form id of the form that will have it's values saved. -$pst->page = "download.php?create"; // display preset options on which page. -$pst->save_preset("admin_downloads"); // unique name for the preset -*/ + @@ -797,7 +784,7 @@ class download function create_download($sub_action, $id) { - global $cal,$tp, $sql, $fl, $rs, $ns, $file_array, $image_array, $thumb_array,$pst; + global $cal,$tp, $sql, $fl, $rs, $ns, $file_array, $image_array, $thumb_array; require_once(e_CORE."shortcodes/batch/download_shortcodes.php"); $mirrorArray = array(); @@ -805,8 +792,7 @@ class download $download_status[0] = DOWLAN_122; $download_status[1] = DOWLAN_123; $download_status[2] = DOWLAN_124; - $preset = $pst->read_preset("admin_downloads"); // read preset values into array - extract($preset); + if (!$sql->db_Select("download_category")) { @@ -1420,7 +1406,7 @@ class download function show_categories($sub_action, $id) { - global $sql, $rs, $ns, $tp, $pst; + global $sql, $rs, $ns, $tp; if (!is_object($sql2)) { $sql2 = new db; @@ -1579,7 +1565,7 @@ class download } } - $preset = $pst->read_preset("admin_dl_cat"); // read preset values into array + extract($preset); $frm_action = (isset($_POST['add_category'])) ? e_SELF."?cat" : e_SELF."?".e_QUERY; diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index 3f68e7b7a..76e92a495 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -25,7 +25,7 @@ e107::coreLan('newspost', true); // ------------------------------ // done in class2: require_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_admin.php"); // maybe this should be put in class2.php when 'admin' is detected. -$newspost = new admin_newspost(e_QUERY, vartrue($pst)); +$newspost = new admin_newspost(e_QUERY); e107::setRegistry('_newspost_admin', $newspost); $gen = new convert(); @@ -830,7 +830,7 @@ class admin_newspost public $error = false; - function __construct($qry='', $pstobj='') + function __construct($qry='') { global $user_pref; @@ -842,8 +842,6 @@ class admin_newspost require_once(e_HANDLER."news_class.php"); - $this->_pst = $pstobj; - $this->fieldpref = varset($user_pref['admin_news_columns'], array('news_id', 'news_title', 'news_author', 'news_render_type', 'options')); $this->fields = array( diff --git a/e107_core/shortcodes/batch/admin_shortcodes.php b/e107_core/shortcodes/batch/admin_shortcodes.php index 8d59aafbb..21a7fa07b 100644 --- a/e107_core/shortcodes/batch/admin_shortcodes.php +++ b/e107_core/shortcodes/batch/admin_shortcodes.php @@ -782,55 +782,7 @@ class admin_shortcodes function sc_admin_preset($parm) { - if(ADMIN && getperms('0')) - { - global $sql,$pst,$ns,$tp,$pref; - - if(isset($pst) && $pst->form && $pst->page) - { - $thispage = urlencode(e_SELF.'?'.e_QUERY); - if(is_array($pst->page)) - { - for ($i=0; $ipage); $i++) - { - if (strpos($thispage, urlencode($pst->page[$i])) !== FALSE) - { - $query = urlencode($pst->page[$i]); - $theform = $pst->form[$i]; - $pid = $i; - } - } - } - else - { - $query = urlencode($pst->page); - $theform = $pst->form; - $pid = 0; - } - - $existing = is_array($pst->id) ? $pst->id[$pid] : $pst->id; - // $trigger = ($e_wysiwyg && $pref['wysiwyg']) ? 'tinyMCE.triggerSave();' : ''; - - if (strpos($thispage, $query) !== false) - { - $pst_text = " -
-
"; - if(!$sql->db_Count('preset', '(*)', " WHERE preset_name='".$tp->toDB($existing, true)."' ")) - { - $pst_text .= ""; - } - else - { - $pst_text .= ""; - $pst_text .= " - toJS(LAN_PRESET_CONFIRMDEL." [".$existing."]")."')\" />"; - } - $pst_text .= "
"; - return $ns->tablerender(LAN_PRESET, $pst_text, '', true); - } - } - } + //DEPRECATED } function sc_admin_pword() diff --git a/e107_plugins/download/admin_download.php b/e107_plugins/download/admin_download.php index 37e3ce821..66a13e101 100644 --- a/e107_plugins/download/admin_download.php +++ b/e107_plugins/download/admin_download.php @@ -45,14 +45,6 @@ require_once(e_HANDLER."file_class.php"); $fl = new e_file; -// -------- Presets. ------------ -require_once(e_HANDLER."preset_class.php"); -$pst = new e_preset; -$pst->form = array("myform","dlform"); // form id of the form that will have it's values saved. -$pst->page = array("download.php?create","download.php?cat"); // display preset options on which page(s). -$pst->id = array("admin_downloads","admin_dl_cat"); -// ------------------------------- - $download = new download(); // $adminDownload = new adminDownload(); diff --git a/e107_plugins/download/handlers/adminDownload_class.php b/e107_plugins/download/handlers/adminDownload_class.php index 21a841d47..771a74b5c 100644 --- a/e107_plugins/download/handlers/adminDownload_class.php +++ b/e107_plugins/download/handlers/adminDownload_class.php @@ -535,7 +535,7 @@ class adminDownload extends download /* function create_download($subAction='', $id='') { - global $download, $e107, $cal, $tp, $sql, $fl, $rs, $ns, $file_array, $image_array, $thumb_array, $pst; + global $download, $e107, $cal, $tp, $sql, $fl, $rs, $ns, $file_array, $image_array, $thumb_array; require_once(e_PLUGIN.'download/download_shortcodes.php'); require_once(e_HANDLER."form_handler.php"); @@ -576,8 +576,7 @@ class adminDownload extends download $download_status[0] = DOWLAN_122; $download_status[1] = DOWLAN_123; $download_status[2] = DOWLAN_124; - $preset = $pst->read_preset("admin_downloads"); // read preset values into array - extract($preset); + if (!$sql->db_Select("download_category")) { @@ -1196,7 +1195,7 @@ class adminDownload extends download function show_categories($subAction, $id) { - global $download, $sql, $sql2, $rs, $ns, $tp, $pst; + global $download, $sql, $sql2, $rs, $ns, $tp; require_once(e_HANDLER."form_handler.php"); $frm = new e_form(); @@ -1388,8 +1387,7 @@ class adminDownload extends download } } - $preset = $pst->read_preset("admin_dl_cat"); // read preset values into array - extract($preset); + $frm_action = (isset($_POST['add_category'])) ? e_SELF."?cat" : e_SELF."?".e_QUERY; $text = "
diff --git a/e107_plugins/download/includes/admin.php b/e107_plugins/download/includes/admin.php index e8edd4933..1942191f2 100644 --- a/e107_plugins/download/includes/admin.php +++ b/e107_plugins/download/includes/admin.php @@ -1052,7 +1052,7 @@ $columnInfo = array( // print_a($this); - global $e107, $cal, $rs, $ns, $file_array, $image_array, $thumb_array, $pst; + global $e107, $cal, $rs, $ns, $file_array, $image_array, $thumb_array; require_once(e_PLUGIN.'download/download_shortcodes.php'); require_once(e_PLUGIN.'download/handlers/download_class.php'); require_once(e_HANDLER."form_handler.php");