From f96f7553186b9b67b87de310e5cd7b3bc745d9b8 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 7 Feb 2014 07:03:05 -0800 Subject: [PATCH] Deprecated function include_lan() cleanup. Replaced with e107::lan(); --- e107_plugins/admin_menu/admin_menu.php | 31 +-- e107_plugins/banner/admin_banner.php | 7 +- e107_plugins/banner/banner_menu.php | 2 +- e107_plugins/banner/config.php | 254 -------------------- e107_plugins/chatbox_menu/admin_chatbox.php | 5 +- e107_plugins/chatbox_menu/chat.php | 2 +- e107_plugins/chatbox_menu/chatbox_menu.php | 26 +- e107_plugins/chatbox_menu/e_notify.php | 7 +- e107_plugins/clock_menu/clock_menu.php | 19 +- e107_plugins/download/admin_download.php | 7 +- e107_plugins/download/download.php | 2 +- e107_plugins/download/e_cron.php | 4 +- e107_plugins/download/request.php | 9 +- e107_plugins/faqs/faqs.php | 2 +- e107_plugins/import/admin_import.php | 3 +- e107_plugins/linkwords/admin_config.php | 4 +- e107_plugins/linkwords/e_help.php | 3 +- e107_plugins/linkwords/linkwords.php | 4 +- e107_plugins/pdf/plugin.xml | 2 +- e107_plugins/trackback/plugin.xml | 2 +- 20 files changed, 57 insertions(+), 338 deletions(-) diff --git a/e107_plugins/admin_menu/admin_menu.php b/e107_plugins/admin_menu/admin_menu.php index a690d3165..1c84418c4 100644 --- a/e107_plugins/admin_menu/admin_menu.php +++ b/e107_plugins/admin_menu/admin_menu.php @@ -2,7 +2,7 @@ /* * e107 website system * - * Copyright (C) 2008-2013 e107 Inc (e107.org) + * Copyright (C) 2008-2014 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * @@ -10,35 +10,24 @@ * */ -//@TODO make it 0.8 compatible if (!defined('e107_INIT')) { exit; } + if (ADMIN == TRUE) { - // We're not in admin - load generic admin phrases - include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_admin.php'); - $tp = e107::getParser(); - $pref = e107::getPref(); - $ns = e107::getRender(); - - $nav = e107::getNav(); - -// $admin = $nav->adminLinks('assoc'); -// $plugins = $nav->pluginLinks('assoc'); + e107::lan('core','admin', true); // We're not in admin - load generic admin phrases -// $array_functions = array_merge($admin, $plugins); + $tp = e107::getParser(); + $pref = e107::getPref(); + $ns = e107::getRender(); + $nav = e107::getNav(); + + $array_functions = $nav->adminLinks(); - // print_a($array_functions); - - // asort($array_functions); -// ksort($array_functions, 'title'); //FIXME Improve ordering. - - //$array_functions = asortbyindex($array_functions, 1); - - $amtext = "
+ $amtext = "
- - "; - -$array_cat_in = explode("|", $menu_pref['banner_campaign']); - -$c = 0; - $d = 0; -$sql2 = new db; -$category_total = $sql2->db_Select("banner", "DISTINCT(SUBSTRING_INDEX(banner_campaign, '^', 1)) as banner_campaign", "ORDER BY banner_campaign", "mode=no_where"); -while ($row = $sql2->db_Fetch()) { - extract($row); - if (in_array($banner_campaign, $array_cat_in)) { - $in_catname[$c] = $banner_campaign; - $c++; - } else { - $out_catname[$d] = $banner_campaign; - $d++; - } -} - -$text .= " - - ".BANNER_MENU_L6." - - - - - - - -
".BANNER_MENU_L7."
- -
".BANNER_MENU_L8."
-

- - -
- - - - - - ".BANNER_MENU_L10." - - - ".$rs->form_option(BANNER_MENU_L17, (!$menu_pref['banner_amount'] ? "1" : "0"), 0); -for($b = 1; $b < 6; $b++) { - $text .= $rs->form_option($b, ($menu_pref['banner_amount'] == $b ? "1" : "0"), $b); -} -$text .= $rs->form_select_close()." - - - - - - - - - -
"; - -$ns->tablerender(BANNER_MENU_L5, $text); - - -require_once(e_ADMIN."footer.php"); - -function headerjs() { - - $script_js = "\n"; - return $script_js; -} -*/ ?> \ No newline at end of file diff --git a/e107_plugins/chatbox_menu/admin_chatbox.php b/e107_plugins/chatbox_menu/admin_chatbox.php index 913038c7f..c088791ee 100644 --- a/e107_plugins/chatbox_menu/admin_chatbox.php +++ b/e107_plugins/chatbox_menu/admin_chatbox.php @@ -18,7 +18,10 @@ if (!plugInstalled('chatbox_menu') || !getperms("P")) exit; } -include_lan( e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/admin_chatbox_menu.php"); +// include_lXXXan( e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/admin_chatbox_menu.php"); + +e107::lan('chatbox_menu','admin_chatbox_menu'); + require_once(e_ADMIN."auth.php"); require_once(e_HANDLER."userclass_class.php"); diff --git a/e107_plugins/chatbox_menu/chat.php b/e107_plugins/chatbox_menu/chat.php index d93599854..e7595681f 100644 --- a/e107_plugins/chatbox_menu/chat.php +++ b/e107_plugins/chatbox_menu/chat.php @@ -15,7 +15,7 @@ if (!plugInstalled('chatbox_menu')) exit; } -include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"); +e107::lan('chatbox_menu',e_LANGUAGE); require_once(HEADERF); $mes = e107::getMessage(); diff --git a/e107_plugins/chatbox_menu/chatbox_menu.php b/e107_plugins/chatbox_menu/chatbox_menu.php index 0070a478a..197e22736 100644 --- a/e107_plugins/chatbox_menu/chatbox_menu.php +++ b/e107_plugins/chatbox_menu/chatbox_menu.php @@ -35,7 +35,8 @@ if (!plugInstalled('chatbox_menu')) return ''; } -include_lan(e_PLUGIN.'chatbox_menu/languages/'.e_LANGUAGE.'/'.e_LANGUAGE.'.php'); + +e107::lan('chatbox_menu',e_LANGUAGE); // FIXME - start - LAN is not loaded /* @@ -47,7 +48,7 @@ if(($pref['cb_layer']==2) || isset($_POST['chatbox_ajax'])) //Normally the menu.sc file will auto-load the language file, this is needed in case //ajax is turned on and the menu is not loaded from the menu.sc - include_lan(e_PLUGIN.'chatbox_menu/languages/'.e_LANGUAGE.'/'.e_LANGUAGE.'.php'); + inclXXXude_lan(e_PLUGIN.'chatbox_menu/languages/'.e_LANGUAGE.'/'.e_LANGUAGE.'.php'); } } // FIXME - end @@ -58,12 +59,9 @@ if(($pref['cb_layer']==2) || isset($_POST['chatbox_ajax'])) $emessage=''; - - - - - -// FIX - using generic sc names is affecting old installs/templates and global wrappers (e.g. sc_style[USERNAME]) +/** + * Chatbox Menu Shortcodes. + */ if(!class_exists('chatbox_shortcodes')) { class chatbox_shortcodes extends e_shortcode @@ -138,18 +136,6 @@ if(!class_exists('chatbox_shortcodes')) - - - - - - - - - - - - if((isset($_POST['chat_submit']) || e_AJAX_REQUEST) && $_POST['cmessage'] != '') { if(!USER && !$pref['anon_post']) diff --git a/e107_plugins/chatbox_menu/e_notify.php b/e107_plugins/chatbox_menu/e_notify.php index 65b46cfb2..fd0373f2f 100644 --- a/e107_plugins/chatbox_menu/e_notify.php +++ b/e107_plugins/chatbox_menu/e_notify.php @@ -2,7 +2,7 @@ /* * e107 website system * - * Copyright (C) 2008-2013 e107 Inc (e107.org) + * Copyright (C) 2008-2014 e107 Inc (e107.org) * Released under the terms and conditions of the * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * @@ -12,7 +12,6 @@ if (!defined('e107_INIT')) { exit; } /* if(defined('ADMIN_PAGE') && ADMIN_PAGE === true) { - include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"); // $config_category = NT_LAN_CB_1; // $config_events = array('cboxpost' => NT_LAN_CB_2); } @@ -21,7 +20,6 @@ if(defined('ADMIN_PAGE') && ADMIN_PAGE === true) if (!function_exists('notify_cboxpost')) { function notify_cboxpost($data) { global $nt; - include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"); $message = NT_LAN_CB_3.': '.USERNAME.' ('.NT_LAN_CB_4.': '.e107::getIPHandler()->ipDecode($data['ip']).' )
'; $message .= NT_LAN_CB_5.':
'.$data['cmessage'].'

'; $nt -> send('cboxpost', NT_LAN_CB_6, $message); @@ -30,13 +28,11 @@ if (!function_exists('notify_cboxpost')) { */ - // v2.x Standard class chatbox_menu_notify extends notify // plugin-folder + '_notify' { function config() { - //include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"); Use English_global.php instead. $config = array(); @@ -51,7 +47,6 @@ class chatbox_menu_notify extends notify // plugin-folder + '_notify' function cboxpost($data) { - //include_lan(e_PLUGIN."chatbox_menu/languages/".e_LANGUAGE."/".e_LANGUAGE.".php"); // Use English_global.php instead. $message = NT_LAN_CB_3.': '.USERNAME.' ('.NT_LAN_CB_4.': '.e107::getIPHandler()->ipDecode($data['ip']).' )
'; $message .= NT_LAN_CB_5.':
'.$data['cmessage'].'

'; diff --git a/e107_plugins/clock_menu/clock_menu.php b/e107_plugins/clock_menu/clock_menu.php index a6c25e492..df566c93e 100644 --- a/e107_plugins/clock_menu/clock_menu.php +++ b/e107_plugins/clock_menu/clock_menu.php @@ -15,27 +15,14 @@ | | Released under the terms and conditions of the | GNU General Public License (http://gnu.org). -| -| $Source: /cvs_backup/e107_0.8/e107_plugins/clock_menu/clock_menu.php,v $ -| $Revision$ -| $Date$ -| $Author$ +---------------------------------------------------------------+ */ -/** - * e107 Clock display menu plugin - * - * Handles the display of a clock/calendar in a menu - * - * @package e107_plugins - * @subpackage clock - * @version $Id$; - */ - //FIXME looks pretty much to be 0.6 compatible if (!defined('e107_INIT')) { exit(); } -include_lan(e_PLUGIN.'/clock_menu/languages/'.e_LANGUAGE.'.php'); + +e107::lan('clock_menu',e_LANGUAGE); + $menu_pref = e107::getConfig('menu')->getPref(''); $indexArray = array('clock_dateprefix','clock_format','clock_datesuffix1','clock_datesuffix2','clock_datesuffix3','clock_datesuffix4'); diff --git a/e107_plugins/download/admin_download.php b/e107_plugins/download/admin_download.php index e792287a2..bdf9c53a2 100644 --- a/e107_plugins/download/admin_download.php +++ b/e107_plugins/download/admin_download.php @@ -24,8 +24,11 @@ if (!getperms("P") || !plugInstalled('download')) exit() ; } -include_lan(e_PLUGIN.'download/languages/'.e_LANGUAGE.'/download.php'); -include_lan(e_PLUGIN.'download/languages/'.e_LANGUAGE.'/admin_download.php'); + +e107::lan('download','download'); // e_PLUGIN.'download/languages/'.e_LANGUAGE.'/download.php' +e107::lan('download','admin_download'); // e_PLUGIN.'download/languages/'.e_LANGUAGE.'/admin_download.php' + + // require_once(e_PLUGIN.'download/handlers/adminDownload_class.php'); require_once(e_PLUGIN.'download/handlers/download_class.php'); require_once(e_HANDLER.'upload_handler.php'); diff --git a/e107_plugins/download/download.php b/e107_plugins/download/download.php index b11dceb48..db5563d9a 100644 --- a/e107_plugins/download/download.php +++ b/e107_plugins/download/download.php @@ -18,7 +18,7 @@ if (!e107::isInstalled('download')) header("location:".e_BASE."index.php"); } - include_lan(e_PLUGIN.'download/languages/'.e_LANGUAGE.'/download.php'); + e107::lan('download','download'); // Loads e_PLUGIN.'download/languages/'.e_LANGUAGE.'/download.php' require_once(e_PLUGIN.'download/handlers/download_class.php'); require_once(e_PLUGIN.'download/handlers/category_class.php'); diff --git a/e107_plugins/download/e_cron.php b/e107_plugins/download/e_cron.php index 3dd3b62a6..3ad150844 100644 --- a/e107_plugins/download/e_cron.php +++ b/e107_plugins/download/e_cron.php @@ -22,8 +22,6 @@ class download_cron // include plugin-folder in the name. { function config() { - include_lan(e_PLUGIN."download/languages/".e_LANGUAGE."/admin_download.php"); - $cron = array(); $cron[] = array( @@ -41,7 +39,7 @@ class download_cron // include plugin-folder in the name. function pruneLog() { // Whatever code you wish. - e107::getMessage()->add("Executed dummy function within gsitemap/e_cron.php"); + e107::getMessage()->add("Executed dummy function within download/e_cron.php"); return ; } diff --git a/e107_plugins/download/request.php b/e107_plugins/download/request.php index 506dde8a4..cf1160107 100644 --- a/e107_plugins/download/request.php +++ b/e107_plugins/download/request.php @@ -4,7 +4,10 @@ if (!defined('e107_INIT')) require_once("../../class2.php"); } -include_lan(e_PLUGIN."download/languages/".e_LANGUAGE."/download.php"); + +e107::lan('download','download'); + + $log = e107::getAdminLog(); $id = FALSE; @@ -256,6 +259,10 @@ if ($type == "file") exit(); } } + + + $log->addError("Line".__LINE__.": Couldn't find ".e_DOWNLOAD.e_QUERY); + $log->toFile('download_requests','Download Requests', true); // Create a log file and add the log messages require_once(HEADERF); $ns -> tablerender(LAN_dl_61, "
".LAN_dl_65."

".LAN_dl_64."
"); require_once(FOOTERF); diff --git a/e107_plugins/faqs/faqs.php b/e107_plugins/faqs/faqs.php index 3ef923f65..a60bd6b1d 100644 --- a/e107_plugins/faqs/faqs.php +++ b/e107_plugins/faqs/faqs.php @@ -22,7 +22,7 @@ $url = e107::getUrl()->create('faqs/list/all', false, 'full=1&noencode=1'); header('Location: '.$url); exit; -include_lan(e_PLUGIN."faqs/languages/".e_LANGUAGE."/".e_LANGUAGE."_front.php"); +incluXXXde_lan(e_PLUGIN."faqs/languages/".e_LANGUAGE."/".e_LANGUAGE."_front.php"); require_once (e_HANDLER."form_handler.php"); diff --git a/e107_plugins/import/admin_import.php b/e107_plugins/import/admin_import.php index 08a93a4e8..b18f63bd1 100644 --- a/e107_plugins/import/admin_import.php +++ b/e107_plugins/import/admin_import.php @@ -40,9 +40,8 @@ require_once("../../class2.php"); $frm = e107::getForm(); $mes = e107::getMessage(); -include_lan(e_PLUGIN.'import/languages/'.e_LANGUAGE.'_admin_import.php'); - +//e107::lan('import',e_LANGUAGE.'_admin_import.php'); //XXX A Fresh Start class import_admin extends e_admin_dispatcher diff --git a/e107_plugins/linkwords/admin_config.php b/e107_plugins/linkwords/admin_config.php index ca6b4b15e..7837bce9d 100644 --- a/e107_plugins/linkwords/admin_config.php +++ b/e107_plugins/linkwords/admin_config.php @@ -17,7 +17,9 @@ if (!getperms('P') || !e107::isInstalled('linkwords')) exit ; } require_once(e_ADMIN.'auth.php'); -include_lan(e_PLUGIN.'linkwords/languages/'.e_LANGUAGE.'_admin_linkwords.php'); + +e107::lan('linkwords', e_LANGUAGE."_admin_linkwords.php"); // e_PLUGIN.'linkwords/languages/'.e_LANGUAGE.'_admin_linkwords.php' + define('LW_CACHE_TAG', 'nomd5_linkwords'); diff --git a/e107_plugins/linkwords/e_help.php b/e107_plugins/linkwords/e_help.php index 88b23c382..d94ccb6fd 100644 --- a/e107_plugins/linkwords/e_help.php +++ b/e107_plugins/linkwords/e_help.php @@ -25,7 +25,8 @@ if (!defined('e107_INIT')) { exit; } -include_lan(e_PLUGIN."linkwords/languages/".e_LANGUAGE."_admin_linkwords.php"); + +e107::lan('linkwords',e_LANGUAGE."_admin_linkwords.php"); if (e_QUERY) list($action,$junk) = explode('.',e_QUERY.'.'); else $action = 'words'; diff --git a/e107_plugins/linkwords/linkwords.php b/e107_plugins/linkwords/linkwords.php index 3ca9ca899..2a33c20bd 100644 --- a/e107_plugins/linkwords/linkwords.php +++ b/e107_plugins/linkwords/linkwords.php @@ -32,7 +32,9 @@ class e_linkwords global $pref, $admin_log; /* constructor */ // Do an auto-update on the variable used to hook parsers - so we should only be called once - include_lan(e_PLUGIN."linkwords/languages/".e_LANGUAGE.".php"); + + e107::lan('linkwords',e_LANGUAGE); // e_PLUGIN."linkwords/languages/".e_LANGUAGE.".php" + $hooks = explode(",",$pref['tohtml_hook']); if (($key=array_search('linkwords',$hooks)) !== FALSE) { diff --git a/e107_plugins/pdf/plugin.xml b/e107_plugins/pdf/plugin.xml index 9b96a83b9..52c72a5a9 100644 --- a/e107_plugins/pdf/plugin.xml +++ b/e107_plugins/pdf/plugin.xml @@ -1,5 +1,5 @@ - + PDF creation support using TCPDF. Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt) diff --git a/e107_plugins/trackback/plugin.xml b/e107_plugins/trackback/plugin.xml index 222c9ea72..b2ff26f07 100644 --- a/e107_plugins/trackback/plugin.xml +++ b/e107_plugins/trackback/plugin.xml @@ -1,5 +1,5 @@ - + This plugin enables you to use trackback in your news posts. Copyright e107 Inc e107.org, Licensed under GPL (http://www.gnu.org/licenses/gpl.txt)