Module: website Branch: master Commit: 30ef8f0f5623766b1f62f084d14da499922314d7 URL: http://source.winehq.org/git/website.git/?a=commit;h=30ef8f0f5623766b1f62f08...
Author: Jeremy Newman jnewman@codeweavers.com Date: Wed May 4 10:45:59 2011 -0500
plugin updates, no longer need to load globals (now autoloaded), params array moved to $_PLUGIN
---
include/plugins/announce.php | 3 --- include/plugins/language.php | 4 +--- include/plugins/news.php | 3 --- include/plugins/register.php | 6 ++---- include/plugins/wwn.php | 5 +---- 5 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/include/plugins/announce.php b/include/plugins/announce.php index 29b6932..a243475 100644 --- a/include/plugins/announce.php +++ b/include/plugins/announce.php @@ -7,9 +7,6 @@ Vince C. v_cadet@yahoo.fr (back-reference in 'changes' section) */
-// import global objects -global $html, $config; - // ver from URL $ver = PAGE_PARAMS;
diff --git a/include/plugins/language.php b/include/plugins/language.php index c4e19bd..dc8da6f 100644 --- a/include/plugins/language.php +++ b/include/plugins/language.php @@ -6,9 +6,7 @@ by Jeremy Newman jnewman@codeweavers.com */
-global $html, $config, $data; - -switch ($this->params['cmd']) +switch ($_PLUGIN['cmd']) { // list languages case "list": diff --git a/include/plugins/news.php b/include/plugins/news.php index f910a70..ec44525 100644 --- a/include/plugins/news.php +++ b/include/plugins/news.php @@ -6,9 +6,6 @@ by Jeremy Newman jnewman@codeweavers.com */
-// import globals -global $html, $config; - // language override if ($_GET['lang'] and in_array($_GET['lang'], $config->languages)) $html->lang = $_GET['lang']; diff --git a/include/plugins/register.php b/include/plugins/register.php index ce25906..6629067 100644 --- a/include/plugins/register.php +++ b/include/plugins/register.php @@ -5,13 +5,11 @@ by Jeremy Newman jnewman@codeweavers.com */
-global $config, $html; - // form var -$form =& $this->params['form']; +$form =& $_PLUGIN['form'];
// dbfile -$db_file = $html->_file_root.'/data/'.$this->params['db'].'.txt'; +$db_file = "{$html->_file_root}/data/{$_PLUGIN['db']}.txt";
// main if (isset($_GET['done'])) diff --git a/include/plugins/wwn.php b/include/plugins/wwn.php index 5f57467..a37077a 100644 --- a/include/plugins/wwn.php +++ b/include/plugins/wwn.php @@ -6,15 +6,12 @@ by Jeremy Newman jnewman@codeweavers.com */
-// import globals -global $html, $config; - // load wwn object check_and_require("wwn"); $wwn = new wwn();
// change display mased on mode -switch ($this->params['mode']) +switch ($_PLUGIN['mode']) { // interviews case "interviews":