]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #3109 from Hypolite/issue/scrap-tinymce
authorMichael Vogel <icarus@dabo.de>
Fri, 27 Jan 2017 20:08:33 +0000 (21:08 +0100)
committerGitHub <noreply@github.com>
Fri, 27 Jan 2017 20:08:33 +0000 (21:08 +0100)
Scrap TinyMCE

1  2 
boot.php

diff --combined boot.php
index ef787c63530ce1c9d304ffd814bedf70ba12fe22,ed880ec09cb97683da5e601bf5a0a13e20285467..92dd051671f95513436470c642de46177509d154
+++ b/boot.php
@@@ -19,8 -19,6 +19,8 @@@
  
  require_once('include/autoloader.php');
  
 +use \Friendica\Core\Config;
 +
  require_once('include/config.php');
  require_once('include/network.php');
  require_once('include/plugin.php');
@@@ -40,7 -38,7 +40,7 @@@ define ( 'FRIENDICA_PLATFORM',     'Fri
  define ( 'FRIENDICA_CODENAME',     'Asparagus');
  define ( 'FRIENDICA_VERSION',      '3.5.1-dev' );
  define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
 -define ( 'DB_UPDATE_VERSION',      1212      );
 +define ( 'DB_UPDATE_VERSION',      1213      );
  
  /**
   * @brief Constant with a HTML line break.
@@@ -532,7 -530,6 +532,6 @@@ class App 
        public  $videoheight = 350;
        public  $force_max_items = 0;
        public  $theme_thread_allow = true;
-       public  $theme_richtext_editor = true;
        public  $theme_events_in_profile = true;
  
        /**
  
                $scheme = $this->scheme;
  
 -              if ((x($this->config, 'system')) && (x($this->config['system'], 'ssl_policy'))) {
 -                      if (intval($this->config['system']['ssl_policy']) === SSL_POLICY_FULL) {
 -                              $scheme = 'https';
 -                      }
 +              if (Config::get('system', 'ssl_policy') === SSL_POLICY_FULL) {
 +                      $scheme = 'https';
 +              }
  
 -                      //      Basically, we have $ssl = true on any links which can only be seen by a logged in user
 -                      //      (and also the login link). Anything seen by an outsider will have it turned off.
 +              //      Basically, we have $ssl = true on any links which can only be seen by a logged in user
 +              //      (and also the login link). Anything seen by an outsider will have it turned off.
  
 -                      if ($this->config['system']['ssl_policy'] == SSL_POLICY_SELFSIGN) {
 -                              if ($ssl) {
 -                                      $scheme = 'https';
 -                              } else {
 -                                      $scheme = 'http';
 -                              }
 +              if (Config::get('system', 'ssl_policy') == SSL_POLICY_SELFSIGN) {
 +                      if ($ssl) {
 +                              $scheme = 'https';
 +                      } else {
 +                              $scheme = 'http';
                        }
                }
  
 -              if (get_config('config', 'hostname') != '') {
 +              if (Config::get('config', 'hostname') != '') {
                        $this->hostname = get_config('config', 'hostname');
                }
  
                        // If the last worker fork was less than 10 seconds before then don't fork another one.
                        // This should prevent the forking of masses of workers.
                        if (get_config("system", "worker")) {
 -                              if ((time() - get_config("system", "proc_run_started")) < 10)
 -                                      return;
 -
 +                              $cachekey = "app:proc_run:started";
 +                              $result = Cache::get($cachekey);
 +                              if (!is_null($result)) {
 +                                      if ((time() - $result) < 10) {
 +                                              return;
 +                                      }
 +                              }
                                // Set the timestamp of the last proc_run
 -                              set_config("system", "proc_run_started", time());
 +                              Cache::set($cachekey, time(), CACHE_MINUTE);
                        }
  
                        $args[0] = ((x($this->config,'php_path')) && (strlen($this->config['php_path'])) ? $this->config['php_path'] : 'php');
@@@ -1479,7 -1474,9 +1478,7 @@@ function system_unavailable() 
  
  function clean_urls() {
        $a = get_app();
 -      //      if($a->config['system']['clean_urls'])
        return true;
 -      //      return false;
  }
  
  function z_path() {
@@@ -1573,7 -1570,7 +1572,7 @@@ function update_db(App $a) 
                $stored = intval($build);
                $current = intval(DB_UPDATE_VERSION);
                if($stored < $current) {
 -                      load_config('database');
 +                      Config::load('database');
  
                        // We're reporting a different version than what is currently installed.
                        // Run any existing update scripts to bring the database up to current.
@@@ -2043,18 -2040,16 +2042,18 @@@ function current_theme()
  //            $is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
        $is_mobile = $a->is_mobile || $a->is_tablet;
  
 -      $standard_system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
 +      $standard_system_theme = Config::get('system', 'theme', '');
        $standard_theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $standard_system_theme);
  
 -      if($is_mobile) {
 -              if(isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
 +      if ($is_mobile) {
 +              if (isset($_SESSION['show-mobile']) && !$_SESSION['show-mobile']) {
                        $system_theme = $standard_system_theme;
                        $theme_name = $standard_theme_name;
 -              }
 -              else {
 -                      $system_theme = ((isset($a->config['system']['mobile-theme'])) ? $a->config['system']['mobile-theme'] : $standard_system_theme);
 +              } else {
 +                      $system_theme = Config::get('system', 'mobile-theme', '');
 +                      if ($system_theme == '') {
 +                              $system_theme = $standard_system_theme;
 +                      }
                        $theme_name = ((isset($_SESSION) && x($_SESSION,'mobile-theme')) ? $_SESSION['mobile-theme'] : $system_theme);
  
                        if($theme_name === '---') {