]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Squashed commit of the following:
authorEvan Prodromou <evan@status.net>
Mon, 13 Aug 2012 18:33:19 +0000 (14:33 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 13 Aug 2012 18:33:58 +0000 (14:33 -0400)
commit 2b9bce9ef8f6cf55b7ac62231bcc0173260ba472
Merge: 3ba4f24 12b680e
Author: Evan Prodromou <evan@status.net>
Date:   Mon Aug 13 14:31:46 2012 -0400

    Merge commit 'refs/merge-requests/207' of git://gitorious.org/statusnet/mainline into merge-requests/207

commit 12b680e375db9de01cac77dd9a71adb729292dc7
Author: Mikael Nordfeldth <mmn@hethane.se>
Date:   Fri Aug 10 20:49:52 2012 +0200

    testing whether $user is predefined before otherwise setting it to common_current_user()

lib/util.php

index a061d17739356cc0bc9643a39bec2106513b7efb..4a87f9a2171e16d579b541a3a0bdb723d6aa7b27 100644 (file)
@@ -1040,7 +1040,9 @@ function common_linkify($url) {
  */
 function common_shorten_links($text, $always = false, User $user=null)
 {
-    $user = common_current_user();
+    if ($user === null) {
+        $user = common_current_user();
+    }
 
     $maxLength = User_urlshortener_prefs::maxNoticeLength($user);