]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
mod/dirfind.php - Friendika -> Friendica
[friendica.git] / mod / settings.php
old mode 100644 (file)
new mode 100755 (executable)
index 35902f8..57a4e6d
@@ -39,10 +39,11 @@ EOT;
 
 function settings_post(&$a) {
 
-       if(! local_user()) {
-               notice( t('Permission denied.') . EOL);
+       if(! local_user())
+               return;
+
+       if(x($_SESSION,'submanage') && intval($_SESSION['submanage']))
                return;
-       }
 
        if(count($a->user) && x($a->user,'uid') && $a->user['uid'] != local_user()) {
                notice( t('Permission denied.') . EOL);
@@ -255,6 +256,10 @@ function settings_post(&$a) {
                $notify += intval($_POST['notify4']);
        if(x($_POST,'notify5'))
                $notify += intval($_POST['notify5']);
+       if(x($_POST,'notify6'))
+               $notify += intval($_POST['notify6']);
+       if(x($_POST,'notify7'))
+               $notify += intval($_POST['notify7']);
 
        $email_changed = false;
 
@@ -399,6 +404,11 @@ function settings_content(&$a) {
                notice( t('Permission denied.') . EOL );
                return;
        }
+
+       if(x($_SESSION,'submanage') && intval($_SESSION['submanage'])) {
+               notice( t('Permission denied.') . EOL );
+               return;
+       }
        
        $tabs = array(
                array(
@@ -724,8 +734,11 @@ function settings_content(&$a) {
        if($files) {
                foreach($files as $file) {
                        $f = basename($file);
-                       $theme_name = ((file_exists($file . '/experimental')) ?  sprintf("%s - \x28Experimental\x29", $f) : $f);
-                       $themes[$f]=$theme_name;
+                       $is_experimental = file_exists($file . '/experimental');
+                       if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){ 
+                               $theme_name = (($is_experimental) ?  sprintf("%s - \x28Experimental\x29", $f) : $f);
+                               $themes[$f]=$theme_name;
+                       }
                }
        }
        $theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']);
@@ -747,7 +760,7 @@ function settings_content(&$a) {
        $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
 
        $expire_arr = array(
-               'days' => array('expire',  t("Automatically expire posts after days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
+               'days' => array('expire',  t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
                'advanced' => t('Advanced expiration settings'),
                'label' => t('Advanced Expiration'),
                'items' => array('expire_items',  t("Expire posts:"), $expire_items, '', array(t('No'),t('Yes'))),
@@ -807,7 +820,8 @@ function settings_content(&$a) {
                '$notify3'      => array('notify3', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''),
                '$notify4'      => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''),
                '$notify5'      => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''),
-               
+               '$notify6'  => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''),          
+               '$notify7'  => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''),         
                
                
                '$h_advn' => t('Advanced Page Settings'),