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));
}
$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']));
+ }
}
}
}
$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'])
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`");
}
$plugins = get_config('system','addon');
$plugins_arr = array();
- if($plugins) {
+ if ($plugins) {
$plugins_arr = explode(",",str_replace(" ", "",$plugins));
$idx = array_search($plugin, $plugins_arr);
$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);
}