]> git.mxchange.org Git - friendica.git/commitdiff
added much more curly braces + space between "if" and brace
authorRoland Häder <roland@mxchange.org>
Tue, 20 Dec 2016 10:56:34 +0000 (11:56 +0100)
committerRoland Häder <roland@mxchange.org>
Tue, 20 Dec 2016 10:56:34 +0000 (11:56 +0100)
Signed-off-by: Roland Häder <roland@mxchange.org>
50 files changed:
doc/themes.md
include/acl_selectors.php
include/contact_widgets.php
include/group.php
mod/allfriends.php
mod/api.php
mod/bookmarklet.php
mod/community.php
mod/contactgroup.php
mod/contacts.php
mod/content.php
mod/crepair.php
mod/delegate.php
mod/dirfind.php
mod/editpost.php
mod/events.php
mod/filer.php
mod/filerm.php
mod/follow.php
mod/fsuggest.php
mod/group.php
mod/ignored.php
mod/invite.php
mod/manage.php
mod/match.php
mod/message.php
mod/mood.php
mod/network.php
mod/nogroup.php
mod/notes.php
mod/notifications.php
mod/oexchange.php
mod/ostatus_subscribe.php
mod/poke.php
mod/profile_photo.php
mod/profiles.php
mod/profperm.php
mod/qsearch.php
mod/regmod.php
mod/repair_ostatus.php
mod/settings.php
mod/starred.php
mod/suggest.php
mod/tagrm.php
mod/uexport.php
mod/viewsrc.php
view/theme/duepuntozero/config.php
view/theme/frio/config.php
view/theme/quattro/config.php
view/theme/vier/config.php

index 0ae7e694feee61cd36d14f8dd53a3310c5d732e0..0b8f6cb83dc03aefd95a860b61609488a821c276 100644 (file)
@@ -124,8 +124,9 @@ The selected 1st part will be saved in the database by the theme_post function.
 
     function theme_post(App &$a){
         // non local users shall not pass
-        if(! local_user())
+        if (! local_user()) {
             return;
+        }
         // if the one specific submit button was pressed then proceed
         if (isset($_POST['duepuntozero-settings-submit'])){
             // and save the selection key into the personal config of the user
index cd68ffaa7d161b7be3a5ab02f9b7f2b4995344d7..c1edc8cc037927b5cdd5695cca2d663151bfe678 100644 (file)
@@ -392,8 +392,9 @@ function construct_acl_data(&$a, $user) {
 
 function acl_lookup(&$a, $out_type = 'json') {
 
-       if(!local_user())
-               return "";
+       if (!local_user()) {
+               return '';
+       }
 
        $start  =       (x($_REQUEST,'start')           ? $_REQUEST['start']            : 0);
        $count  =       (x($_REQUEST,'count')           ? $_REQUEST['count']            : 100);
index a74080e75b6375867d8bab0b1be1520807bcab0e..71a75d431eaa3efba3769be507356ee41184f37f 100644 (file)
@@ -80,11 +80,13 @@ function networks_widget($baseurl,$selected = '') {
 
        $a = get_app();
 
-       if(!local_user())
+       if (!local_user()) {
                return '';
+       }
 
-       if(!feature_enabled(local_user(),'networks'))
+       if (!feature_enabled(local_user(),'networks')) {
                return '';
+       }
 
        $extra_sql = unavailable_networks();
 
@@ -116,15 +118,18 @@ function networks_widget($baseurl,$selected = '') {
 }
 
 function fileas_widget($baseurl,$selected = '') {
-       if(! local_user())
+       if (! local_user()) {
                return '';
+       }
 
-       if(! feature_enabled(local_user(),'filing'))
+       if (! feature_enabled(local_user(),'filing')) {
                return '';
+       }
 
        $saved = get_pconfig(local_user(),'system','filetags');
-       if(! strlen($saved))
+       if (! strlen($saved)) {
                return;
+       }
 
        $matches = false;
        $terms = array();
index 67712aae7c45924f3146762d8a03629c1a293940..a2a55c44403b61f69f31e54d245e1f7507fba878 100644 (file)
@@ -234,7 +234,7 @@ function group_side($every="contacts",$each="group",$editmode = "standard", $gro
 
        $o = '';
 
-       if(! local_user())
+       if (! local_user())
                return '';
 
        $groups = array();
index 43490e96401df2c305d6c901be9b20f2d968998d..f9cffcbb2d160afdfc4e40433c9e56c5517cd9f9 100644 (file)
@@ -8,16 +8,18 @@ require_once('mod/contacts.php');
 function allfriends_content(App &$a) {
 
        $o = '';
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
 
-       if($a->argc > 1)
+       if ($a->argc > 1) {
                $cid = intval($a->argv[1]);
+       }
 
-       if(! $cid)
+       if (! $cid) {
                return;
+       }
 
        $uid = $a->user['uid'];
 
@@ -26,7 +28,8 @@ function allfriends_content(App &$a) {
                intval(local_user())
        );
 
-       if(! count($c))
+       if (! count($c)) {
+       }
                return;
 
        $a->page['aside'] = "";
index b398daac8ce62ae63d8840b35aba92e5bfad3fd0..74a0cff6f4a17d3ecf1cb66e55eb1075320378f5 100644 (file)
@@ -22,7 +22,7 @@ function oauth_get_client($request){
 
 function api_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
@@ -84,7 +84,7 @@ function api_content(App &$a) {
                }
 
 
-               if(! local_user()) {
+               if (! local_user()) {
                        /// @TODO We need login form to redirect to this page
                        notice( t('Please login to continue.') . EOL );
                        return login(false,$request->get_parameters());
index 1d68069439a1e3acf53e52465c84c300571865b6..9bc8c3353555a929c350a1bf739913ff32b390ff 100644 (file)
@@ -8,7 +8,7 @@ function bookmarklet_init(App &$a) {
 }
 
 function bookmarklet_content(App &$a) {
-       if(!local_user()) {
+       if (!local_user()) {
                $o = '<h2>'.t('Login').'</h2>';
                $o .= login(($a->config['register_policy'] == REGISTER_CLOSED) ? false : true);
                return $o;
index 7a1e72733807c23d62c894c5bc9cdb6b7f9b6939..2c2ea32b33cc5ee7e4413c14bc9dddc9beb08946 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 function community_init(App &$a) {
-       if(! local_user()) {
+       if (! local_user()) {
                unset($_SESSION['theme']);
                unset($_SESSION['mobile-theme']);
        }
index f98d9f4b5305f68f354886aad29b1fe059c852b2..553c7d6cd38b54f1cc4b5657c16b6da6b2b86e4a 100644 (file)
@@ -5,7 +5,7 @@ require_once('include/group.php');
 function contactgroup_content(App &$a) {
 
 
-       if(! local_user()) {
+       if (! local_user()) {
                killme();
        }
 
index 45bd356d47d7e768b5961f8340512d1a8f6af607..4f634bbc1c45cd46357acbd63d3122a7cd4cb857 100644 (file)
@@ -8,8 +8,9 @@ require_once('mod/proxy.php');
 require_once('include/Photo.php');
 
 function contacts_init(App &$a) {
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $contact_id = 0;
 
@@ -138,8 +139,9 @@ function contacts_batch_actions(App &$a){
 
 function contacts_post(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        if ($a->argv[1]==="batch") {
                contacts_batch_actions($a);
@@ -147,15 +149,16 @@ function contacts_post(App &$a) {
        }
 
        $contact_id = intval($a->argv[1]);
-       if(! $contact_id)
+       if (! $contact_id) {
                return;
+       }
 
        $orig_record = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                intval($contact_id),
                intval(local_user())
        );
 
-       if(! count($orig_record)) {
+       if (! count($orig_record)) {
                notice( t('Could not access contact record.') . EOL);
                goaway('contacts');
                return; // NOTREACHED
@@ -164,7 +167,7 @@ function contacts_post(App &$a) {
        call_hooks('contact_edit_post', $_POST);
 
        $profile_id = intval($_POST['profile-assign']);
-       if($profile_id) {
+       if ($profile_id) {
                $r = q("SELECT `id` FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                        intval($profile_id),
                        intval(local_user())
@@ -346,7 +349,7 @@ function contacts_content(App &$a) {
        nav_set_selected('contacts');
 
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 1a3fb109528da0d10f082a17c52b4178b7b5a6e3..2377032a7939c7fd4a21911f9a1ad48da3fdd751 100644 (file)
@@ -23,7 +23,7 @@ function content_content(&$a, $update = 0) {
 
        // Currently security is based on the logged in user
 
-       if(! local_user()) {
+       if (! local_user()) {
                return;
        }
 
index 308d5b95e9d573ea990966225b4e02db897ee294..2661deaeed9b0c8bb4b0ca99a5bc44ad4171d6b9 100644 (file)
@@ -3,8 +3,9 @@ require_once("include/contact_selectors.php");
 require_once("mod/contacts.php");
 
 function crepair_init(App &$a) {
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $contact_id = 0;
 
@@ -31,8 +32,9 @@ function crepair_init(App &$a) {
 
 
 function crepair_post(App &$a) {
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $cid = (($a->argc > 1) ? intval($a->argv[1]) : 0);
 
@@ -97,7 +99,7 @@ function crepair_post(App &$a) {
 
 function crepair_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 7dbeef73772360a29a5386e43ca04503f8c84969..8470a7ba0b3f9e8d00dc22660d25bbef69e72d0c 100644 (file)
@@ -8,7 +8,7 @@ function delegate_init(App &$a) {
 
 function delegate_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 80cba1c475b1a5b8f3240eba76b6577b57144458..fc5750f2dd9f10c13eed84b5325197bbdd442db7 100644 (file)
@@ -7,7 +7,7 @@ require_once('mod/contacts.php');
 
 function dirfind_init(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL );
                return;
        }
index 29f3dadff083aed698662fafd78372506e14ee5d..1bf150a5dd77603d38ec7c5351a0c1b6f28f1480 100644 (file)
@@ -6,14 +6,14 @@ function editpost_content(App &$a) {
 
        $o = '';
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
 
        $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
 
-       if(! $post_id) {
+       if (! $post_id) {
                notice( t('Item not found') . EOL);
                return;
        }
@@ -23,7 +23,7 @@ function editpost_content(App &$a) {
                intval(local_user())
        );
 
-       if(! count($itm)) {
+       if (! count($itm)) {
                notice( t('Item not found') . EOL);
                return;
        }
index bf65ff12676f78713254eff5bc6655edf55807a5..0c1e9ae2f5f553651191d5a509fc600421f794ce 100644 (file)
@@ -9,8 +9,9 @@ require_once('include/event.php');
 require_once('include/items.php');
 
 function events_init(App &$a) {
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        if ($a->argc == 1) {
                // if it's a json request abort here becaus we don't
@@ -34,8 +35,9 @@ function events_post(App &$a) {
 
        logger('post: ' . print_r($_REQUEST,true));
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $event_id = ((x($_POST,'event_id')) ? intval($_POST['event_id']) : 0);
        $cid = ((x($_POST,'cid')) ? intval($_POST['cid']) : 0);
@@ -187,7 +189,7 @@ function events_post(App &$a) {
 
 function events_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 4198502c4ce8775d8502e5ec8967d52a1c689d1f..1b5589380b288e14a81e774558c1cdd6b767e866 100644 (file)
@@ -7,7 +7,7 @@ require_once('include/items.php');
 
 function filer_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                killme();
        }
 
index e109ed404b5d6eae27ae28681398541a15fef5c4..cdc5a034aa8d7b24b5a29932b894fe7427de2a42 100644 (file)
@@ -2,7 +2,7 @@
 
 function filerm_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                killme();
        }
 
index d17c874f69bcec5c8a9a5e8cc259a43f538de96d..56e698547b1b88854334df39ba68252b53797a29 100644 (file)
@@ -7,7 +7,7 @@ require_once('include/contact_selectors.php');
 
 function follow_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                goaway($_SESSION['return_url']);
                // NOTREACHED
@@ -151,7 +151,7 @@ function follow_content(App &$a) {
 
 function follow_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                goaway($_SESSION['return_url']);
                // NOTREACHED
index 9d862848f1646a69125068fec8360e696228b27e..fcbadcc9b7f06a5febca3ee9167608f429f37086 100644 (file)
@@ -3,12 +3,13 @@
 
 function fsuggest_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                return;
        }
 
-       if($a->argc != 2)
+       if ($a->argc != 2) {
                return;
+       }
 
        $contact_id = intval($a->argv[1]);
 
@@ -74,7 +75,7 @@ function fsuggest_content(App &$a) {
 
        require_once('include/acl_selectors.php');
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 75bb2b7c817a1f1befe703a2c39f3ad05e09ae1c..fc5c48181759f5bfa2ae5241585083ac0349fe4a 100644 (file)
@@ -15,7 +15,7 @@ function group_init(App &$a) {
 
 function group_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
@@ -73,7 +73,7 @@ function group_post(App &$a) {
 function group_content(App &$a) {
        $change = false;
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied') . EOL);
                return;
        }
index 446d12a6ab32fb429bc5a513054bda48627a9d2f..99b3a3ddcca3c486420d860336b0eeb5891f8734 100644 (file)
@@ -5,12 +5,15 @@ function ignored_init(App &$a) {
 
        $ignored = 0;
 
-       if(! local_user())
+       if (! local_user()) {
                killme();
-       if($a->argc > 1)
+       }
+       if ($a->argc > 1) {
                $message_id = intval($a->argv[1]);
-       if(! $message_id)
+       }
+       if (! $message_id) {
                killme();
+       }
 
        $r = q("SELECT `ignored` FROM `thread` WHERE `uid` = %d AND `iid` = %d LIMIT 1",
                intval(local_user()),
@@ -20,8 +23,9 @@ function ignored_init(App &$a) {
                killme();
        }
 
-       if(! intval($r[0]['ignored']))
+       if (! intval($r[0]['ignored'])) {
                $ignored = 1;
+       }
 
        $r = q("UPDATE `thread` SET `ignored` = %d WHERE `uid` = %d and `iid` = %d",
                intval($ignored),
@@ -31,7 +35,7 @@ function ignored_init(App &$a) {
 
        // See if we've been passed a return path to redirect to
        $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
-       if($return_path) {
+       if ($return_path) {
                $rand = '_=' . time();
                if(strpos($return_path, '?')) $rand = "&$rand";
                else $rand = "?$rand";
index 79b30d6e4b6eabcc3e86fc1fcc63de95ed204408..2db71742f167e20d7016ce0e346efaccaf166279 100644 (file)
@@ -11,7 +11,7 @@ require_once('include/email.php');
 
 function invite_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
@@ -97,7 +97,7 @@ function invite_post(App &$a) {
 
 function invite_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 3eecfbb7150c939ffb3c6d6f964f1519e395677c..835a7fbcb7b781c0ad988692d3a2a702494417c8 100644 (file)
@@ -5,8 +5,9 @@ require_once("include/text.php");
 
 function manage_post(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $uid = local_user();
        $orig_record = $a->user;
@@ -93,7 +94,7 @@ function manage_post(App &$a) {
 
 function manage_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index cdf2f8eacd6d6d8afd16e3f76b48bf4de0542196..8bc255023f6d2e7517b04c420cf716eb9bcf4daa 100644 (file)
@@ -16,8 +16,9 @@ require_once('mod/proxy.php');
 function match_content(App &$a) {
 
        $o = '';
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $a->page['aside'] .= findpeople_widget();
        $a->page['aside'] .= follow_widget();
index 0191eab0c9308f93816441537436907dcb9985f3..ef62a7898177d1b673e76b3bb2e1c8668d14f607 100644 (file)
@@ -42,7 +42,7 @@ function message_init(App &$a) {
 
 function message_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
@@ -178,7 +178,7 @@ function message_content(App &$a) {
        $o = '';
        nav_set_selected('messages');
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index e98c16108f4e1627fb5073d0703b97dc0df1603b..0e603c869a110e5155819b611a42c2bf58f4102c 100644 (file)
@@ -7,8 +7,9 @@ require_once('include/items.php');
 
 function mood_init(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $uid = local_user();
        $verb = notags(trim($_GET['verb']));
@@ -110,7 +111,7 @@ function mood_init(App &$a) {
 
 function mood_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index dde3a3bae71cf06a3a4f78bef7457b579c227451..8b24b3e11b4ef30e2865916ff9bc16ee4ff532b7 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 function network_init(App &$a) {
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
@@ -308,7 +308,7 @@ function network_content(&$a, $update = 0) {
 
        require_once('include/conversation.php');
 
-       if(! local_user()) {
+       if (! local_user()) {
                $_SESSION['return_url'] = $a->query_string;
                return login(false);
        }
index 3cf02069dfc1c29bbd79ea4b9d06ab32ee672f67..900ca4de095f606a187a5325c4cca4cc635d25cf 100644 (file)
@@ -6,14 +6,16 @@ require_once('include/contact_selectors.php');
 
 function nogroup_init(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        require_once('include/group.php');
        require_once('include/contact_widgets.php');
 
-       if(! x($a->page,'aside'))
+       if (! x($a->page,'aside')) {
                $a->page['aside'] = '';
+       }
 
        $a->page['aside'] .= group_side('contacts','group','extended',0,$contact_id);
 }
@@ -21,7 +23,7 @@ function nogroup_init(App &$a) {
 
 function nogroup_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return '';
        }
index f50f41eaf2e82db354d99b239bb667ced94f453b..b2aa5487af963e60d1b456dbf39ec1b258b20aea 100644 (file)
@@ -2,8 +2,9 @@
 
 function notes_init(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $profile = 0;
 
@@ -18,7 +19,7 @@ function notes_init(App &$a) {
 
 function notes_content(&$a,$update = false) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index e7f32a58721156e654de62b339dc5369f6c69cb9..e4fa08f3e2be4e9840b246ccae929e9a82975540 100644 (file)
@@ -11,7 +11,7 @@ require_once("include/network.php");
 
 function notifications_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                goaway(z_root());
        }
 
@@ -67,7 +67,7 @@ function notifications_post(App &$a) {
 
 function notifications_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 83b9453f2f3a6c50a173dab8243de4e7636f6fe2..49c5d01f4504fb33e4f6d40186b2f87f0529149b 100644 (file)
@@ -16,12 +16,12 @@ function oexchange_init(App &$a) {
 
 function oexchange_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                $o = login(false);
                return $o;
        }
 
-       if(($a->argc > 1) && $a->argv[1] === 'done') {
+       if (($a->argc > 1) && $a->argv[1] === 'done') {
                info( t('Post successful.') . EOL);
                return;
        }
index 55abdf183fbf207e922ac9ba1465d2153ec24d88..ba17e28b73992b47238fc14ab725a96582172224 100644 (file)
@@ -5,7 +5,7 @@ require_once('include/follow.php');
 
 function ostatus_subscribe_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                goaway($_SESSION['return_url']);
                // NOTREACHED
index cc6d4ff8966a3608c5b316b6edd5277401d7d307..2e15ed853ff395be7363279c8d9499871d3348a4 100644 (file)
@@ -21,25 +21,29 @@ require_once('include/items.php');
 
 function poke_init(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $uid = local_user();
        $verb = notags(trim($_GET['verb']));
 
-       if(! $verb)
+       if (! $verb) {
                return;
+       }
 
        $verbs = get_poke_verbs();
 
-       if(! array_key_exists($verb,$verbs))
+       if (! array_key_exists($verb,$verbs)) {
                return;
+       }
 
        $activity = ACTIVITY_POKE . '#' . urlencode($verbs[$verb][0]);
 
        $contact_id = intval($_GET['cid']);
-       if(! $contact_id)
+       if (! $contact_id) {
                return;
+       }
 
        $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : 0);
 
@@ -146,7 +150,7 @@ function poke_init(App &$a) {
 
 function poke_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index fd7302e4dadc07a62a0bdd51158f7c919bc3edfd..356c507f7a377f57f46ac84dfb045b01b923c3be 100644 (file)
@@ -4,7 +4,7 @@ require_once("include/Photo.php");
 
 function profile_photo_init(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                return;
        }
 
@@ -15,7 +15,7 @@ function profile_photo_init(App &$a) {
 
 function profile_photo_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice ( t('Permission denied.') . EOL );
                return;
        }
@@ -172,7 +172,7 @@ function profile_photo_post(App &$a) {
 if(! function_exists('profile_photo_content')) {
 function profile_photo_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL );
                return;
        }
index cca7a57ec5504a9acbbe6a801f2418ed7ead74b5..20bd4cf6f1d11db35f77db9805615a147ac0ae29 100644 (file)
@@ -6,7 +6,7 @@ function profiles_init(App &$a) {
 
        nav_set_selected('profiles');
 
-       if(! local_user()) {
+       if (! local_user()) {
                return;
        }
 
@@ -162,7 +162,7 @@ function profile_clean_keywords($keywords) {
 
 function profiles_post(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
@@ -595,14 +595,15 @@ function profile_activity($changed, $value) {
        $arr['deny_gid']  = $a->user['deny_gid'];
 
        $i = item_store($arr);
-       if($i)
+       if ($i) {
                proc_run(PRIORITY_HIGH, "include/notifier.php", "activity", $i);
+       }
 }
 
 
 function profiles_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 694e2f4db7769e8c3b47492cfc119c27d43ffefb..bbb055b021c382e639dd5e50d20cb5b29419bd70 100644 (file)
@@ -2,8 +2,9 @@
 
 function profperm_init(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        $which = $a->user['nickname'];
        $profile = $a->argv[1];
@@ -15,7 +16,7 @@ function profperm_init(App &$a) {
 
 function profperm_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied') . EOL);
                return;
        }
index b42b1cfd8424283315ce6c27f04db063c63fee3c..118c93d9fa31a3d75d8508237a2f3869beed27e8 100644 (file)
@@ -2,8 +2,9 @@
 
 function qsearch_init(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                killme();
+       }
 
        $limit = (get_config('system','qsearch_limit') ? intval(get_config('system','qsearch_limit')) : 100);
 
index 60da71321eb89f2b83edfe63ca4d84764de2d600..44bdfe66449029aa9bc1b6380afcb44f8ff6fa10 100644 (file)
@@ -103,32 +103,33 @@ function regmod_content(App &$a) {
 
        $_SESSION['return_url'] = $a->cmd;
 
-       if(! local_user()) {
+       if (! local_user()) {
                info( t('Please login.') . EOL);
                $o .= '<br /><br />' . login(($a->config['register_policy'] == REGISTER_CLOSED) ? 0 : 1);
                return $o;
        }
 
-       if((!is_site_admin()) || (x($_SESSION,'submanage') && intval($_SESSION['submanage']))) {
+       if ((!is_site_admin()) || (x($_SESSION,'submanage') && intval($_SESSION['submanage']))) {
                notice( t('Permission denied.') . EOL);
                return '';
        }
 
-       if($a->argc != 3)
+       if ($a->argc != 3) {
                killme();
+       }
 
        $cmd  = $a->argv[1];
        $hash = $a->argv[2];
 
 
 
-       if($cmd === 'deny') {
+       if ($cmd === 'deny') {
                user_deny($hash);
                goaway(App::get_baseurl()."/admin/users/");
                killme();
        }
 
-       if($cmd === 'allow') {
+       if ($cmd === 'allow') {
                user_allow($hash);
                goaway(App::get_baseurl()."/admin/users/");
                killme();
index 2ade3c2dcce05606b2026882dc4fcf6247a27e27..07721220a087150f14a42bedb3d60235381e4c4e 100755 (executable)
@@ -5,7 +5,7 @@ require_once('include/follow.php');
 
 function repair_ostatus_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                goaway($_SESSION['return_url']);
                // NOTREACHED
index 97d4f5f603f6f6a10d5c11324b9158574e0b964a..9aa7c57624381219bf2e12b46ff7b5ee0a86374d 100644 (file)
@@ -18,7 +18,7 @@ function get_theme_config_file($theme){
 
 function settings_init(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL );
                return;
        }
@@ -118,8 +118,9 @@ function settings_init(App &$a) {
 
 function settings_post(App &$a) {
 
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        if (x($_SESSION,'submanage') && intval($_SESSION['submanage'])) {
                return;
@@ -658,7 +659,7 @@ function settings_content(App &$a) {
        $o = '';
        nav_set_selected('settings');
 
-       if(! local_user()) {
+       if (! local_user()) {
                #notice( t('Permission denied.') . EOL );
                return;
        }
index f3fc5870ead480422c2c802fc88225dbb44de4c7..0a78f51aa7ecd00d7b701f1ee4021a22ac0e5655 100644 (file)
@@ -7,12 +7,15 @@ function starred_init(App &$a) {
 
        $starred = 0;
 
-       if(! local_user())
+       if (! local_user()) {
                killme();
-       if($a->argc > 1)
+       }
+       if ($a->argc > 1) {
                $message_id = intval($a->argv[1]);
-       if(! $message_id)
+       }
+       if (! $message_id) {
                killme();
+       }
 
        $r = q("SELECT starred FROM item WHERE uid = %d AND id = %d LIMIT 1",
                intval(local_user()),
index 514b8f83c6dad32d187375eb83e8ed9d8c7cc967..5af337ae1b44116c717b884b22a9e9f1e93c63ad 100644 (file)
@@ -5,12 +5,13 @@ require_once('include/contact_widgets.php');
 
 
 function suggest_init(App &$a) {
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
-       if(x($_GET,'ignore') && intval($_GET['ignore'])) {
+       if (x($_GET,'ignore') && intval($_GET['ignore'])) {
                // Check if we should do HTML-based delete confirmation
-               if($_REQUEST['confirm']) {
+               if ($_REQUEST['confirm']) {
                        // <form> can't take arguments in its "action" parameter
                        // so add any arguments as hidden inputs
                        $query = explode_querystring($a->query_string);
@@ -35,7 +36,7 @@ function suggest_init(App &$a) {
                        return;
                }
                // Now check how the user responded to the confirmation query
-               if(!$_REQUEST['canceled']) {
+               if (!$_REQUEST['canceled']) {
                        q("INSERT INTO `gcign` ( `uid`, `gcid` ) VALUES ( %d, %d ) ",
                                intval(local_user()),
                                intval($_GET['ignore'])
@@ -54,7 +55,7 @@ function suggest_content(App &$a) {
        require_once("mod/proxy.php");
 
        $o = '';
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
        }
index 5c87d0ce263eb8f0214ab9c4c3faf1f3e1cee5c2..212f91d16ee7ff8dd3c1c735f55af1784d993e90 100644 (file)
@@ -4,7 +4,7 @@ require_once('include/bbcode.php');
 
 function tagrm_post(App &$a) {
 
-       if(! local_user())
+       if (! local_user())
                goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
 
 
@@ -52,7 +52,7 @@ function tagrm_content(App &$a) {
 
        $o = '';
 
-       if(! local_user()) {
+       if (! local_user()) {
                goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
                // NOTREACHED
        }
@@ -63,7 +63,6 @@ function tagrm_content(App &$a) {
                // NOTREACHED
        }
 
-
        $r = q("SELECT * FROM `item` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                intval($item),
                intval(local_user())
@@ -75,8 +74,9 @@ function tagrm_content(App &$a) {
 
        $arr = explode(',', $r[0]['tag']);
 
-       if(! count($arr))
+       if (! count($arr)) {
                goaway(App::get_baseurl() . '/' . $_SESSION['photo_return']);
+       }
 
        $o .= '<h3>' . t('Remove Item Tag') . '</h3>';
 
index e98449a8777631fbbc3ceef0f735a741003a100e..7aa9724d5893cd3a102070c3fd2de98b040844e7 100644 (file)
@@ -1,11 +1,12 @@
 <?php
 
 function uexport_init(App &$a){
-       if(! local_user())
+       if (! local_user()) {
                killme();
+       }
 
        require_once("mod/settings.php");
-        settings_init($a);
+       settings_init($a);
 }
 
 function uexport_content(App &$a){
index ccb07697025836fb03c8939141958974067b4b17..8510bd539573ac72ebbd07b1636b53ad06bb61ce 100644 (file)
@@ -3,7 +3,7 @@
 
 function viewsrc_content(App &$a) {
 
-       if(! local_user()) {
+       if (! local_user()) {
                notice( t('Access denied.') . EOL);
                return;
        }
index 7d52bc55bb384bfb393b7a35dec7faed59b545df..485e4c233e0a01a35858390a1361ccf2b9348c43 100644 (file)
@@ -6,60 +6,66 @@
 
 
 function theme_content(App &$a){
-    if(!local_user())
-        return;                
+       if (!local_user()) {
+               return;
+       }
 
-    $colorset = get_pconfig( local_user(), 'duepuntozero', 'colorset');
-    $user = true;
+       $colorset = get_pconfig( local_user(), 'duepuntozero', 'colorset');
+       $user = true;
 
-    return clean_form($a, $colorset, $user);
+       return clean_form($a, $colorset, $user);
 }
 
 function theme_post(App &$a){
-    if(! local_user())
-        return;
-    
-    if (isset($_POST['duepuntozero-settings-submit'])){
-        set_pconfig(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
-    }
+       if (! local_user()) {
+               return;
+       }
+
+       if (isset($_POST['duepuntozero-settings-submit'])){
+               set_pconfig(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
+       }
 }
 
 
 function theme_admin(App &$a){
-    $colorset = get_config( 'duepuntozero', 'colorset');
-    $user = false;
+       $colorset = get_config( 'duepuntozero', 'colorset');
+       $user = false;
 
-    return clean_form($a, $colorset, $user);
+       return clean_form($a, $colorset, $user);
 }
 
 function theme_admin_post(App &$a){
-    if (isset($_POST['duepuntozero-settings-submit'])){
-        set_config('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
-    }
+       if (isset($_POST['duepuntozero-settings-submit'])){
+               set_config('duepuntozero', 'colorset', $_POST['duepuntozero_colorset']);
+       }
 }
 
 /// @TODO $a is no longer used
 function clean_form(&$a, &$colorset, $user){
-    $colorset = array(
-       'default'=>t('default'), 
-        'greenzero'=>t('greenzero'),
-        'purplezero'=>t('purplezero'),
-        'easterbunny'=>t('easterbunny'),
-        'darkzero'=>t('darkzero'),
-        'comix'=>t('comix'),
-        'slackr'=>t('slackr'),
-    );
-    if ($user) {
-        $color = get_pconfig(local_user(), 'duepuntozero', 'colorset');
-    } else {
-        $color = get_config( 'duepuntozero', 'colorset');
-    }
-    $t = get_markup_template("theme_settings.tpl" );
-    $o .= replace_macros($t, array(
-        '$submit'   => t('Submit'),
-        '$baseurl'  => App::get_baseurl(),
-        '$title'    => t("Theme settings"),
-        '$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),
-    ));
-    return $o;
+       $colorset = array(
+               'default'=>t('default'), 
+               'greenzero'=>t('greenzero'),
+               'purplezero'=>t('purplezero'),
+               'easterbunny'=>t('easterbunny'),
+               'darkzero'=>t('darkzero'),
+               'comix'=>t('comix'),
+               'slackr'=>t('slackr'),
+       );
+
+       if ($user) {
+               $color = get_pconfig(local_user(), 'duepuntozero', 'colorset');
+       } else {
+               $color = get_config( 'duepuntozero', 'colorset');
+       }
+
+       $t = get_markup_template("theme_settings.tpl" );
+       /// @TODO No need for adding string here, $o is not defined
+       $o .= replace_macros($t, array(
+               '$submit'   => t('Submit'),
+               '$baseurl'  => App::get_baseurl(),
+               '$title'=> t("Theme settings"),
+               '$colorset' => array('duepuntozero_colorset', t('Variations'), $color, '', $colorset),
+       ));
+
+       return $o;
 }
index cb2683aa0bc6a112bb2073a2fba3ca6fd1d5f958..000ef26092fa43330d1dcdda24489ade8980f3f6 100644 (file)
@@ -2,7 +2,9 @@
 require_once('view/theme/frio/php/Image.php');
 
 function theme_content(App &$a) {
-       if(!local_user()) { return;}
+       if (!local_user()) {
+               return;
+       }
        $arr = array();
 
        $arr["schema"]          = get_pconfig(local_user(),'frio', 'schema');
@@ -18,7 +20,10 @@ function theme_content(App &$a) {
 }
 
 function theme_post(App &$a) {
-       if(!local_user()) { return;}
+       if (!local_user()) {
+               return;
+       }
+
        if (isset($_POST['frio-settings-submit'])) {
                set_pconfig(local_user(), 'frio', 'schema',             $_POST["frio_schema"]);
                set_pconfig(local_user(), 'frio', 'nav_bg',             $_POST["frio_nav_bg"]);
index 11e6f6cbce0d48513ddec68cde31412d29dffa14..1a5a9c02132938bb5839467b05735a8e2272c7ec 100644 (file)
@@ -6,21 +6,23 @@
 
 
 function theme_content(App &$a){
-       if(!local_user())
-               return;         
-       
+       if (!local_user()) {
+               return;
+       }
+
        $align = get_pconfig(local_user(), 'quattro', 'align' );
        $color = get_pconfig(local_user(), 'quattro', 'color' );
-    $tfs = get_pconfig(local_user(),"quattro","tfs");
-    $pfs = get_pconfig(local_user(),"quattro","pfs");    
-    
+       $tfs = get_pconfig(local_user(),"quattro","tfs");
+       $pfs = get_pconfig(local_user(),"quattro","pfs");
+
        return quattro_form($a,$align, $color, $tfs, $pfs);
 }
 
 function theme_post(App &$a){
-       if(! local_user())
+       if (! local_user()) {
                return;
-       
+       }
+
        if (isset($_POST['quattro-settings-submit'])){
                set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
                set_pconfig(local_user(), 'quattro', 'color', $_POST['quattro_color']);
index 55ef2654f1baa9639dfc071e3bd17a38dfdbaf85..5326498908d931bf7130db6d3ab1e6e638d1182f 100644 (file)
@@ -6,19 +6,23 @@
 
 
 function theme_content(App &$a){
-       if(!local_user())
+       if (!local_user()) {
                return;
+       }
 
-       if (!function_exists('get_vier_config'))
+       if (!function_exists('get_vier_config')) {
                return;
+       }
 
        $style = get_pconfig(local_user(), 'vier', 'style');
 
-       if ($style == "")
+       if ($style == "") {
                $style = get_config('vier', 'style');
+       }
 
-       if ($style == "")
+       if ($style == "") {
                $style = "plus";
+       }
 
        $show_pages = get_vier_config('show_pages', true);
        $show_profiles = get_vier_config('show_profiles', true);
@@ -32,8 +36,9 @@ function theme_content(App &$a){
 }
 
 function theme_post(App &$a){
-       if(! local_user())
+       if (! local_user()) {
                return;
+       }
 
        if (isset($_POST['vier-settings-submit'])){
                set_pconfig(local_user(), 'vier', 'style', $_POST['vier_style']);