Cleanup for #3010 - added spaces, thanks to @annando .

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-12-14 09:42:28 +01:00
parent 46d383369c
commit 448c5aa694
4 changed files with 25 additions and 25 deletions

View file

@ -1191,7 +1191,7 @@ class App {
q("START TRANSACTION");
$r = q("SELECT `pid` FROM `process` WHERE `pid` = %d", intval(getmypid()));
if(!dbm::is_result($r)) {
if (!dbm::is_result($r)) {
q("INSERT INTO `process` (`pid`,`command`,`created`) VALUES (%d, '%s', '%s')",
intval(getmypid()),
dbesc($command),
@ -1207,7 +1207,7 @@ class App {
q("START TRANSACTION");
$r = q("SELECT `pid` FROM `process`");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach ($r AS $process) {
if (!posix_kill($process["pid"], 0)) {
q("DELETE FROM `process` WHERE `pid` = %d", intval($process["pid"]));
@ -1677,7 +1677,7 @@ function run_update_function($x) {
function check_plugins(&$a) {
$r = q("SELECT * FROM `addon` WHERE `installed` = 1");
if(dbm::is_result($r))
if (dbm::is_result($r))
$installed = $r;
else
$installed = array();
@ -2021,7 +2021,7 @@ function current_theme(){
$r = q("select theme from user where uid = %d limit 1",
intval($a->profile_uid)
);
if(dbm::is_result($r))
if (dbm::is_result($r))
$page_theme = $r[0]['theme'];
}
@ -2134,7 +2134,7 @@ function feed_birthday($uid,$tz) {
intval($uid)
);
if(dbm::is_result($p)) {
if (dbm::is_result($p)) {
$tmp_dob = substr($p[0]['dob'],5);
if(intval($tmp_dob)) {
$y = datetime_convert($tz,$tz,'now','Y');

View file

@ -85,7 +85,7 @@ function update_1006() {
// create 's' keys for everybody that does not have one
$r = q("SELECT * FROM `user` WHERE `spubkey` = '' ");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
$sres=openssl_pkey_new(array('encrypt_key' => false ));
$sprvkey = '';
@ -122,7 +122,7 @@ function update_1010() {
function update_1011() {
q("ALTER TABLE `contact` ADD `nick` CHAR( 255 ) NOT NULL AFTER `name` ");
$r = q("SELECT * FROM `contact` WHERE 1");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
q("UPDATE `contact` SET `nick` = '%s' WHERE `id` = %d",
dbesc(basename($rr['url'])),
@ -145,7 +145,7 @@ function update_1014() {
require_once('include/Photo.php');
q("ALTER TABLE `contact` ADD `micro` TEXT NOT NULL AFTER `thumb` ");
$r = q("SELECT * FROM `photo` WHERE `scale` = 4");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
$ph = new Photo($rr['data']);
if($ph->is_valid()) {
@ -155,7 +155,7 @@ function update_1014() {
}
}
$r = q("SELECT * FROM `contact` WHERE 1");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
if(stristr($rr['thumb'],'avatar'))
q("UPDATE `contact` SET `micro` = '%s' WHERE `id` = %d",
@ -356,7 +356,7 @@ function update_1035() {
function update_1036() {
$r = dbq("SELECT * FROM `contact` WHERE `network` = 'dfrn' && `photo` LIKE '%include/photo%' ");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `id` = %d",
dbesc(str_replace('include/photo','photo',$rr['photo'])),
@ -594,7 +594,7 @@ function update_1073() {
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)) {
if (dbm::is_result($r)) {
foreach($r as $rr)
q("UPDATE `user` SET `hidewall` = 1 WHERE `uid` = %d",
intval($rr['uid'])
@ -606,7 +606,7 @@ function update_1074() {
function update_1075() {
q("ALTER TABLE `user` ADD `guid` CHAR( 16 ) NOT NULL AFTER `uid` ");
$r = q("SELECT `uid` FROM `user` WHERE 1");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
$found = true;
do {
@ -685,10 +685,10 @@ function update_1082() {
ADD INDEX ( `guid` ) ");
// make certain the following code is only executed once
$r = q("select `id` from `photo` where `guid` != '' limit 1");
if(dbm::is_result($r))
if (dbm::is_result($r))
return;
$r = q("SELECT distinct(`resource-id`) FROM `photo` WHERE 1 group by `id`");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
$guid = get_guid();
q("update `photo` set `guid` = '%s' where `resource-id` = '%s'",
@ -731,7 +731,7 @@ function update_1087() {
q("ALTER TABLE `item` ADD `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `edited` ");
$r = q("SELECT `id` FROM `item` WHERE `parent` = `id` ");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
$x = q("SELECT max(`created`) AS `cdate` FROM `item` WHERE `parent` = %d LIMIT 1",
intval($rr['id'])
@ -854,7 +854,7 @@ function update_1100() {
require_once('include/text.php');
$r = q("select id, url from contact where url != '' and nurl = '' ");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
q("update contact set nurl = '%s' where id = %d",
dbesc(normalise_link($rr['url'])),
@ -1030,7 +1030,7 @@ function update_1120() {
// might be missing on new installs. We'll check.
$r = q("describe item");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr)
if($rr['Field'] == 'spam')
return;
@ -1168,7 +1168,7 @@ function update_1136() {
// order in reverse so that we save the newest entry
$r = q("select * from config where 1 order by id desc");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
$found = false;
foreach($arr as $x) {
@ -1187,7 +1187,7 @@ function update_1136() {
$arr = array();
$r = q("select * from pconfig where 1 order by id desc");
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
$found = false;
foreach($arr as $x) {

View file

@ -235,7 +235,7 @@ function frio_remote_nav($a,&$nav) {
$nav['remote'] = t("Visitor");
}
if(dbm::is_result($r)){
if (dbm::is_result($r)){
$nav['userinfo'] = array(
'icon' => (dbm::is_result($r) ? $r[0]['photo'] : "images/person-48.jpg"),
'name' => $r[0]['name'],
@ -299,7 +299,7 @@ function frio_acl_lookup($a, &$results) {
$r = q("SELECT COUNT(*) AS `total` FROM `contact`
WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ",
intval($_SESSION['uid']));
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
$total = $r[0]["total"];
}
@ -311,7 +311,7 @@ function frio_acl_lookup($a, &$results) {
$contacts = array();
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
foreach($r as $rr) {
$contacts[] = _contact_detail_for_template($rr);
}

View file

@ -147,7 +147,7 @@ function vier_community_info() {
$r = suggestion_query(local_user(), 0, 9);
$tpl = get_markup_template('ch_directory_item.tpl');
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
$aside['$comunity_profiles_title'] = t('Community Profiles');
$aside['$comunity_profiles_items'] = array();
@ -177,7 +177,7 @@ function vier_community_info() {
WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $order LIMIT %d , %d ",
0, 9);
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
$aside['$lastusers_title'] = t('Last users');
$aside['$lastusers_items'] = array();
@ -368,7 +368,7 @@ function vier_community_info() {
$tpl = get_markup_template('ch_connectors.tpl');
if(dbm::is_result($r)) {
if (dbm::is_result($r)) {
$con_services = array();
$con_services['title'] = Array("", t('Connect Services'), "", "");