]> git.mxchange.org Git - friendica.git/blobdiff - mod/admin.php
Merge pull request #646 from annando/master
[friendica.git] / mod / admin.php
index fb333c3e5c389bfe69b8701f519ab7cdb4e45ba5..66a5db1df864bd419e5ec0ed6bcd2057ce03b3c8 100644 (file)
@@ -256,7 +256,9 @@ function admin_page_site_post(&$a){
        $thread_allow           =       ((x($_POST,'thread_allow'))             ? True                                          : False);
        $newuser_private                =       ((x($_POST,'newuser_private'))          ? True                                          : False);
        $enotify_no_content             =       ((x($_POST,'enotify_no_content'))       ? True                                          : False);
-
+       $private_addons                 =       ((x($_POST,'private_addons'))           ? True                                          : False);
+       $disable_embedded               =       ((x($_POST,'disable_embedded'))         ? True                                          : False);
+       
        $no_multi_reg           =       ((x($_POST,'no_multi_reg'))             ? True                                          : False);
        $no_openid              =       !((x($_POST,'no_openid'))               ? True                                          : False);
        $no_regfullname         =       !((x($_POST,'no_regfullname'))          ? True                                          : False);
@@ -283,7 +285,6 @@ function admin_page_site_post(&$a){
        $temppath               =       ((x($_POST,'temppath'))                 ? notags(trim($_POST['temppath']))              : '');
        $basepath               =       ((x($_POST,'basepath'))                 ? notags(trim($_POST['basepath']))              : '');
        $singleuser             =       ((x($_POST,'singleuser'))               ? notags(trim($_POST['singleuser']))            : '');
-
        if($ssl_policy != intval(get_config('system','ssl_policy'))) {
                if($ssl_policy == SSL_POLICY_FULL) {
                        q("update `contact` set 
@@ -374,6 +375,7 @@ function admin_page_site_post(&$a){
        set_config('system','thread_allow', $thread_allow);
        set_config('system','newuser_private', $newuser_private);
        set_config('system','enotify_no_content', $enotify_no_content);
+       set_config('system','disable_embedded', $disable_embedded);
 
        set_config('system','block_extended_register', $no_multi_reg);
        set_config('system','no_openid', $no_openid);
@@ -387,7 +389,8 @@ function admin_page_site_post(&$a){
        set_config('system','dfrn_only', $dfrn_only);
        set_config('system','ostatus_disabled', $ostatus_disabled);
        set_config('system','diaspora_enabled', $diaspora_enabled);
-
+       set_config('config','private_addons', $private_addons);
+       
        set_config('system','new_share', $new_share);
        set_config('system','hide_help', $hide_help);
        set_config('system','use_fulltext_engine', $use_fulltext_engine);
@@ -396,8 +399,7 @@ function admin_page_site_post(&$a){
        set_config('system','lockpath', $lockpath);
        set_config('system','temppath', $temppath);
        set_config('system','basepath', $basepath);
-
-
+       
        info( t('Site settings updated.') . EOL);
        goaway($a->get_baseurl(true) . '/admin/site' );
        return; // NOTREACHED
@@ -509,7 +511,9 @@ function admin_page_site(&$a) {
                '$thread_allow'         => array('thread_allow', t("Allow threaded items"), get_config('system','thread_allow'), t("Allow infinite level threading for items on this site.")),
                '$newuser_private'      => array('newuser_private', t("Private posts by default for new users"), get_config('system','newuser_private'), t("Set default post permissions for all new members to the default privacy group rather than public.")),
                '$enotify_no_content'   => array('enotify_no_content', t("Don't include post content in email notifications"), get_config('system','enotify_no_content'), t("Don't include the content of a post/comment/private message/etc. in the email notifications that are sent out from this site, as a privacy measure.")),
-
+               '$private_addons'       => array('private_addons', t("Disallow public access to addons listed in the apps menu."), get_config('config','private_addons'), t("Checking this box will restrict addons listed in the apps menu to members only.")),
+               '$disable_embedded'     => array('disable_embedded', t("Don't embed private images in posts"), get_config('system','disable_embedded'), t("Don't replace locally-hosted private photos in posts with an embedded copy of the image. This means that contacts who receive posts containing private photos will have to authenticate and load each image, which may take a while.")),
+               
                '$no_multi_reg'         => array('no_multi_reg', t("Block multiple registrations"),  get_config('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")),
                '$no_openid'            => array('no_openid', t("OpenID support"), !get_config('system','no_openid'), t("OpenID support for registration and logins.")),
                '$no_regfullname'       => array('no_regfullname', t("Fullname check"), !get_config('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")),
@@ -532,7 +536,6 @@ function admin_page_site(&$a) {
                '$lockpath'             => array('lockpath', t("Path for lock file"), get_config('system','lockpath'), "The lock file is used to avoid multiple pollers at one time. Only define a folder here."),
                '$temppath'             => array('temppath', t("Temp path"), get_config('system','temppath'), "If you have a restricted system where the webserver can't access the system temp path, enter another path here."),
                '$basepath'             => array('basepath', t("Base path to installation"), get_config('system','basepath'), "If the system cannot detect the correct path to your installation, enter the correct path here. This setting should only be set if you are using a restricted system and symbolic links to your webroot."),
-
         '$form_security_token' => get_form_security_token("admin_site"),
 
        ));
@@ -694,7 +697,7 @@ function admin_page_users(&$a){
        }
        
        
-       $users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date`
+       $users = q("SELECT `user` . * , `contact`.`name` , `contact`.`url` , `contact`.`micro`, `lastitem`.`lastitem_date`, `user`.`account_expired`
                                FROM
                                        (SELECT MAX(`item`.`changed`) as `lastitem_date`, `item`.`uid`
                                        FROM `item`
@@ -718,7 +721,7 @@ function admin_page_users(&$a){
                        t('Normal Account'), 
                        t('Soapbox Account'),
                        t('Community/Celebrity Account'),
-                       t('Automatic Friend Account')
+                        t('Automatic Friend Account')
                );
                $e['page-flags'] = $accounts[$e['page-flags']];
                $e['register_date'] = relative_date($e['register_date']);
@@ -756,6 +759,7 @@ function admin_page_users(&$a){
                '$block' => t('Block'),
                '$unblock' => t('Unblock'),
         '$siteadmin' => t('Site admin'),
+        '$accountexpired' => t('Account expired'),
                
                '$h_users' => t('Users'),
                '$th_users' => array( t('Name'), t('Email'), t('Register date'), t('Last login'), t('Last item'),  t('Account') ),