Code beautification and some more logging data - no changes in the functionality.

This commit is contained in:
Michael Vogel 2014-04-04 11:02:36 +02:00
parent 12866209e8
commit 5f3d584716
3 changed files with 48 additions and 48 deletions

View File

@ -109,14 +109,13 @@ function like_content(&$a) {
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : ''); $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
$r = q("SELECT * FROM `item` WHERE `verb` = '%s' AND `deleted` = 0 $r = q("SELECT `id`, `guid` FROM `item` WHERE `verb` = '%s' AND `deleted` = 0
AND `contact-id` = %d AND ( `parent` = '%s' OR `parent-uri` = '%s' OR `thr-parent` = '%s') LIMIT 1", AND `contact-id` = %d AND `uid` = %d
dbesc($activity), AND (`parent` = '%s' OR `parent-uri` = '%s' OR `thr-parent` = '%s') LIMIT 1",
intval($contact['id']), dbesc($activity), intval($contact['id']), intval($owner_uid),
dbesc($item_id), dbesc($item_id), dbesc($item_id), dbesc($item['uri'])
dbesc($item_id),
dbesc($item['uri'])
); );
if(count($r)) { if(count($r)) {
$like_item = $r[0]; $like_item = $r[0];

View File

@ -130,7 +130,7 @@ function pubsub_post(&$a) {
); );
if(! count($r)) { if(! count($r)) {
logger('pubsub: no contact record - ignored'); logger('pubsub: no contact record for "'.$nick.' ('.$contact_id.')" - ignored. '.$xml);
hub_post_return(); hub_post_return();
} }

View File

@ -808,7 +808,7 @@ function settings_content(&$a) {
$themes = array(); $themes = array();
$mobile_themes = array("---" => t('No special theme for mobile devices')); $mobile_themes = array("---" => t('No special theme for mobile devices'));
$files = glob('view/theme/*'); $files = glob('view/theme/*'); /* */
if($allowed_themes) { if($allowed_themes) {
foreach($allowed_themes as $th) { foreach($allowed_themes as $th) {
$f = $th; $f = $th;
@ -931,6 +931,7 @@ function settings_content(&$a) {
$post_profilechange = get_pconfig(local_user(), 'system','post_profilechange'); $post_profilechange = get_pconfig(local_user(), 'system','post_profilechange');
$post_profilechange = (($post_profilechange===false)? '0': $post_profilechange); // default if not set: 0 $post_profilechange = (($post_profilechange===false)? '0': $post_profilechange); // default if not set: 0
// nowarn_insecure
if(! strlen($a->user['timezone'])) if(! strlen($a->user['timezone']))
$timezone = date_default_timezone_get(); $timezone = date_default_timezone_get();