use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
+use Friendica\Object\Photo;
/**
*
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));
}
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)
);
if (!$r)
return UPDATE_FAILED;
- Worker::add(PRIORITY_LOW, "threadupdate");
+ Worker::add(PRIORITY_LOW, "ThreadUpdate");
return UPDATE_SUCCESS;
}
function update_1180() {
// Fill the new fields in the term table.
- Worker::add(PRIORITY_LOW, "tagupdate");
+ Worker::add(PRIORITY_LOW, "TagUpdate");
return UPDATE_SUCCESS;
}