From b4b8cb57b326b6a668a090da060d72c30a20e967 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 30 May 2015 16:40:00 +0200 Subject: [PATCH] slugify console.php prompt name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since PHP thought it was fun to crash on Quitter EspaƱa and I couldn't be bothered messing with readline --- classes/Profile.php | 5 +++++ scripts/console.php | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/classes/Profile.php b/classes/Profile.php index 6eb09782b1..47e144032d 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -880,6 +880,11 @@ class Profile extends Managed_DataObject $inst->delete(); } + $localuser = User::getKV('id', $this->id); + if ($localuser instanceof User) { + $localuser->delete(); + } + return parent::delete($useWhere); } diff --git a/scripts/console.php b/scripts/console.php index c260ffaa00..692cedf8d1 100755 --- a/scripts/console.php +++ b/scripts/console.php @@ -113,7 +113,7 @@ function readline_emulation($prompt) function console_help() { - print "Welcome to StatusNet's interactive PHP console!\n"; + print "Welcome to GNU social's interactive PHP console!\n"; print "Type some PHP code and it'll execute...\n"; print "\n"; print "Hint: return a value of any type to output it via var_export():\n"; @@ -128,8 +128,8 @@ function console_help() } if (CONSOLE_INTERACTIVE) { - print "StatusNet interactive PHP console... type ctrl+D or enter 'exit' to exit.\n"; - $prompt = common_config('site', 'name') . '> '; + print "GNU social interactive PHP console... type ctrl+D or enter 'exit' to exit.\n"; + $prompt = common_slugify(common_config('site', 'name')) . '> '; } else { $prompt = ''; }