]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing
authorBrion Vibber <brion@pobox.com>
Fri, 9 Apr 2010 19:01:53 +0000 (12:01 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 9 Apr 2010 19:01:53 +0000 (12:01 -0700)
actions/groupmembers.php
actions/peopletag.php
actions/subscribers.php
scripts/strip_geo.php

index 6d0701239ffd26a56318b3fbc2353e837fbc6da8..54f1d8dcda748e8fb112c6042e9d4a14ac1f0ca7 100644 (file)
@@ -238,9 +238,13 @@ class GroupMemberListItem extends ProfileListItem
 
     function homepageAttributes()
     {
+        $aAttrs = parent::linkAttributes();
+
         if (common_config('nofollow', 'members')) {
             $aAttrs['rel'] = 'nofollow';
         }
+
+        return $aAttrs;
     }
 
     /**
index 456cc21c4c149446b5f16ac3d3d57a39816fae00..32652f75518f1a34ba548e574ccc062bfe88c5a5 100644 (file)
@@ -168,9 +168,13 @@ class PeopleTagListItem extends ProfileListItem
 
     function homepageAttributes()
     {
+        $aAttrs = parent::linkAttributes();
+
         if (common_config('nofollow', 'peopletag')) {
             $aAttrs['rel'] = 'nofollow';
         }
+
+        return $aAttrs;
     }
 }
 
index 6fdf43e2ccdd548855985172773f10e6e7b6a880..2845a498e991a0c7033f83fe002f09fd58e5376a 100644 (file)
@@ -181,8 +181,12 @@ class SubscribersListItem extends SubscriptionListItem
 
     function homepageAttributes()
     {
+        $aAttrs = parent::linkAttributes();
+
         if (common_config('nofollow', 'subscribers')) {
             $aAttrs['rel'] = 'nofollow';
         }
+
+        return $aAttrs;
     }
 }
index 010fb31f5484548ad25433f39d0b6b7ab6e94e98..b3f27be616a7b4b620d143c17784ace8cfc962e4 100755 (executable)
@@ -21,7 +21,7 @@
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
 
 $shortoptions = 'i::n::y';
-$longoptions = array('id=', 'nickname=', 'yes', 'dry-run');
+$longoptions = array('id=', 'nickname=', 'yes', 'dry-run', 'all');
 
 $helptext = <<<END_OF_HELP
 strip_geo.php [options]
@@ -31,6 +31,8 @@ Removes geolocation info from the given user's notices.
   -n --nickname nickname of the user
   -y --yes      do not wait for confirmation
      --dry-run  list affected notices without deleting
+     --all      run over and decache all messages, even if they don't
+                have geo data now (helps to fix cache bugs)
 
 END_OF_HELP;
 
@@ -67,10 +69,14 @@ if (!have_option('y', 'yes') && !have_option('--dry-run')) {
 }
 
 // @fixme for a very prolific poster this could be too many.
-print "Finding notices with geolocation data...";
 $notice = new Notice();
 $notice->profile_id = $profile->id;
-$notice->whereAdd("lat != ''");
+if (have_option('--all')) {
+    print "Finding all notices by $profile->nickname...";
+} else {
+    print "Finding notices by $profile->nickname with geolocation data...";
+    $notice->whereAdd("lat != ''");
+}
 $notice->find();
 
 if ($notice->N) {
@@ -101,10 +107,10 @@ if ($notice->N) {
             $ok = $update->query($query);
             if ($ok) {
                 // And now we decache him manually, as query() doesn't know what we're doing...
-                $orig->blow();
+                $orig->decache();
                 echo "(removed)";
             } else {
-                echo "(failed?)";
+                echo "(unchanged?)";
             }
         }
         print "\n";