aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2015-09-03 13:55:47 +0200
committerzottel <github@zottel.net>2015-09-03 13:55:47 +0200
commit5cef672f9a128506f8531cec5d294dda83c3936d (patch)
treef7f33006cf7938c8db442fea0c6fdf705e8c021c
parent945ba5d7884770501de6514b2942160fcd883ca4 (diff)
downloadvolse-hubzilla-5cef672f9a128506f8531cec5d294dda83c3936d.tar.gz
volse-hubzilla-5cef672f9a128506f8531cec5d294dda83c3936d.tar.bz2
volse-hubzilla-5cef672f9a128506f8531cec5d294dda83c3936d.zip
fix update 1148
-rwxr-xr-xboot.php2
-rw-r--r--install/update.php29
2 files changed, 19 insertions, 12 deletions
diff --git a/boot.php b/boot.php
index 3423ef85c..43b5581ac 100755
--- a/boot.php
+++ b/boot.php
@@ -49,7 +49,7 @@ define ( 'PLATFORM_NAME', 'redmatrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1151 );
+define ( 'DB_UPDATE_VERSION', 1152 );
/**
* @brief Constant with a HTML line break.
diff --git a/install/update.php b/install/update.php
index 3fd75754d..16db09328 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1151 );
+define( 'UPDATE_VERSION' , 1152 );
/**
*
@@ -1718,16 +1718,6 @@ function update_r1148() {
$r1 = q("alter table likes add i_mid char(255) not null default '' ");
$r2 = q("create index i_mid on likes ( i_mid ) ");
- $r3 = q("select likes.*, item.mid from from likes left join item on likes.iid = item.id");
- if($r3) {
- foreach($r3 as $rr) {
- q("update likes set i_mid = '%s' where id = $d",
- dbesc($rr['mid']),
- intval($rr['id'])
- );
- }
- }
-
if($r1 && $r2)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
@@ -1748,3 +1738,20 @@ function update_r1150() {
}
+function update_r1151() {
+
+ $r3 = q("select likes.*, item.mid from likes left join item on likes.iid = item.id");
+ if($r3) {
+ foreach($r3 as $rr) {
+ q("update likes set i_mid = '%s' where id = $d",
+ dbesc($rr['mid']),
+ intval($rr['id'])
+ );
+ }
+ }
+
+ if ($r3)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+}