From 0f45467ec8763e71431c092197e3b87c9d15b8f0 Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 7 Oct 2011 12:00:34 +1100 Subject: [PATCH] Consistent use of URL::site() --- application/classes/controller/tree.php | 6 +++--- application/classes/controller/welcome.php | 2 +- application/views/module/admin/method_detail_body.php | 2 +- modules/email/views/email/admin/template/list_body.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/classes/controller/tree.php b/application/classes/controller/tree.php index f397bbbc..4b6cec70 100644 --- a/application/classes/controller/tree.php +++ b/application/classes/controller/tree.php @@ -57,9 +57,9 @@ class Controller_Tree extends Controller_lnApp_Tree { foreach ($methods as $id => $mmo) { if (preg_match('/_/',$mmo->name)) { list($mode,$action) = explode('_',$mmo->name); - $url = URL::site(sprintf('/%s/%s/%s',$mode,$mmo->module->name,$action)); + $url = URL::site(sprintf('%s/%s/%s',$mode,$mmo->module->name,$action)); } else { - $url = URL::site(sprintf('/%s/%s',$mmo->module->name,$mmo->name)); + $url = URL::site(sprintf('%s/%s',$mmo->module->name,$mmo->name)); } array_push($data,array( @@ -81,7 +81,7 @@ class Controller_Tree extends Controller_lnApp_Tree { 'attr'=>array('id'=>sprintf('B_%s',$branch['id'])), 'state'=>$branch['state'], 'data'=>array('title'=>$branch['name']), - 'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::site(sprintf('/%s/menu',$branch['name'])) : $branch['attr_href']), + 'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::site(sprintf('%s/menu',$branch['name'])) : $branch['attr_href']), ) ); } diff --git a/application/classes/controller/welcome.php b/application/classes/controller/welcome.php index 4000793f..965e76f7 100644 --- a/application/classes/controller/welcome.php +++ b/application/classes/controller/welcome.php @@ -25,7 +25,7 @@ class Controller_Welcome extends Controller_TemplateDefault { if (! Auth::instance()->logged_in()) { Script::add(array('type'=>'stdin','data'=>' $(document).ready(function() { - $("#ajxbody").click(function() {$("#ajBODY").load("'.URL::site('/login').'",null,function(x,s,r) {}); return false;}); + $("#ajxbody").click(function() {$("#ajBODY").load("'.URL::site('login').'",null,function(x,s,r) {}); return false;}); $("#ajBODY").ajaxSend(function() {$(this).html(\''.sprintf('%s %s<\/span>...',HTML::image('media/img/ajax-progress.gif',array('alt'=>_('Loading Login').'...')),_('Loading Login')).'\');return true;}); });' )); diff --git a/application/views/module/admin/method_detail_body.php b/application/views/module/admin/method_detail_body.php index 20546ce5..6dd67ba1 100644 --- a/application/views/module/admin/method_detail_body.php +++ b/application/views/module/admin/method_detail_body.php @@ -1,6 +1,6 @@ - display('name'); ?> + display('name'); ?> display('notes'); ?> display('status'); ?> diff --git a/modules/email/views/email/admin/template/list_body.php b/modules/email/views/email/admin/template/list_body.php index 60c03190..087fd3a5 100644 --- a/modules/email/views/email/admin/template/list_body.php +++ b/modules/email/views/email/admin/template/list_body.php @@ -1,4 +1,4 @@ - name; ?> + name; ?> display('active'); ?>