added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
cdff732044
commit
299c0122f6
|
@ -271,6 +271,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
if ($creator != "") {
|
||||
$item["author-name"] = $creator;
|
||||
}
|
||||
|
||||
/// @TODO ?
|
||||
// <category>Ausland</category>
|
||||
// <media:thumbnail width="152" height="76" url="http://www.taz.de/picture/667875/192/14388767.jpg"/>
|
||||
|
@ -293,8 +294,9 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
|
|||
$type = $attributes->textContent;
|
||||
}
|
||||
}
|
||||
if(strlen($item["attach"]))
|
||||
if (strlen($item["attach"])) {
|
||||
$item["attach"] .= ',';
|
||||
}
|
||||
|
||||
$attachments[] = array("link" => $href, "type" => $type, "length" => $length);
|
||||
|
||||
|
|
|
@ -33,11 +33,13 @@ function gprobe_run(&$argv, &$argc){
|
|||
|
||||
$arr = probe_url($url);
|
||||
|
||||
if (is_null($result))
|
||||
if (is_null($result)) {
|
||||
Cache::set("gprobe:".$urlparts["host"], $arr);
|
||||
}
|
||||
|
||||
if (!in_array($arr["network"], array(NETWORK_FEED, NETWORK_PHANTOM)))
|
||||
if (!in_array($arr["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
|
||||
update_gcontact($arr);
|
||||
}
|
||||
|
||||
$r = q("SELECT `id`, `url`, `network` FROM `gcontact` WHERE `nurl` = '%s' ORDER BY `id` LIMIT 1",
|
||||
dbesc(normalise_link($url))
|
||||
|
|
|
@ -347,9 +347,10 @@ function groups_containing($uid,$c) {
|
|||
|
||||
$ret = array();
|
||||
if (dbm::is_result($r)) {
|
||||
foreach($r as $rr)
|
||||
foreach ($r as $rr) {
|
||||
$ret[] = $rr['gid'];
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
|
|
@ -205,15 +205,17 @@ function profile_sidebar($profile, $block = 0) {
|
|||
// This function can also use contact information in $profile
|
||||
$is_contact = x($profile, 'cid');
|
||||
|
||||
if((! is_array($profile)) && (! count($profile)))
|
||||
if ((! is_array($profile)) && (! count($profile))) {
|
||||
return $o;
|
||||
}
|
||||
|
||||
$profile['picdate'] = urlencode($profile['picdate']);
|
||||
|
||||
if (($profile['network'] != "") AND ($profile['network'] != NETWORK_DFRN)) {
|
||||
$profile['network_name'] = format_network_name($profile['network'], $profile['url']);
|
||||
} else
|
||||
} else {
|
||||
$profile['network_name'] = "";
|
||||
}
|
||||
|
||||
call_hooks('profile_sidebar_enter', $profile);
|
||||
|
||||
|
@ -630,9 +632,7 @@ function advanced_profile(App $a) {
|
|||
|
||||
if ($a->profile['gender']) $profile['gender'] = array( t('Gender:'), $a->profile['gender'] );
|
||||
|
||||
|
||||
if (($a->profile['dob']) && ($a->profile['dob'] > '0001-01-01')) {
|
||||
|
||||
$year_bd_format = t('j F, Y');
|
||||
$short_bd_format = t('j F');
|
||||
|
||||
|
@ -881,16 +881,20 @@ function zrl_init(App $a) {
|
|||
}
|
||||
|
||||
function zrl($s,$force = false) {
|
||||
if(! strlen($s))
|
||||
if (! strlen($s)) {
|
||||
return $s;
|
||||
if((! strpos($s,'/profile/')) && (! $force))
|
||||
}
|
||||
if ((! strpos($s,'/profile/')) && (! $force)) {
|
||||
return $s;
|
||||
if($force && substr($s,-1,1) !== '/')
|
||||
}
|
||||
if ($force && substr($s,-1,1) !== '/') {
|
||||
$s = $s . '/';
|
||||
}
|
||||
$achar = strpos($s,'?') ? '&' : '?';
|
||||
$mine = get_my_url();
|
||||
if($mine and ! link_compare($mine,$s))
|
||||
if ($mine and ! link_compare($mine,$s)) {
|
||||
return $s . $achar . 'zrl=' . urlencode($mine);
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
@ -911,9 +915,10 @@ function zrl($s,$force = false) {
|
|||
function get_theme_uid() {
|
||||
$uid = (($_REQUEST['puid']) ? intval($_REQUEST['puid']) : 0);
|
||||
if (local_user()) {
|
||||
if((get_pconfig(local_user(),'system','always_my_theme')) || (! $uid))
|
||||
if ((get_pconfig(local_user(),'system','always_my_theme')) || (! $uid)) {
|
||||
return local_user();
|
||||
}
|
||||
}
|
||||
|
||||
return $uid;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user