X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fstrip_geo.php;h=021b66885190dacbf944759738895272855256cc;hb=282f4d6a8990a923ad2afb567b86a13d5300e1c1;hp=010fb31f5484548ad25433f39d0b6b7ab6e94e98;hpb=674b0ddaace4a478092a89b9f63eedb3c4ad63e4;p=quix0rs-gnu-social.git diff --git a/scripts/strip_geo.php b/scripts/strip_geo.php index 010fb31f54..021b668851 100755 --- a/scripts/strip_geo.php +++ b/scripts/strip_geo.php @@ -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 = <<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";