Skip to content

Commit

Permalink
Fixing clean url
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedol committed Jun 8, 2010
1 parent 0dd4710 commit 527f493
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.*swp
.htaccess
*~
application/logs/*
application/cache/*
Expand Down
2 changes: 1 addition & 1 deletion application/views/alerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</div>
<input id="btn-send-alerts" class="btn_submit" type="submit" value="<?php echo Kohana::lang('ui_main.alerts_btn_send'); ?>" />
<BR /><BR />
<a href="<?php echo url::base()."alerts/confirm";?>"><?php echo Kohana::lang('ui_main.alert_confirm_previous'); ?></a>
<a href="<?php echo url::site()."alerts/confirm";?>"><?php echo Kohana::lang('ui_main.alert_confirm_previous'); ?></a>
</div>
<?php print form::close(); ?>
<?php
Expand Down
2 changes: 1 addition & 1 deletion application/views/alerts_confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<!-- Return -->
<div class="green-box">
<div class="alert_response">
<a href="<?php echo url::base().'alerts'?>">
<a href="<?php echo url::site().'alerts'?>">
<?php echo Kohana::lang('alerts.create_more_alerts'); ?>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion application/views/feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<input type="checkbox" checked="checked" readonly="readonly" />
<span><?php echo Kohana::lang('ui_main.alerts_rss'); ?></span>
</label>
<span><input type="text" value="<?php echo url::base()?>" readonly="readonly" /></span>
<span><input type="text" value="<?php echo url::site()?>" readonly="readonly" /></span>
</div>
<?php
}
Expand Down
10 changes: 5 additions & 5 deletions application/views/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
<!-- footer menu -->
<div class="footermenu">
<ul class="clearingfix">
<li><a class="item1" href="<?php echo url::base() ?>"><?php echo Kohana::lang('ui_main.home'); ?></a></li>
<li><a href="<?php echo url::base() . "reports/submit" ?>"><?php echo Kohana::lang('ui_main.report_an_incident'); ?></a></li>
<li><a href="<?php echo url::base() . "alerts" ?>"><?php echo Kohana::lang('ui_main.alerts'); ?></a></li>
<li><a href="<?php echo url::base() . "help" ?>"><?php echo Kohana::lang('ui_main.help'); ?></a></li>
<li><a class="item1" href="<?php echo url::site() ?>"><?php echo Kohana::lang('ui_main.home'); ?></a></li>
<li><a href="<?php echo url::site() . "reports/submit" ?>"><?php echo Kohana::lang('ui_main.report_an_incident'); ?></a></li>
<li><a href="<?php echo url::site() . "alerts" ?>"><?php echo Kohana::lang('ui_main.alerts'); ?></a></li>
<li><a href="<?php echo url::site() . "help" ?>"><?php echo Kohana::lang('ui_main.help'); ?></a></li>
<li><a href="#"><?php echo Kohana::lang('ui_main.about'); ?></a></li>
<li><a href="#"><?php echo Kohana::lang('ui_main.contact'); ?></a></li>
<li><a href="#"><?php echo Kohana::lang('ui_main.blog'); ?></a></li>
Expand All @@ -61,7 +61,7 @@
<?php echo $google_analytics; ?>

<!-- Task Scheduler -->
<img src="<?php echo url::base() . 'scheduler'; ?>" height="1" width="1" border="0" />
<img src="<?php echo url::site() . 'scheduler'; ?>" height="1" width="1" border="0" />

<!-- script for share button -->
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pub=ushahidi"></script>
Expand Down
18 changes: 9 additions & 9 deletions application/views/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@

<!-- searchform -->
<div class="search-form">
<form method="get" id="search" action="<?php echo url::base() . 'search/'; ?>">
<form method="get" id="search" action="<?php echo url::site() . 'search/'; ?>">
<ul>
<li><input type="text" name="k" value="" class="text" /></li>
<li><input type="submit" name="b" class="searchbtn" value="search" /></li>
Expand All @@ -162,7 +162,7 @@

<!-- submit incident -->
<div class="submit-incident clearingfix">
<a href="<?php echo url::base() . "reports/submit" ?>"><?php echo Kohana::lang('ui_main.submit'); ?></a>
<a href="<?php echo url::site() . "reports/submit" ?>"><?php echo Kohana::lang('ui_main.submit'); ?></a>
</div>
<!-- / submit incident -->
</div>
Expand All @@ -175,32 +175,32 @@
<!-- mainmenu -->
<div id="mainmenu" class="clearingfix">
<ul>
<li><a href="<?php echo url::base() . "main" ?>" <?php if ($this_page == 'home') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.home'); ?></a></li>
<li><a href="<?php echo url::base() . "reports" ?>" <?php if ($this_page == 'reports') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.reports'); ?></a></li>
<li><a href="<?php echo url::base() . "reports/submit" ?>" <?php if ($this_page == 'reports_submit') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.submit'); ?></a></li>
<li><a href="<?php echo url::base() . "alerts" ?>" <?php if ($this_page == 'alerts') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.alerts'); ?></a></li>
<li><a href="<?php echo url::site() . "main" ?>" <?php if ($this_page == 'home') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.home'); ?></a></li>
<li><a href="<?php echo url::site() . "reports" ?>" <?php if ($this_page == 'reports') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.reports'); ?></a></li>
<li><a href="<?php echo url::site() . "reports/submit" ?>" <?php if ($this_page == 'reports_submit') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.submit'); ?></a></li>
<li><a href="<?php echo url::site() . "alerts" ?>" <?php if ($this_page == 'alerts') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.alerts'); ?></a></li>
<?php
// Contact Page
if ($site_contact_page)
{
?>
<li><a href="<?php echo url::base() . "contact" ?>" <?php if ($this_page == 'contact') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.contact'); ?></a></li>
<li><a href="<?php echo url::site() . "contact" ?>" <?php if ($this_page == 'contact') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.contact'); ?></a></li>
<?php
}

// Help Page
if ($site_help_page)
{
?>
<li><a href="<?php echo url::base() . "help" ?>" <?php if ($this_page == 'help') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.help'); ?></a></li>
<li><a href="<?php echo url::site() . "help" ?>" <?php if ($this_page == 'help') echo 'class="active"'; ?>><?php echo Kohana::lang('ui_main.help'); ?></a></li>
<?php
}

// Custom Pages
foreach ($pages as $page)
{
$this_active = ($this_page == 'page_'.$page->id) ? 'class="active"' : '';
echo "<li><a href=\"".url::base()."page/index/".$page->id."\" ".$this_active.">".$page->page_tab."</a></li>";
echo "<li><a href=\"".url::site()."page/index/".$page->id."\" ".$this_active.">".$page->page_tab."</a></li>";
}
?>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion application/views/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
$organization_description = text::limit_chars($organization_description, 150, "...", true);

echo "<div class=\"org_row1\">";
echo " <h3><a href=\"" . url::base() . "help/view/" . $organization_id . "\">" . $organization_name . "</a></h3>";
echo " <h3><a href=\"" . url::site() . "help/view/" . $organization_id . "\">" . $organization_name . "</a></h3>";
echo $organization_description;
echo "</div>";
}
Expand Down
2 changes: 1 addition & 1 deletion application/views/help_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
</ul>
<br />
<br />
<input class="btn_gray" type="button" value="Back" onclick="location.href='<?php echo url::base() . 'help/'; ?>';" />
<input class="btn_gray" type="button" value="Back" onclick="location.href='<?php echo url::site() . 'help/'; ?>';" />
</div>
<?php print form::close(); ?>
</div>
Expand Down
8 changes: 4 additions & 4 deletions application/views/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
echo " or ";
}
} ?></li><?php } ?>
<li><a href="<?php echo url::base() . 'reports/submit/'; ?>"><?php echo Kohana::lang('ui_main.report_option_4'); ?></a></li>
<li><a href="<?php echo url::site() . 'reports/submit/'; ?>"><?php echo Kohana::lang('ui_main.report_option_4'); ?></a></li>
</ol>

</div>
Expand Down Expand Up @@ -215,7 +215,7 @@
$incident_location = $incident->location->location_name;
?>
<tr>
<td><a href="<?php echo url::base() . 'reports/view/' . $incident_id; ?>"> <?php echo $incident_title ?></a></td>
<td><a href="<?php echo url::site() . 'reports/view/' . $incident_id; ?>"> <?php echo $incident_title ?></a></td>
<td><?php echo $incident_location ?></td>
<td><?php echo $incident_date; ?></td>
</tr>
Expand All @@ -225,7 +225,7 @@

</tbody>
</table>
<a class="more" href="<?php echo url::base() . 'reports/' ?>">View More...</a>
<a class="more" href="<?php echo url::site() . 'reports/' ?>">View More...</a>
</div>
<!-- / left content block -->

Expand Down Expand Up @@ -260,7 +260,7 @@
?>
</tbody>
</table>
<a class="more" href="<?php echo url::base() . 'feeds' ?>">View More...</a>
<a class="more" href="<?php echo url::site() . 'feeds' ?>">View More...</a>
</div>
<!-- / right content block -->

Expand Down
2 changes: 1 addition & 1 deletion application/views/main_3d_js.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function initCB(instance) {
ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, true);

var link = ge.createLink('');
var href = '<?php echo url::base(); ?>api/?task=3dkml'
var href = '<?php echo url::site(); ?>api/?task=3dkml'
link.setHref(href);

var networkLink = ge.createNetworkLink('');
Expand Down
4 changes: 2 additions & 2 deletions application/views/main_js.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
currentCat = catID;
$("#currentCat").val(catID);
// setUrl not supported with Cluster Strategy
//markers.setUrl("<?php echo url::base(); ?>" json_url + '/?c=' + catID);
//markers.setUrl("<?php echo url::site(); ?>" json_url + '/?c=' + catID);

// Destroy any open popups
onPopupClose();
Expand Down Expand Up @@ -322,7 +322,7 @@
$(this).addClass('active');
gTimeline = $.timeline({categoryId: gCategoryId, startTime: startTime,
endTime: endTime, mediaType: gMediaType,
url: "<?php echo url::base(); ?>json_url+'/timeline/'"
url: "<?php echo url::site(); ?>json_url+'/timeline/'"
});
gTimeline.plot();
});
Expand Down
8 changes: 4 additions & 4 deletions application/views/messages_laconica.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
?>
<div class="bg">
<h2><?php echo $title; ?> <a href="<?php print url::base() ?>admin/messages">SMS</a> <a href="<?php print url::base() ?>admin/messages/twitter">Twitter</a> <a href="<?php print url::base() ?>admin/messages/laconica">Laconica</a> </h2>
<h2><?php echo $title; ?> <a href="<?php print url::site() ?>admin/messages">SMS</a> <a href="<?php print url::site() ?>admin/messages/twitter">Twitter</a> <a href="<?php print url::site() ?>admin/messages/laconica">Laconica</a> </h2>
<!-- tabs -->
<div class="tabs">
<!-- tabset -->
Expand Down Expand Up @@ -108,15 +108,15 @@
<ul>
<?php
if ($incident_id != 0) {
echo "<li class=\"none-separator\"><a href=\"". url::base() . 'admin/reports/edit/' . $incident_id ."\" class=\"status_yes\"><strong>View Report</strong></a></li>";
echo "<li class=\"none-separator\"><a href=\"". url::site() . 'admin/reports/edit/' . $incident_id ."\" class=\"status_yes\"><strong>View Report</strong></a></li>";
}
else
{
echo "<li class=\"none-separator\"><a href=\"". url::base() . 'admin/reports/edit?tid=' . $laconica_mesg_id ."\">Create Report?</a></li>";
echo "<li class=\"none-separator\"><a href=\"". url::site() . 'admin/reports/edit?tid=' . $laconica_mesg_id ."\">Create Report?</a></li>";
}
?>
<li>
<!-- <a href="<?php echo url::base().'admin/messages/delete/'.$laconica_mesg_id ?>" onclick="return confirm('Delete cannot be undone. Are you sure you want to continue?')" class="del">Delete</a> --></li>
<!-- <a href="<?php echo url::site().'admin/messages/delete/'.$laconica_mesg_id ?>" onclick="return confirm('Delete cannot be undone. Are you sure you want to continue?')" class="del">Delete</a> --></li>
</ul>
</td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions application/views/mhi.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
<div class="twocol-right">
<h2 class="title-lead-in">Use Ushahidi to CROWDSOURCE and VISUALIZE information.</h2>
<p class="sub-title">Nothing to install, minimum configuration.</p>
<p><a class="button btn_sign-up" href="<?php echo url::base()."mhi/signup" ?>">Sign Up Now!</a></p>
<p><a class="button btn_sign-up" href="<?php echo url::site()."mhi/signup" ?>">Sign Up Now!</a></p>

<div class="footer-links">
<ul>
<li class="first"><a href="<?php echo url::base() ?>mhi/about">About</a></li>
<li class="first"><a href="<?php echo url::site() ?>mhi/about">About</a></li>
<li><a href="#">Contact Us</a></li>
<li class="regular">Copyright &copy; <?php echo date('Y'); ?> Ushahidi</li>
</ul>
Expand Down
10 changes: 5 additions & 5 deletions application/views/mhi_account.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

<h3>Account Settings</h3>

<a href="<?php echo url::base() ?>mhi/logout"><?php echo Kohana::lang('ui_admin.logout');?></a>
<a href="<?php echo url::site() ?>mhi/logout"><?php echo Kohana::lang('ui_admin.logout');?></a>

<a href="<?php echo url::base() ?>mhi/signup">Create New Instance</a>
<a href="<?php echo url::site() ?>mhi/signup">Create New Instance</a>

<a href="<?php echo url::base() ?>mhi/account">Account Settings</a>
<a href="<?php echo url::site() ?>mhi/account">Account Settings</a>

<a href="<?php echo url::base() ?>mhi/account">Your Sites</a>
<a href="<?php echo url::site() ?>mhi/account">Your Sites</a>

<?php print form::open(url::base().'mhi/account', array('id' => 'frm-MHI-Account', 'name' => 'frm-MHI-Account', 'class' => 'frm-content')); ?>
<?php print form::open(url::site().'mhi/account', array('id' => 'frm-MHI-Account', 'name' => 'frm-MHI-Account', 'class' => 'frm-content')); ?>

<table><tbody>

Expand Down
2 changes: 1 addition & 1 deletion application/views/mhi_create.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<h3>Site Setup Successful</h3>

<p>Site setup. <a href="<?php echo url::base() ?>mhi/manage">Manage your account.</a>.</p>
<p>Site setup. <a href="<?php echo url::site() ?>mhi/manage">Manage your account.</a>.</p>

</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions application/views/mhi_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
<body class="<?php echo $this_body; ?> content">
<div id="header">
<div id="header-wrapper">
<h1><a href="<?php echo url::base() ?>mhi/">Ushahidi</a></h1>
<h1><a href="<?php echo url::site() ?>mhi/">Ushahidi</a></h1>
<ul class="primary-nav">
<li><a href="<?php echo url::base() ?>mhi/features"<?php if($this_body == 'mhi-features') { ?> class="active" <?php } ?>>Features</a></li>
<li><a href="<?php echo url::base() ?>mhi/about"<?php if($this_body == 'mhi-about') { ?> class="active" <?php } ?>>About</a></li>
<li><a href="<?php echo url::site() ?>mhi/features"<?php if($this_body == 'mhi-features') { ?> class="active" <?php } ?>>Features</a></li>
<li><a href="<?php echo url::site() ?>mhi/about"<?php if($this_body == 'mhi-about') { ?> class="active" <?php } ?>>About</a></li>
<li><a class="contact.html" href="#">Contact Us</a></li>
</ul>
<div id="login-box">
<?php
if($mhi_user_id)
{
?>
<p>You are logged in.<a class="sign-in rounded" href="<?php echo url::base() ?>mhi/logout">Log Out </a></p>
<p>You are logged in.<a class="sign-in rounded" href="<?php echo url::site() ?>mhi/logout">Log Out </a></p>
<?php
}else{
?>
Expand Down
8 changes: 4 additions & 4 deletions application/views/mhi_manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

<h3>Your Sites</h3>

<a href="<?php echo url::base() ?>mhi/logout"><?php echo Kohana::lang('ui_admin.logout');?></a>
<a href="<?php echo url::site() ?>mhi/logout"><?php echo Kohana::lang('ui_admin.logout');?></a>

<a href="<?php echo url::base() ?>mhi/signup">Create New Instance</a>
<a href="<?php echo url::site() ?>mhi/signup">Create New Instance</a>

<a href="<?php echo url::base() ?>mhi/account">Account Settings</a>
<a href="<?php echo url::site() ?>mhi/account">Account Settings</a>

<a href="<?php echo url::base() ?>mhi/account">Your Sites</a>
<a href="<?php echo url::site() ?>mhi/account">Your Sites</a>

<table><tbody>
<?php foreach($sites as $site) { ?>
Expand Down
2 changes: 1 addition & 1 deletion application/views/mhi_signup.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<h3>Create New Instance</h3>

<p>Fill out the form below to set up your own instance of <?php echo $site_name; ?>.
<?php print form::open(url::base().'mhi/create', array('id' => 'frm-MHI-Signup', 'name' => 'frm-MHI-Signup', 'class' => 'frm-content')); ?>
<?php print form::open(url::site().'mhi/create', array('id' => 'frm-MHI-Signup', 'name' => 'frm-MHI-Signup', 'class' => 'frm-content')); ?>

<?php if($logged_in == FALSE){ ?>

Expand Down
2 changes: 1 addition & 1 deletion application/views/reports.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</div>

<div class="report_details report_col2">
<h3><a href="<?php echo url::base(); ?>reports/view/<?php echo $incident_id; ?>"><?php echo $incident_title; ?></a></h3>
<h3><a href="<?php echo url::site(); ?>reports/view/<?php echo $incident_id; ?>"><?php echo $incident_title; ?></a></h3>
<?php echo $incident_description; ?>
</div>

Expand Down
2 changes: 1 addition & 1 deletion application/views/reports_submit_thanks.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<h3><?php echo Kohana::lang('ui_main.reports_submitted');?></h3>

<div class="thanks_msg"><a href="<?php echo
url::base().'reports' ?>"><?php echo Kohana::lang('ui_main.reports_return');?></a><br /><br /><br />
url::site().'reports' ?>"><?php echo Kohana::lang('ui_main.reports_return');?></a><br /><br /><br />
<?php echo Kohana::lang('ui_main.feedback_reports');?><br /><br />
<?php
print form::open('http://feedback.ushahidi.com/fillsurvey.php?sid=2', array('target'=>'_blank'));
Expand Down
6 changes: 3 additions & 3 deletions application/views/reports_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// If Admin is Logged In - Allow For Edit Link
if ($logged_in)
{
echo " [&nbsp;<a href=\"".url::base()."admin/reports/edit/".$incident_id."\">Edit</a>&nbsp;]";
echo " [&nbsp;<a href=\"".url::site()."admin/reports/edit/".$incident_id."\">Edit</a>&nbsp;]";
}
?></h1>
<ul class="details">
Expand All @@ -58,7 +58,7 @@
<?php
foreach($incident_category as $category)
{
echo "<a href=\"".url::base()."reports/?c=".$category->category->id."\">" .
echo "<a href=\"".url::site()."reports/?c=".$category->category->id."\">" .
$category->category->category_title . "</a>&nbsp;&nbsp;&nbsp;";
}
?>
Expand Down Expand Up @@ -188,7 +188,7 @@
foreach($incident_neighbors as $neighbor)
{
echo "<tr>";
echo "<td class=\"w-01\"><a href=\"" . url::base();
echo "<td class=\"w-01\"><a href=\"" . url::site();
echo "reports/view/" . $neighbor->id . "\">" . $neighbor->incident_title . "</a></td>";
echo "<td class=\"w-02\">" . $neighbor->location->location_name . "</td>";
echo "<td class=\"w-03\">" . date('M j Y', strtotime($neighbor->incident_date)) . "</td>";
Expand Down
4 changes: 2 additions & 2 deletions application/views/reports_view_js.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
});

// Create the single marker layer
var markers = new OpenLayers.Layer.GML("single report", "<?php echo url::base() . 'json/single/' . $incident_id; ?>",
var markers = new OpenLayers.Layer.GML("single report", "<?php echo url::site() . 'json/single/' . $incident_id; ?>",
{
format: OpenLayers.Format.GeoJSON,
projection: map.displayProjection,
Expand Down Expand Up @@ -221,7 +221,7 @@ function zoomToSelectedFeature(lon, lat, zoomfactor){
function rating(id,action,type,loader)
{
$('#' + loader).html('<img src="<?php echo url::base() . "media/img/loading_g.gif"; ?>">');
$.post("<?php echo url::base() . 'reports/rating/' ?>" + id, { action: action, type: type },
$.post("<?php echo url::site() . 'reports/rating/' ?>" + id, { action: action, type: type },
function(data){
if (data.status == 'saved'){
if (type == 'original') {
Expand Down

0 comments on commit 527f493

Please sign in to comment.