]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/fixup_utf8.php
let avatars be served over SSL
[quix0rs-gnu-social.git] / scripts / fixup_utf8.php
old mode 100644 (file)
new mode 100755 (executable)
index 8c9a912..30befad
@@ -1,8 +1,8 @@
 #!/usr/bin/env php
 <?php
 /*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2009, Control Yourself, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 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
@@ -25,7 +25,7 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
 $helptext = <<<ENDOFHELP
 fixup_utf8.php <maxdate> <maxid> <minid>
 
-Fixup records in a database that stored the data incorrectly (pre-0.7.4 for Laconica).
+Fixup records in a database that stored the data incorrectly (pre-0.7.4 for StatusNet).
 
 ENDOFHELP;
 
@@ -42,7 +42,7 @@ class UTF8FixerUpper
     {
         $this->args = $args;
 
-        if (array_key_exists('max_date', $args)) {
+        if (!empty($args['max_date'])) {
             $this->max_date = strftime('%Y-%m-%d %H:%M:%S', strtotime($args['max_date']));
         } else {
             $this->max_date = strftime('%Y-%m-%d %H:%M:%S', time());
@@ -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";