Consistent use of URL::site()

This commit is contained in:
Deon George 2011-10-07 12:00:34 +11:00
parent be00deede7
commit 0f45467ec8
4 changed files with 6 additions and 6 deletions

View File

@ -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']),
)
);
}

View File

@ -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 <span class="ajaxmsg">%s<\/span>...',HTML::image('media/img/ajax-progress.gif',array('alt'=>_('Loading Login').'...')),_('Loading Login')).'\');return true;});
});'
));

View File

@ -1,6 +1,6 @@
<tr>
<td>
<a href="<?php echo URL::site(sprintf('/admin/group/edit/%s',$group->id)); ?>"><?php echo $group->display('name'); ?></a>
<a href="<?php echo URL::site(sprintf('admin/group/edit/%s',$group->id)); ?>"><?php echo $group->display('name'); ?></a>
</td>
<td><?php echo $group->display('notes'); ?></td>
<td><?php echo $group->display('status'); ?></td>

View File

@ -1,4 +1,4 @@
<tr>
<td><a href="<?php echo URL::site(sprintf('/admin/email/templateedit/%s',$template->id)); ?>" alt=""><?php echo $template->name; ?></a></td>
<td><a href="<?php echo URL::site('admin/email/templateedit/'.$template->id); ?>" alt=""><?php echo $template->name; ?></a></td>
<td><?php echo $template->display('active'); ?></td>
</tr>