]> git.mxchange.org Git - friendica.git/blobdiff - update.php
Merge branch 'develop' into task/admin-block-list
[friendica.git] / update.php
index 0b482535df5d9ac04c1ea805c0e76c280027f346..ba0867d3a8ca3cfd7c423c25c4486b2df41ecbcd 100644 (file)
@@ -6,6 +6,7 @@ use Friendica\Core\Config;
 use Friendica\Core\PConfig;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
+use Friendica\Object\Photo;
 
 /**
  *
@@ -146,14 +147,14 @@ function update_1013() {
                AFTER `object` , ADD `target` TEXT NOT NULL AFTER `target-type`");
 }
 
-function update_1014() {
-       require_once('include/Photo.php');
+function update_1014()
+{
        q("ALTER TABLE `contact` ADD `micro` TEXT NOT NULL AFTER `thumb` ");
        $r = q("SELECT * FROM `photo` WHERE `scale` = 4");
        if (DBM::is_result($r)) {
                foreach ($r as $rr) {
                        $ph = new Photo($rr['data']);
-                       if ($ph->is_valid()) {
+                       if ($ph->isValid()) {
                                $ph->scaleImage(48);
                                $ph->store($rr['uid'],$rr['contact-id'],$rr['resource-id'],$rr['filename'],$rr['album'],6,(($rr['profile']) ? 1 : 0));
                        }
@@ -616,7 +617,7 @@ function update_1075() {
                foreach ($r as $rr) {
                        $found = true;
                        do {
-                               $guid = substr(random_string(),0,16);
+                               $guid = random_string(16);
                                $x = q("SELECT `uid` FROM `user` WHERE `guid` = '%s' LIMIT 1",
                                        dbesc($guid)
                                );
@@ -1601,7 +1602,7 @@ function update_1169() {
        if (!$r)
                return UPDATE_FAILED;
 
-       Worker::add(PRIORITY_LOW, "threadupdate");
+       Worker::add(PRIORITY_LOW, "ThreadUpdate");
 
        return UPDATE_SUCCESS;
 }
@@ -1650,7 +1651,7 @@ function update_1178() {
 function update_1180() {
 
        // Fill the new fields in the term table.
-       Worker::add(PRIORITY_LOW, "tagupdate");
+       Worker::add(PRIORITY_LOW, "TagUpdate");
 
        return UPDATE_SUCCESS;
 }