mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 22:57:14 +02:00
Removed references to deprecated preset handler.
This commit is contained in:
@@ -43,14 +43,6 @@ require_once(e_HANDLER."file_class.php");
|
|||||||
|
|
||||||
$fl = new e_file;
|
$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;
|
$rs = new form;
|
||||||
$frm = new e_form;
|
$frm = new e_form;
|
||||||
@@ -58,12 +50,7 @@ $download = new download;
|
|||||||
|
|
||||||
require_once("auth.php");
|
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)
|
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");
|
require_once(e_CORE."shortcodes/batch/download_shortcodes.php");
|
||||||
|
|
||||||
$mirrorArray = array();
|
$mirrorArray = array();
|
||||||
@@ -805,8 +792,7 @@ class download
|
|||||||
$download_status[0] = DOWLAN_122;
|
$download_status[0] = DOWLAN_122;
|
||||||
$download_status[1] = DOWLAN_123;
|
$download_status[1] = DOWLAN_123;
|
||||||
$download_status[2] = DOWLAN_124;
|
$download_status[2] = DOWLAN_124;
|
||||||
$preset = $pst->read_preset("admin_downloads"); // read preset values into array
|
|
||||||
extract($preset);
|
|
||||||
|
|
||||||
if (!$sql->db_Select("download_category"))
|
if (!$sql->db_Select("download_category"))
|
||||||
{
|
{
|
||||||
@@ -1420,7 +1406,7 @@ class download
|
|||||||
|
|
||||||
function show_categories($sub_action, $id)
|
function show_categories($sub_action, $id)
|
||||||
{
|
{
|
||||||
global $sql, $rs, $ns, $tp, $pst;
|
global $sql, $rs, $ns, $tp;
|
||||||
|
|
||||||
if (!is_object($sql2)) {
|
if (!is_object($sql2)) {
|
||||||
$sql2 = new db;
|
$sql2 = new db;
|
||||||
@@ -1579,7 +1565,7 @@ class download
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$preset = $pst->read_preset("admin_dl_cat"); // read preset values into array
|
|
||||||
extract($preset);
|
extract($preset);
|
||||||
|
|
||||||
$frm_action = (isset($_POST['add_category'])) ? e_SELF."?cat" : e_SELF."?".e_QUERY;
|
$frm_action = (isset($_POST['add_category'])) ? e_SELF."?cat" : e_SELF."?".e_QUERY;
|
||||||
|
@@ -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.
|
// 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);
|
e107::setRegistry('_newspost_admin', $newspost);
|
||||||
$gen = new convert();
|
$gen = new convert();
|
||||||
|
|
||||||
@@ -830,7 +830,7 @@ class admin_newspost
|
|||||||
|
|
||||||
public $error = false;
|
public $error = false;
|
||||||
|
|
||||||
function __construct($qry='', $pstobj='')
|
function __construct($qry='')
|
||||||
{
|
{
|
||||||
global $user_pref;
|
global $user_pref;
|
||||||
|
|
||||||
@@ -842,8 +842,6 @@ class admin_newspost
|
|||||||
require_once(e_HANDLER."news_class.php");
|
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->fieldpref = varset($user_pref['admin_news_columns'], array('news_id', 'news_title', 'news_author', 'news_render_type', 'options'));
|
||||||
|
|
||||||
$this->fields = array(
|
$this->fields = array(
|
||||||
|
@@ -782,55 +782,7 @@ class admin_shortcodes
|
|||||||
|
|
||||||
function sc_admin_preset($parm)
|
function sc_admin_preset($parm)
|
||||||
{
|
{
|
||||||
if(ADMIN && getperms('0'))
|
//DEPRECATED
|
||||||
{
|
|
||||||
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; $i<count($pst->page); $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 = "
|
|
||||||
<form method='post' action='".e_SELF."?clr_preset' id='e_preset' >
|
|
||||||
<div style='text-align:center'>";
|
|
||||||
if(!$sql->db_Count('preset', '(*)', " WHERE preset_name='".$tp->toDB($existing, true)."' "))
|
|
||||||
{
|
|
||||||
$pst_text .= "<input type='button' class='btn button' name='save_preset' value='".LAN_SAVE."' onclick=\"$trigger savepreset('".$theform."',$pid)\" />";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$pst_text .= "<input type='button' class='btn button' name='save_preset' value='".LAN_UPDATE."' onclick=\"$trigger savepreset('".$theform."',$pid)\" />";
|
|
||||||
$pst_text .= "<input type='hidden' name='del_id' value='$pid' />
|
|
||||||
<input type='submit' class='btn button' name='delete_preset' value='".LAN_DELETE."' onclick=\"return jsconfirm('".$tp->toJS(LAN_PRESET_CONFIRMDEL." [".$existing."]")."')\" />";
|
|
||||||
}
|
|
||||||
$pst_text .= "</div></form>";
|
|
||||||
return $ns->tablerender(LAN_PRESET, $pst_text, '', true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_admin_pword()
|
function sc_admin_pword()
|
||||||
|
@@ -45,14 +45,6 @@ require_once(e_HANDLER."file_class.php");
|
|||||||
|
|
||||||
$fl = new e_file;
|
$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();
|
$download = new download();
|
||||||
// $adminDownload = new adminDownload();
|
// $adminDownload = new adminDownload();
|
||||||
|
|
||||||
|
@@ -535,7 +535,7 @@ class adminDownload extends download
|
|||||||
/*
|
/*
|
||||||
function create_download($subAction='', $id='')
|
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_PLUGIN.'download/download_shortcodes.php');
|
||||||
require_once(e_HANDLER."form_handler.php");
|
require_once(e_HANDLER."form_handler.php");
|
||||||
|
|
||||||
@@ -576,8 +576,7 @@ class adminDownload extends download
|
|||||||
$download_status[0] = DOWLAN_122;
|
$download_status[0] = DOWLAN_122;
|
||||||
$download_status[1] = DOWLAN_123;
|
$download_status[1] = DOWLAN_123;
|
||||||
$download_status[2] = DOWLAN_124;
|
$download_status[2] = DOWLAN_124;
|
||||||
$preset = $pst->read_preset("admin_downloads"); // read preset values into array
|
|
||||||
extract($preset);
|
|
||||||
|
|
||||||
if (!$sql->db_Select("download_category"))
|
if (!$sql->db_Select("download_category"))
|
||||||
{
|
{
|
||||||
@@ -1196,7 +1195,7 @@ class adminDownload extends download
|
|||||||
|
|
||||||
function show_categories($subAction, $id)
|
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");
|
require_once(e_HANDLER."form_handler.php");
|
||||||
$frm = new e_form();
|
$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;
|
$frm_action = (isset($_POST['add_category'])) ? e_SELF."?cat" : e_SELF."?".e_QUERY;
|
||||||
$text = "<div>
|
$text = "<div>
|
||||||
|
@@ -1052,7 +1052,7 @@ $columnInfo = array(
|
|||||||
|
|
||||||
// print_a($this);
|
// 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/download_shortcodes.php');
|
||||||
require_once(e_PLUGIN.'download/handlers/download_class.php');
|
require_once(e_PLUGIN.'download/handlers/download_class.php');
|
||||||
require_once(e_HANDLER."form_handler.php");
|
require_once(e_HANDLER."form_handler.php");
|
||||||
|
Reference in New Issue
Block a user