From 147d7f3bbf6c785f2c1eb7cdcfaa0a47e0ee43d3 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 6 Feb 2011 15:50:50 -0800 Subject: theme name cleanup - rename default to loozah, provide sane fallbacks and change system primary theme. Provide indication on contact edit page of last update success/failure - can be extended later to show actual timestamp of last successful update. --- update.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'update.php') diff --git a/update.php b/update.php index f90983747..2ca008cda 100644 --- a/update.php +++ b/update.php @@ -342,3 +342,10 @@ function update_1034() { q("DELETE FROM `item` WHERE `parent` = 0 AND `created` < UTC_TIMESTAMP() - INTERVAL 2 MINUTE"); } + + +function update_1035() { + + q("ALTER TABLE `contact` ADD `success_update` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `last-update` "); + +} \ No newline at end of file -- cgit v1.2.3 From b96d6c015b8090ee2ec56f320821fe962f821c6f Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 6 Feb 2011 19:15:20 -0800 Subject: fix contact photo updates - a result of baseurl being wrong for cmdline processes --- update.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'update.php') diff --git a/update.php b/update.php index 2ca008cda..e51e8ac33 100644 --- a/update.php +++ b/update.php @@ -348,4 +348,18 @@ function update_1035() { q("ALTER TABLE `contact` ADD `success_update` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `last-update` "); -} \ No newline at end of file +} + +function update_1036() { + + $r = dbq("SELECT * FROM `contact` WHERE `network` = 'dfrn' && `photo` LIKE '%include/photo%' "); + if(count($r)) { + foreach($r as $rr) { + q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `id` = %d LIMIT 1", + dbesc(str_replace('include/photo','photo',$rr['photo'])), + dbesc(str_replace('include/photo','photo',$rr['thumb'])), + dbesc(str_replace('include/photo','photo',$rr['micro'])), + intval($rr['id'])); + } + } +} -- cgit v1.2.3