Cleanup for #3010 - added spaces, thanks to @annando .
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
46d383369c
commit
448c5aa694
10
boot.php
10
boot.php
|
@ -1191,7 +1191,7 @@ class App {
|
||||||
q("START TRANSACTION");
|
q("START TRANSACTION");
|
||||||
|
|
||||||
$r = q("SELECT `pid` FROM `process` WHERE `pid` = %d", intval(getmypid()));
|
$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')",
|
q("INSERT INTO `process` (`pid`,`command`,`created`) VALUES (%d, '%s', '%s')",
|
||||||
intval(getmypid()),
|
intval(getmypid()),
|
||||||
dbesc($command),
|
dbesc($command),
|
||||||
|
@ -1207,7 +1207,7 @@ class App {
|
||||||
q("START TRANSACTION");
|
q("START TRANSACTION");
|
||||||
|
|
||||||
$r = q("SELECT `pid` FROM `process`");
|
$r = q("SELECT `pid` FROM `process`");
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach ($r AS $process) {
|
foreach ($r AS $process) {
|
||||||
if (!posix_kill($process["pid"], 0)) {
|
if (!posix_kill($process["pid"], 0)) {
|
||||||
q("DELETE FROM `process` WHERE `pid` = %d", intval($process["pid"]));
|
q("DELETE FROM `process` WHERE `pid` = %d", intval($process["pid"]));
|
||||||
|
@ -1677,7 +1677,7 @@ function run_update_function($x) {
|
||||||
function check_plugins(&$a) {
|
function check_plugins(&$a) {
|
||||||
|
|
||||||
$r = q("SELECT * FROM `addon` WHERE `installed` = 1");
|
$r = q("SELECT * FROM `addon` WHERE `installed` = 1");
|
||||||
if(dbm::is_result($r))
|
if (dbm::is_result($r))
|
||||||
$installed = $r;
|
$installed = $r;
|
||||||
else
|
else
|
||||||
$installed = array();
|
$installed = array();
|
||||||
|
@ -2021,7 +2021,7 @@ function current_theme(){
|
||||||
$r = q("select theme from user where uid = %d limit 1",
|
$r = q("select theme from user where uid = %d limit 1",
|
||||||
intval($a->profile_uid)
|
intval($a->profile_uid)
|
||||||
);
|
);
|
||||||
if(dbm::is_result($r))
|
if (dbm::is_result($r))
|
||||||
$page_theme = $r[0]['theme'];
|
$page_theme = $r[0]['theme'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2134,7 +2134,7 @@ function feed_birthday($uid,$tz) {
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(dbm::is_result($p)) {
|
if (dbm::is_result($p)) {
|
||||||
$tmp_dob = substr($p[0]['dob'],5);
|
$tmp_dob = substr($p[0]['dob'],5);
|
||||||
if(intval($tmp_dob)) {
|
if(intval($tmp_dob)) {
|
||||||
$y = datetime_convert($tz,$tz,'now','Y');
|
$y = datetime_convert($tz,$tz,'now','Y');
|
||||||
|
|
28
update.php
28
update.php
|
@ -85,7 +85,7 @@ function update_1006() {
|
||||||
// create 's' keys for everybody that does not have one
|
// create 's' keys for everybody that does not have one
|
||||||
|
|
||||||
$r = q("SELECT * FROM `user` WHERE `spubkey` = '' ");
|
$r = q("SELECT * FROM `user` WHERE `spubkey` = '' ");
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$sres=openssl_pkey_new(array('encrypt_key' => false ));
|
$sres=openssl_pkey_new(array('encrypt_key' => false ));
|
||||||
$sprvkey = '';
|
$sprvkey = '';
|
||||||
|
@ -122,7 +122,7 @@ function update_1010() {
|
||||||
function update_1011() {
|
function update_1011() {
|
||||||
q("ALTER TABLE `contact` ADD `nick` CHAR( 255 ) NOT NULL AFTER `name` ");
|
q("ALTER TABLE `contact` ADD `nick` CHAR( 255 ) NOT NULL AFTER `name` ");
|
||||||
$r = q("SELECT * FROM `contact` WHERE 1");
|
$r = q("SELECT * FROM `contact` WHERE 1");
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
q("UPDATE `contact` SET `nick` = '%s' WHERE `id` = %d",
|
q("UPDATE `contact` SET `nick` = '%s' WHERE `id` = %d",
|
||||||
dbesc(basename($rr['url'])),
|
dbesc(basename($rr['url'])),
|
||||||
|
@ -145,7 +145,7 @@ function update_1014() {
|
||||||
require_once('include/Photo.php');
|
require_once('include/Photo.php');
|
||||||
q("ALTER TABLE `contact` ADD `micro` TEXT NOT NULL AFTER `thumb` ");
|
q("ALTER TABLE `contact` ADD `micro` TEXT NOT NULL AFTER `thumb` ");
|
||||||
$r = q("SELECT * FROM `photo` WHERE `scale` = 4");
|
$r = q("SELECT * FROM `photo` WHERE `scale` = 4");
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$ph = new Photo($rr['data']);
|
$ph = new Photo($rr['data']);
|
||||||
if($ph->is_valid()) {
|
if($ph->is_valid()) {
|
||||||
|
@ -155,7 +155,7 @@ function update_1014() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$r = q("SELECT * FROM `contact` WHERE 1");
|
$r = q("SELECT * FROM `contact` WHERE 1");
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
if(stristr($rr['thumb'],'avatar'))
|
if(stristr($rr['thumb'],'avatar'))
|
||||||
q("UPDATE `contact` SET `micro` = '%s' WHERE `id` = %d",
|
q("UPDATE `contact` SET `micro` = '%s' WHERE `id` = %d",
|
||||||
|
@ -356,7 +356,7 @@ function update_1035() {
|
||||||
function update_1036() {
|
function update_1036() {
|
||||||
|
|
||||||
$r = dbq("SELECT * FROM `contact` WHERE `network` = 'dfrn' && `photo` LIKE '%include/photo%' ");
|
$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) {
|
foreach($r as $rr) {
|
||||||
q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `id` = %d",
|
q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `micro` = '%s' WHERE `id` = %d",
|
||||||
dbesc(str_replace('include/photo','photo',$rr['photo'])),
|
dbesc(str_replace('include/photo','photo',$rr['photo'])),
|
||||||
|
@ -594,7 +594,7 @@ function update_1073() {
|
||||||
function update_1074() {
|
function update_1074() {
|
||||||
q("ALTER TABLE `user` ADD `hidewall` TINYINT( 1) NOT NULL DEFAULT '0' AFTER `blockwall` ");
|
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");
|
$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)
|
foreach($r as $rr)
|
||||||
q("UPDATE `user` SET `hidewall` = 1 WHERE `uid` = %d",
|
q("UPDATE `user` SET `hidewall` = 1 WHERE `uid` = %d",
|
||||||
intval($rr['uid'])
|
intval($rr['uid'])
|
||||||
|
@ -606,7 +606,7 @@ function update_1074() {
|
||||||
function update_1075() {
|
function update_1075() {
|
||||||
q("ALTER TABLE `user` ADD `guid` CHAR( 16 ) NOT NULL AFTER `uid` ");
|
q("ALTER TABLE `user` ADD `guid` CHAR( 16 ) NOT NULL AFTER `uid` ");
|
||||||
$r = q("SELECT `uid` FROM `user` WHERE 1");
|
$r = q("SELECT `uid` FROM `user` WHERE 1");
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$found = true;
|
$found = true;
|
||||||
do {
|
do {
|
||||||
|
@ -685,10 +685,10 @@ function update_1082() {
|
||||||
ADD INDEX ( `guid` ) ");
|
ADD INDEX ( `guid` ) ");
|
||||||
// make certain the following code is only executed once
|
// make certain the following code is only executed once
|
||||||
$r = q("select `id` from `photo` where `guid` != '' limit 1");
|
$r = q("select `id` from `photo` where `guid` != '' limit 1");
|
||||||
if(dbm::is_result($r))
|
if (dbm::is_result($r))
|
||||||
return;
|
return;
|
||||||
$r = q("SELECT distinct(`resource-id`) FROM `photo` WHERE 1 group by `id`");
|
$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) {
|
foreach($r as $rr) {
|
||||||
$guid = get_guid();
|
$guid = get_guid();
|
||||||
q("update `photo` set `guid` = '%s' where `resource-id` = '%s'",
|
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` ");
|
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` ");
|
$r = q("SELECT `id` FROM `item` WHERE `parent` = `id` ");
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$x = q("SELECT max(`created`) AS `cdate` FROM `item` WHERE `parent` = %d LIMIT 1",
|
$x = q("SELECT max(`created`) AS `cdate` FROM `item` WHERE `parent` = %d LIMIT 1",
|
||||||
intval($rr['id'])
|
intval($rr['id'])
|
||||||
|
@ -854,7 +854,7 @@ function update_1100() {
|
||||||
require_once('include/text.php');
|
require_once('include/text.php');
|
||||||
|
|
||||||
$r = q("select id, url from contact where url != '' and nurl = '' ");
|
$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) {
|
foreach($r as $rr) {
|
||||||
q("update contact set nurl = '%s' where id = %d",
|
q("update contact set nurl = '%s' where id = %d",
|
||||||
dbesc(normalise_link($rr['url'])),
|
dbesc(normalise_link($rr['url'])),
|
||||||
|
@ -1030,7 +1030,7 @@ function update_1120() {
|
||||||
// might be missing on new installs. We'll check.
|
// might be missing on new installs. We'll check.
|
||||||
|
|
||||||
$r = q("describe item");
|
$r = q("describe item");
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach($r as $rr)
|
foreach($r as $rr)
|
||||||
if($rr['Field'] == 'spam')
|
if($rr['Field'] == 'spam')
|
||||||
return;
|
return;
|
||||||
|
@ -1168,7 +1168,7 @@ function update_1136() {
|
||||||
// order in reverse so that we save the newest entry
|
// order in reverse so that we save the newest entry
|
||||||
|
|
||||||
$r = q("select * from config where 1 order by id desc");
|
$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) {
|
foreach($r as $rr) {
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach($arr as $x) {
|
foreach($arr as $x) {
|
||||||
|
@ -1187,7 +1187,7 @@ function update_1136() {
|
||||||
|
|
||||||
$arr = array();
|
$arr = array();
|
||||||
$r = q("select * from pconfig where 1 order by id desc");
|
$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) {
|
foreach($r as $rr) {
|
||||||
$found = false;
|
$found = false;
|
||||||
foreach($arr as $x) {
|
foreach($arr as $x) {
|
||||||
|
|
|
@ -235,7 +235,7 @@ function frio_remote_nav($a,&$nav) {
|
||||||
$nav['remote'] = t("Visitor");
|
$nav['remote'] = t("Visitor");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dbm::is_result($r)){
|
if (dbm::is_result($r)){
|
||||||
$nav['userinfo'] = array(
|
$nav['userinfo'] = array(
|
||||||
'icon' => (dbm::is_result($r) ? $r[0]['photo'] : "images/person-48.jpg"),
|
'icon' => (dbm::is_result($r) ? $r[0]['photo'] : "images/person-48.jpg"),
|
||||||
'name' => $r[0]['name'],
|
'name' => $r[0]['name'],
|
||||||
|
@ -299,7 +299,7 @@ function frio_acl_lookup($a, &$results) {
|
||||||
$r = q("SELECT COUNT(*) AS `total` FROM `contact`
|
$r = q("SELECT COUNT(*) AS `total` FROM `contact`
|
||||||
WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ",
|
WHERE `uid` = %d AND `self` = 0 AND `pending` = 0 $sql_extra $sql_extra2 ",
|
||||||
intval($_SESSION['uid']));
|
intval($_SESSION['uid']));
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
$total = $r[0]["total"];
|
$total = $r[0]["total"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ function frio_acl_lookup($a, &$results) {
|
||||||
|
|
||||||
$contacts = array();
|
$contacts = array();
|
||||||
|
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
$contacts[] = _contact_detail_for_template($rr);
|
$contacts[] = _contact_detail_for_template($rr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ function vier_community_info() {
|
||||||
$r = suggestion_query(local_user(), 0, 9);
|
$r = suggestion_query(local_user(), 0, 9);
|
||||||
|
|
||||||
$tpl = get_markup_template('ch_directory_item.tpl');
|
$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_title'] = t('Community Profiles');
|
||||||
$aside['$comunity_profiles_items'] = array();
|
$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 ",
|
WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $order LIMIT %d , %d ",
|
||||||
0, 9);
|
0, 9);
|
||||||
|
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
|
|
||||||
$aside['$lastusers_title'] = t('Last users');
|
$aside['$lastusers_title'] = t('Last users');
|
||||||
$aside['$lastusers_items'] = array();
|
$aside['$lastusers_items'] = array();
|
||||||
|
@ -368,7 +368,7 @@ function vier_community_info() {
|
||||||
|
|
||||||
$tpl = get_markup_template('ch_connectors.tpl');
|
$tpl = get_markup_template('ch_connectors.tpl');
|
||||||
|
|
||||||
if(dbm::is_result($r)) {
|
if (dbm::is_result($r)) {
|
||||||
|
|
||||||
$con_services = array();
|
$con_services = array();
|
||||||
$con_services['title'] = Array("", t('Connect Services'), "", "");
|
$con_services['title'] = Array("", t('Connect Services'), "", "");
|
||||||
|
|
Loading…
Reference in a new issue