summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-14 23:50:12 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-14 23:50:12 -0400
commit83e303fe270fa86fc0a289cf141a103f5bfd3787 (patch)
tree7cbb059135b2b397c8a7574505d0b61c5b6c0788 /lib
parent16e7e96a5ff6419869a5def21e10bb11130e626d (diff)
fancy URLs should remember page
darcs-hash:20080615035012-84dde-0450954528a270f46a4ac5d2b077af793ba8c1f3.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/settingsaction.php14
-rw-r--r--lib/util.php23
2 files changed, 32 insertions, 5 deletions
diff --git a/lib/settingsaction.php b/lib/settingsaction.php
index 8f3b1e6be..0255fc642 100644
--- a/lib/settingsaction.php
+++ b/lib/settingsaction.php
@@ -64,6 +64,20 @@ class SettingsAction extends Action {
_t('Password'),
_t('Change your password'),
$action == 'password');
+ if (false) {
+ common_menu_item(common_local_url('emailsettings'),
+ _t('Email'),
+ _t('Address and preferences'),
+ $action == 'emailsettings');
+ common_menu_item(common_local_url('imsettings'),
+ _t('IM'),
+ _t('Notifications by instant messenger'),
+ $action == 'imsettings');
+ common_menu_item(common_local_url('phonesettings'),
+ _t('Phone'),
+ _t('Notifications by phone'),
+ $action == 'phonesettings');
+ }
common_element_end('ul');
}
}
diff --git a/lib/util.php b/lib/util.php
index ff992141e..1c6bbaf16 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -509,7 +509,11 @@ function common_local_url($action, $args=NULL) {
function common_fancy_url($action, $args=NULL) {
switch (strtolower($action)) {
case 'public':
- return common_path('');
+ if ($args && $args['page']) {
+ return common_path('?page=' . $args['page']);
+ } else {
+ return common_path('');
+ }
case 'publicrss':
return common_path('rss');
case 'doc':
@@ -529,18 +533,27 @@ function common_fancy_url($action, $args=NULL) {
return common_path('notice/new');
case 'shownotice':
return common_path('notice/'.$args['notice']);
- case 'subscriptions':
- case 'subscribed':
case 'xrds':
- case 'all':
case 'foaf':
return common_path($args['nickname'].'/'.$action);
+ case 'subscriptions':
+ case 'subscribed':
+ case 'all':
+ if ($args && $args['page']) {
+ return common_path($args['nickname'].'/'.$action.'?page=' . $args['page']);
+ } else {
+ return common_path($args['nickname'].'/'.$action);
+ }
case 'allrss':
return common_path($args['nickname'].'/all/rss');
case 'userrss':
return common_path($args['nickname'].'/rss');
case 'showstream':
- return common_path($args['nickname']);
+ if ($args && $args['page']) {
+ return common_path($args['nickname'].'?page=' . $args['page']);
+ } else {
+ return common_path($args['nickname']);
+ }
default:
return common_simple_url($action, $args);
}