From c89b10ffe4adb1df724b6a7c5c31b42c7dd3376b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 2 Dec 2009 09:47:02 -0800 Subject: Code style cleanup: dropped some unnecessary =& reference assignments where they're used only out of habit for PHP 4-style object semantics --- scripts/fixup_utf8.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/fixup_utf8.php b/scripts/fixup_utf8.php index 5a9fba7c3..30befadfd 100755 --- a/scripts/fixup_utf8.php +++ b/scripts/fixup_utf8.php @@ -145,7 +145,7 @@ class UTF8FixerUpper echo "$id..."; - $result =& $this->dbu->execute($sth, array($content, $rendered, $id)); + $result = $this->dbu->execute($sth, array($content, $rendered, $id)); if (PEAR::isError($result)) { echo "ERROR: " . $result->getMessage() . "\n"; @@ -209,7 +209,7 @@ class UTF8FixerUpper echo "$id..."; - $result =& $this->dbu->execute($sth, array($fullname, $location, $bio, $id)); + $result = $this->dbu->execute($sth, array($fullname, $location, $bio, $id)); if (PEAR::isError($result)) { echo "ERROR: " . $result->getMessage() . "\n"; @@ -273,7 +273,7 @@ class UTF8FixerUpper echo "$id..."; - $result =& $this->dbu->execute($sth, array($fullname, $location, $description, $id)); + $result = $this->dbu->execute($sth, array($fullname, $location, $description, $id)); if (PEAR::isError($result)) { echo "ERROR: " . $result->getMessage() . "\n"; @@ -330,7 +330,7 @@ class UTF8FixerUpper echo "$id..."; - $result =& $this->dbu->execute($sth, array($content, $rendered, $id)); + $result = $this->dbu->execute($sth, array($content, $rendered, $id)); if (PEAR::isError($result)) { echo "ERROR: " . $result->getMessage() . "\n"; -- cgit v1.2.3-54-g00ecf From 4eceef0dbef02f5254a7c2f901aae5b648024f30 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 7 Dec 2009 11:34:03 -0800 Subject: Grand ALL permissions to the DB user when setting up a new status.net site. --- scripts/setup_status_network.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/setup_status_network.sh b/scripts/setup_status_network.sh index d40d4724f..777711fb5 100755 --- a/scripts/setup_status_network.sh +++ b/scripts/setup_status_network.sh @@ -19,8 +19,8 @@ done mysql -h $DBHOST -u $ADMIN --password=$ADMINPASS $SITEDB << ENDOFCOMMANDS -GRANT INSERT,SELECT,UPDATE,DELETE ON $database.* TO '$username'@'localhost' IDENTIFIED BY '$password'; -GRANT INSERT,SELECT,UPDATE,DELETE ON $database.* TO '$username'@'%' IDENTIFIED BY '$password'; +GRANT ALL ON $database.* TO '$username'@'localhost' IDENTIFIED BY '$password'; +GRANT ALL ON $database.* TO '$username'@'%' IDENTIFIED BY '$password'; INSERT INTO status_network (nickname, dbhost, dbuser, dbpass, dbname, sitename, created) VALUES ('$nickname', '$DBHOSTNAME', '$username', '$password', '$database', '$sitename', now()); -- cgit v1.2.3-54-g00ecf From 5affa498209b8c768531a816865903728e726e88 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 8 Dec 2009 08:28:44 -0800 Subject: Tweak updateavatarurl.php: emit a newline whether we're on verbose or non-quiet, emit help when no users specified. --- scripts/updateavatarurl.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/updateavatarurl.php b/scripts/updateavatarurl.php index dfcfc118c..617c2e24c 100644 --- a/scripts/updateavatarurl.php +++ b/scripts/updateavatarurl.php @@ -60,7 +60,8 @@ try { } } } else { - throw new Exception("You have to provide an ID or nickname or 'all'."); + show_help(); + exit(1); } } catch (Exception $e) { print $e->getMessage()."\n"; @@ -123,6 +124,9 @@ function updateAvatars($user) } if (have_option('v', 'verbose')) { - print "DONE.\n"; + print "DONE."; + } + if (!have_option('q', 'quiet') || have_option('v', 'verbose')) { + print "\n"; } } -- cgit v1.2.3-54-g00ecf