diff --git a/e107_admin/cron.php b/e107_admin/cron.php index 2d60d6b34..fadc783c1 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org/). | | $Source: /cvs_backup/e107_0.8/e107_admin/cron.php,v $ -| $Revision: 1.19 $ -| $Date: 2009-11-18 21:59:16 $ +| $Revision: 1.20 $ +| $Date: 2009-11-20 05:01:30 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -306,36 +306,14 @@ function setCronPwd() } - function cronLoad() + function cronLoad() //TODO Make a generic function to work with e_cron, e_sitelink, e_url etc. { global $pref; $core_cron = $this->coreCrons; - $new_cron = array(); - - if(vartrue($pref['e_cron_list'])) - { - - foreach($pref['e_cron_list'] as $key=>$val) - { - $eplug_cron = array(); - if(is_readable(e_PLUGIN.$key."/e_cron.php")) - { - include_once(e_PLUGIN.$key."/e_cron.php"); - - $class_name = $key."_cron"; - $method_name = 'config'; - - if($array = $this->cronExecuteMethod($class_name,$method_name,'data')) - { - $new_cron[] = $array; - } - - } - } - } - + $new_cron = e107::getAddonConfig('e_cron'); $this->e_cron = array_merge($core_cron,$new_cron); + return; } diff --git a/e107_admin/links.php b/e107_admin/links.php index 385c2d79f..038da3fce 100644 --- a/e107_admin/links.php +++ b/e107_admin/links.php @@ -9,8 +9,8 @@ * Administration Area - Site Links * * $Source: /cvs_backup/e107_0.8/e107_admin/links.php,v $ - * $Revision: 1.33 $ - * $Date: 2009-11-18 01:04:26 $ + * $Revision: 1.34 $ + * $Date: 2009-11-20 05:01:30 $ * $Author: e107coders $ * */ @@ -197,6 +197,7 @@ class links var $linkCategory = array(); var $linkOpen = array(); var $mode = 'main'; + private $linkFunctions = array(); function __construct() { @@ -208,6 +209,22 @@ class links $this->mode = $_GET['mode']; } + // get e_sitelink functions. + $tmp = e107::getAddonConfig('e_sitelink','sitelinks'); + $this->linkFunctions[0] = "(".LAN_OPTIONAL.")"; + foreach($tmp as $cat=> $array) + { + $func = array(); + foreach($array as $val) + { + $newkey = $cat.'::'.$val['function']; + $func[$newkey] = $val['name']; + } + $this->linkFunctions[$cat] = $func; + } + + + if (varset($_POST['etrigger_ecolumns'])) { $user_pref['admin_links_columns'] = $_POST['e-columns']; @@ -229,6 +246,7 @@ class links $this->linkOpen = array( 0 => LCLAN_20, // 0 = same window + 1 => LCLAN_23, // new window 4 => LCLAN_24, // 4 = miniwindow 600x400 5 => LINKLAN_1 // 5 = miniwindow 800x600 ); @@ -337,7 +355,7 @@ class links } } - + function getLinks() { @@ -780,10 +798,14 @@ class links // Show the form for link create/edit function create_link($sub_action, $id) { - global $sql, $e107, $pst, $tp, $emessage; - - $frm = new e_form(); + global $e107, $pst, $emessage; + $frm = e107::getForm(); + $sql = e107::getDb(); + $tp = e107::getParser(); + $fl = e107::getFile(); + $ns = e107::getRender(); + $preset = $pst->read_preset("admin_links"); extract($preset); @@ -806,13 +828,7 @@ class links $link_name = $this->linkName($link_name); } - require_once (e_HANDLER."file_class.php"); - $fl = new e_file(); - if($iconlist = $fl->get_files(e_IMAGE."icons/", '\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG')) - { - sort($iconlist); - } $text = "