From: Roland Haeder Date: Tue, 26 May 2015 17:57:09 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' into social-master X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d9b35208ecda59292680fb55e38c56b2831d5366;p=quix0rs-gnu-social.git Merge remote-tracking branch 'upstream/master' into social-master Signed-off-by: Roland Haeder Conflicts: lib/inlineattachmentlist.php plugins/InfiniteScroll/InfiniteScrollPlugin.php plugins/MobileProfile/MobileProfilePlugin.php plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php --- d9b35208ecda59292680fb55e38c56b2831d5366 diff --cc lib/profileaction.php index 2ec94da818,bd5bb5a148..3da3c11246 --- a/lib/profileaction.php +++ b/lib/profileaction.php @@@ -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; } diff --cc lib/schemaupdater.php index 03892970c5,38b5b93865..575080a7bc --- a/lib/schemaupdater.php +++ b/lib/schemaupdater.php @@@ -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; } @@@ -137,9 -134,8 +134,8 @@@ } } 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 scripts/deleteprofile.php index 0000000000,8eed6ff97b..c1ef5a449a mode 000000,100755..100755 --- a/scripts/deleteprofile.php +++ b/scripts/deleteprofile.php @@@ -1,0 -1,78 +1,78 @@@ + #!/usr/bin/env php + . + */ + + define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); + + $shortoptions = 'i::n::u::y'; + $longoptions = array('id=', 'nickname=', 'uri=', 'yes'); + + $helptext = <<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";