]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge remote-tracking branch 'upstream/master' into social-master
authorRoland Haeder <roland@mxchange.org>
Tue, 26 May 2015 17:57:09 +0000 (19:57 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 26 May 2015 17:57:09 +0000 (19:57 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
Conflicts:
lib/inlineattachmentlist.php
plugins/InfiniteScroll/InfiniteScrollPlugin.php
plugins/MobileProfile/MobileProfilePlugin.php
plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php

14 files changed:
1  2 
classes/File_redirection.php
lib/default.php
lib/framework.php
lib/inlineattachmentlist.php
lib/installer.php
lib/profileaction.php
lib/profilelist.php
lib/profileminilist.php
lib/schemaupdater.php
lib/util.php
plugins/MobileProfile/MobileProfilePlugin.php
plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php
scripts/deleteprofile.php
scripts/upgrade.php

Simple merge
diff --cc lib/default.php
Simple merge
Simple merge
Simple merge
Simple merge
index 2ec94da8181551d270035caab6e9391e37b272cc,bd5bb5a148d2290524d97e972e152f6dcc1b9672..3da3c11246d3e7997ffbd098232c0dac8246a58c
@@@ -106,10 -103,16 +103,16 @@@ abstract class ProfileAction extends Ma
          $this->tag = $this->trimmed('tag');
          $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
          common_set_returnto($this->selfUrl());
-         return true;
+         return $this->profileActionPreparation();
+     }
+     protected function profileActionPreparation()
+     {
+         // No-op by default.
      }
  
 -    function isReadOnly($args)
 +    function isReadOnly(array $args=array())
      {
          return true;
      }
Simple merge
Simple merge
index 03892970c5d3794b68a793d3c3c21141daf3d5cf,38b5b93865255cc719875385f9e927c999da4abe..575080a7bc2f906327a547dd8f18c686b51b9093
@@@ -109,9 -108,8 +108,8 @@@ class SchemaUpdate
              return $checksums;
          } catch (Exception $e) {
              // no dice!
 -            common_log(LOG_DEBUG, "Possibly schema_version table doesn't exist yet.");
 +            common_debug("Possibly schema_version table doesn't exist yet.");
          }
-         PEAR::popErrorHandling();
  
          return $checksums;
      }
              }
          } catch (Exception $e) {
              // no dice!
 -            common_log(LOG_DEBUG, "Possibly schema_version table doesn't exist yet.");
 +            common_debug("Possibly schema_version table doesn't exist yet.");
          }
-         PEAR::popErrorHandling();
          $this->checksums[$table] = $checksum;
      }
  }
diff --cc lib/util.php
Simple merge
index 0000000000000000000000000000000000000000,8eed6ff97b718ce7ad77f6d00a2e60a4fdba785c..c1ef5a449a9869c3ffb06d1cce2d1c7e8c371561
mode 000000,100755..100755
--- /dev/null
@@@ -1,0 -1,78 +1,78 @@@
 -require_once INSTALLDIR.'/scripts/commandline.inc';
+ #!/usr/bin/env php
+ <?php
+ /*
+  * StatusNet - a distributed open-source microblogging tool
+  * Copyright (C) 2008, 2009, StatusNet, Inc.
+  *
+  * This program is free software: you can redistribute it and/or modify
+  * it under the terms of the GNU Affero General Public License as published by
+  * the Free Software Foundation, either version 3 of the License, or
+  * (at your option) any later version.
+  *
+  * This program is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU Affero General Public License for more details.
+  *
+  * You should have received a copy of the GNU Affero General Public License
+  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  */
+ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
+ $shortoptions = 'i::n::u::y';
+ $longoptions = array('id=', 'nickname=', 'uri=', 'yes');
+ $helptext = <<<END_OF_DELETEUSER_HELP
+ deleteprofile.php [options]
+ deletes a profile from the database
+   -i --id       ID of the profile
+   -n --nickname nickname of a local user
+   -u --uri      OStatus profile URI (only remote users, requires OStatus plugin)
+   -y --yes      do not wait for confirmation
+ END_OF_DELETEUSER_HELP;
++require_once INSTALLDIR.'/scripts/commandline.inc.php';
+ if (have_option('i', 'id')) {
+     $id = get_option_value('i', 'id');
+     $profile = Profile::getKV('id', $id);
+     if (!$profile instanceof Profile) {
+         print "Can't find profile with ID $id\n";
+         exit(1);
+     }
+ } else if (have_option('n', 'nickname')) {
+     $nickname = get_option_value('n', 'nickname');
+     $user = User::getKV('nickname', $nickname);
+     if (!$user instanceof User) {
+         print "Can't find user with nickname '$nickname'\n";
+         exit(1);
+     }
+     $profile = $user->getProfile();
+ } else if (have_option('u', 'uri')) {
+     $uri = get_option_value('u', 'uri');
+     $oprofile = Ostatus_profile::getKV('uri', $uri);
+     if (!$oprofile instanceof Ostatus_profile) {
+         print "Can't find profile with URI '$uri'\n";
+         exit(1);
+     }
+     $profile = $oprofile->localProfile();
+ } else {
+     print "You must provide either an ID, a URI or a nickname.\n";
+     exit(1);
+ }
+ if (!have_option('y', 'yes')) {
+     print "About to PERMANENTLY delete profile '".$profile->getNickname()."' ({$profile->id}). Are you sure? [y/N] ";
+     $response = fgets(STDIN);
+     if (strtolower(trim($response)) != 'y') {
+         print "Aborting.\n";
+         exit(0);
+     }
+ }
+ print "Deleting...";
+ $profile->delete();
+ print "DONE.\n";
Simple merge