]> git.mxchange.org Git - friendica.git/blobdiff - mod/admin.php
Merge branch 'newui' of github.com:fabrixxm/friendika into newui
[friendica.git] / mod / admin.php
index 1a926443f8b4f08f96d6ba4c6d6e5f06b1039258..da561d554b098383eabf790728ecf967f6f2ba4d 100644 (file)
@@ -197,6 +197,7 @@ function admin_page_site_post(&$a){
        $timeout                        =       ((x($_POST,'timeout'))                  ? intval(trim($_POST['timeout']))               : 60);
        $dfrn_only          =   ((x($_POST,'dfrn_only'))            ? True      :       False);
     $ostatus_disabled   =   !((x($_POST,'ostatus_disabled')) ? True  :   False);
+       $diaspora_enabled   =   ((x($_POST,'diaspora_enabled')) ? True   :  False);
 
 
        set_config('config','sitename',$sitename);
@@ -241,6 +242,7 @@ function admin_page_site_post(&$a){
        set_config('system','curl_timeout', $timeout);
        set_config('system','dfrn_only', $dfrn_only);
        set_config('system','ostatus_disabled', $ostatus_disabled);
+       set_config('system','diaspora_enabled', $diaspora_enabled);
 
        info( t('Site settings updated.') . EOL);
        goaway($a->get_baseurl() . '/admin/site' );
@@ -325,6 +327,7 @@ function admin_page_site(&$a) {
                '$no_utf'                       => array('no_utf', t("UTF-8 Regular expressions"), !get_config('system','no_utf'), "Use PHP UTF8 regular expressions"),
                '$no_community_page' => array('no_community_page', t("Show Community Page"), !get_config('system','no_community_page'), "Display a Community page showing all recent public postings on this site."),
                '$ostatus_disabled' => array('ostatus_disabled', t("Enable OStatus support"), !get_config('system','ostatus_disable'), "Provide built-in OStatus \x28identi.ca, status.net, etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."),    
+               '$diaspora_enabled' => array('diaspora_enabled', t("Enable Diaspora support"), get_config('system','diaspora_enabled'), "Provide built-in Diaspora network compatibility."),    
                '$dfrn_only'        => array('dfrn_only', t('Only allow Friendika contacts'), get_config('system','dfrn_only'), "All contacts must use Friendika protocols. All other built-in communication protocols disabled."),
                '$verifyssl'            => array('verifyssl', t("Verify SSL"), get_config('system','verifyssl'), "If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites."),
                '$proxyuser'            => array('proxyuser', t("Proxy user"), get_config('system','proxyuser'), ""),
@@ -341,7 +344,7 @@ function admin_page_site(&$a) {
  * Users admin page
  */
 function admin_page_users_post(&$a){
-       $pending = ( x(£_POST, 'pending') ? $_POST['pending'] : Array() );
+       $pending = ( x($_POST, 'pending') ? $_POST['pending'] : Array() );
        $users = ( x($_POST, 'user') ? $_POST['user'] : Array() );
        
        if (x($_POST,'page_users_block')){
@@ -537,7 +540,7 @@ function admin_page_plugins(&$a){
                } 
                
                $admin_form="";
-               if (in_array($plugin, $a->plugins_admin)){
+               if (is_array($a->plugins_admin) && in_array($plugin, $a->plugins_admin)){
                        @require_once("addon/$plugin/$plugin.php");
                        $func = $plugin.'_plugin_admin';
                        $func($a, $admin_form);
@@ -629,7 +632,7 @@ function admin_page_logs(&$a){
 
        $f = get_config('system','logfile');
        $size = filesize($f);
-       if($size > 5000000)
+       if($size > 5000000 || $size < 0)
                $size = 5000000;
 
        $data = '';