]> git.mxchange.org Git - friendica.git/blobdiff - update.php
added missing spaces/curly braces
[friendica.git] / update.php
index 8f581559d9c199c97189281849084ac0d6000f5f..7c3b32e2ddd26f385a3de4323a45a83c006acc5c 100644 (file)
@@ -148,7 +148,7 @@ function update_1014() {
        if (dbm::is_result($r)) {
                foreach ($r as $rr) {
                        $ph = new Photo($rr['data']);
-                       if($ph->is_valid()) {
+                       if ($ph->is_valid()) {
                                $ph->scaleImage(48);
                                $ph->store($rr['uid'],$rr['contact-id'],$rr['resource-id'],$rr['filename'],$rr['album'],6,(($rr['profile']) ? 1 : 0));
                        }
@@ -157,14 +157,15 @@ function update_1014() {
        $r = q("SELECT * FROM `contact` WHERE 1");
        if (dbm::is_result($r)) {
                foreach ($r as $rr) {
-                       if(stristr($rr['thumb'],'avatar'))
+                       if (stristr($rr['thumb'],'avatar')) {
                                q("UPDATE `contact` SET `micro` = '%s' WHERE `id` = %d",
                                        dbesc(str_replace('avatar','micro',$rr['thumb'])),
                                        intval($rr['id']));
-                       else
+                       } else {
                                q("UPDATE `contact` SET `micro` = '%s' WHERE `id` = %d",
                                        dbesc(str_replace('5.jpg','6.jpg',$rr['thumb'])),
                                        intval($rr['id']));
+                       }
                }
        }
 }
@@ -310,7 +311,7 @@ function update_1031() {
        $r = q("SELECT `id`, `object` FROM `item` WHERE `object` != '' ");
        if (dbm::is_result($r)) {
                foreach ($r as $rr) {
-                       if(strstr($rr['object'],'type="http')) {
+                       if (strstr($rr['object'],'type="http')) {
                                q("UPDATE `item` SET `object` = '%s' WHERE `id` = %d",
                                        dbesc(str_replace('type="http','href="http',$rr['object'])),
                                        intval($rr['id'])
@@ -595,10 +596,11 @@ function update_1074() {
        q("ALTER TABLE `user` ADD `hidewall` TINYINT( 1) NOT NULL DEFAULT '0' AFTER `blockwall` ");
        $r = q("SELECT `uid` FROM `profile` WHERE `is-default` = 1 AND `hidewall` = 1");
        if (dbm::is_result($r)) {
-               foreach ($r as $rr)
+               foreach ($r as $rr) {
                        q("UPDATE `user` SET `hidewall` = 1 WHERE `uid` = %d",
                                intval($rr['uid'])
                        );
+               }
        }
        q("ALTER TABLE `profile` DROP `hidewall`");
 }
@@ -1754,7 +1756,7 @@ function update_1190() {
                $plugins = get_config('system','addon');
                $plugins_arr = array();
 
-               if($plugins) {
+               if ($plugins) {
                        $plugins_arr = explode(",",str_replace(" ", "",$plugins));
 
                        $idx = array_search($plugin, $plugins_arr);
@@ -1782,19 +1784,22 @@ function update_1190() {
                        $key = $rr['k'];
                        $value = $rr['v'];
 
-                       if ($key === 'randomise')
+                       if ($key === 'randomise') {
                                del_pconfig($uid,$family,$key);
+                       }
 
                        if ($key === 'show_on_profile') {
-                               if ($value)
+                               if ($value) {
                                        set_pconfig($uid,feature,forumlist_profile,$value);
+                               }
 
                                del_pconfig($uid,$family,$key);
                        }
 
                        if ($key === 'show_on_network') {
-                               if ($value)
+                               if ($value) {
                                        set_pconfig($uid,feature,forumlist_widget,$value);
+                               }
 
                                del_pconfig($uid,$family,$key);
                        }