X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Ffixup_utf8.php;h=796021b72136655ee4b9a60d64070efde58eb8e8;hb=0e439117a75698629c5066d0241ab41dc07b5ee1;hp=f952af8d394c71f3a4e3c3b88553c1d5690d1c4b;hpb=9f356b55c6f419468771c0f3c2450010c0242abe;p=quix0rs-gnu-social.git diff --git a/scripts/fixup_utf8.php b/scripts/fixup_utf8.php index f952af8d39..796021b721 100755 --- a/scripts/fixup_utf8.php +++ b/scripts/fixup_utf8.php @@ -1,8 +1,8 @@ #!/usr/bin/env php . */ -# Abort if called from a web server +// Abort if called from a web server define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $helptext = << -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; @@ -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"; @@ -249,7 +249,7 @@ class UTF8FixerUpper $sql = 'SELECT id, fullname, location, description FROM user_group ' . 'WHERE LENGTH(fullname) != CHAR_LENGTH(fullname) '. 'OR LENGTH(location) != CHAR_LENGTH(location) '. - 'OR LENGTH(description) != CHAR_LENGTH(description) '; + 'OR LENGTH(description) != CHAR_LENGTH(description) '. 'AND modified < "'.$this->max_date.'" '. 'ORDER BY modified DESC'; @@ -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";