]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
accept replyto for fancy newnotice URL
[quix0rs-gnu-social.git] / lib / util.php
index 1639457e0eb48944ed212e72c4ecea96998dad58..1a83f0fffa9a140d058ab2643115c8be442088e9 100644 (file)
@@ -451,7 +451,7 @@ function common_ensure_session() {
 # 3) NULL to clear
 
 function common_set_user($user) {
-       if (is_null($nickname) && common_have_session()) {
+       if (is_null($user) && common_have_session()) {
                unset($_SESSION['userid']);
                return true;
        } else if (is_string($user)) {
@@ -730,7 +730,11 @@ function common_fancy_url($action, $args=NULL) {
         case 'openidsettings':
                return common_path('settings/openid');
         case 'newnotice':
-               return common_path('notice/new');
+               if ($args && $args['replyto']) {
+                       return common_path('notice/new?replyto='.$args['replyto']);
+               } else {
+                       return common_path('notice/new');
+               }
         case 'shownotice':
                return common_path('notice/'.$args['notice']);
         case 'xrds':