From: Roland Haeder Date: Tue, 26 May 2015 01:10:32 +0000 (+0200) Subject: Merge branch 'nightly' of git.gnu.io:Quix0r/gnu-social into nightly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=refs%2Fheads%2Fnightly;p=quix0rs-gnu-social.git Merge branch 'nightly' of git.gnu.io:Quix0r/gnu-social into nightly Signed-off-by: Roland Haeder Conflicts: actions/showstream.php lib/inlineattachmentlist.php plugins/InfiniteScroll/InfiniteScrollPlugin.php plugins/MobileProfile/MobileProfilePlugin.php plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php --- ce6b98efce6ce2bd1ff4b26f38d1a9b668311c3d diff --cc lib/profileaction.php index 2ec94da818,5923640097..3a6d33527e --- a/lib/profileaction.php +++ b/lib/profileaction.php @@@ -106,10 -99,16 +99,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";