Merge branch '2014.11' into 2014.11-develop
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 18 Nov 2015 12:36:46 +0000 (13:36 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 18 Nov 2015 12:36:46 +0000 (13:36 +0100)
Conflicts:
tine20/Tinebase/Core.php
tine20/composer.lock

Change-Id: Ife9bc84cac193b8e09c487f75f64861867d65cdb

1  2 
tine20/Calendar/Controller/Event.php
tine20/Tinebase/Config.php
tine20/Tinebase/Controller.php
tine20/Tinebase/Core.php
tine20/Tinebase/User.php
tine20/Tinebase/js/LoginPanel.js
tine20/composer.json
tine20/composer.lock

Simple merge
Simple merge
Simple merge
@@@ -1628,43 -1628,13 +1628,54 @@@ class Tinebase_Cor
      }
  
      /**
 +     * returns TRUE if filesystem is available
 +     *
 +     *  - value is stored in session and registry for caching
 +     *
 +     * @return boolean
 +     */
 +    public static function isFilesystemAvailable()
 +    {
 +        $isFileSystemAvailable = self::get('FILESYSTEM');
 +        if ($isFileSystemAvailable === null) {
 +            try {
 +                $session = Tinebase_Session::getSessionNamespace();
 +
 +                if (isset($session->filesystemAvailable)) {
 +                    $isFileSystemAvailable = $session->filesystemAvailable;
 +
 +                    self::set('FILESYSTEM', $isFileSystemAvailable);
 +                    return $isFileSystemAvailable;
 +                }
 +            } catch (Zend_Session_Exception $zse) {
 +                $session = null;
 +            }
 +
 +            $isFileSystemAvailable = (!empty(Tinebase_Core::getConfig()->filesdir) && is_writeable(Tinebase_Core::getConfig()->filesdir));
 +
 +            if ($session instanceof Zend_Session_Namespace) {
 +                if (Tinebase_Session::isWritable()) {
 +                    $session->filesystemAvailable = $isFileSystemAvailable;
 +                }
 +            }
 +
 +            if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__
 +                . ' Filesystem available: ' . ($isFileSystemAvailable ? 'yes' : 'no'));
 +
 +            self::set('FILESYSTEM', $isFileSystemAvailable);
 +        }
 +
 +        return $isFileSystemAvailable;
 +    }
++
++    /**
+      * returns true if installation is in maintenance mode
+      *
+      * @return bool
+      */
+     public static function inMaintenanceMode()
+     {
+         $config = self::getConfig();
+         return !! $config->maintenanceMode;
+     }
  }
Simple merge
@@@ -473,34 -473,26 +473,26 @@@ Tine.Tinebase.LoginPanel = Ext.extend(E
                      if (responseData.success === true) {
                          Ext.MessageBox.wait(String.format(_('Login successful. Loading {0}...'), Tine.title), _('Please wait!'));
                          window.document.title = this.originalTitle;
 -                        this.onLogin.call(this.scope);
 +                        this.onLogin.call(this.scope, response);
                      } else {
-                         if (responseData.data && responseData.data.code === 510) {
-                             // NOTE: when communication is lost, we can't create a nice ext window.
-                             (function() {
-                                 Ext.MessageBox.hide();
-                                 alert(_('Connection lost, please check your network!'));
-                             }).defer(1000);
-                         } else {
-                             var modSsl = Tine.Tinebase.registry.get('modSsl');
-                             var resultMsg = modSsl ? _('There was an error verifying your certificate!!!') : 
-                                 _('Your username and/or your password are wrong!!!');
-                             Ext.MessageBox.show({
-                                 title: _('Login failure'),
-                                 msg: resultMsg,
-                                 buttons: Ext.MessageBox.OK,
-                                 icon: Ext.MessageBox.ERROR,
-                                 fn: function () {
-                                     this.getLoginPanel().getForm().findField('password').focus(true);
-                                     if(document.getElementById('useCaptcha')) {
-                                         if(typeof responseData.c1 != 'undefined') {
-                                             document.getElementById('imgCaptcha').src = 'data:image/png;base64,' + responseData.c1;
-                                             document.getElementById('contImgCaptcha').style.visibility = 'visible';  
-                                         }
+                         var modSsl = Tine.Tinebase.registry.get('modSsl');
+                         var resultMsg = modSsl ? _('There was an error verifying your certificate!!!') :
+                             _('Your username and/or your password are wrong!!!');
+                         Ext.MessageBox.show({
+                             title: _('Login failure'),
+                             msg: resultMsg,
+                             buttons: Ext.MessageBox.OK,
+                             icon: Ext.MessageBox.ERROR,
+                             fn: function () {
+                                 this.getLoginPanel().getForm().findField('password').focus(true);
+                                 if(document.getElementById('useCaptcha')) {
+                                     if(typeof responseData.c1 != 'undefined') {
+                                         document.getElementById('imgCaptcha').src = 'data:image/png;base64,' + responseData.c1;
+                                         document.getElementById('contImgCaptcha').style.visibility = 'visible';
                                      }
-                                 }.createDelegate(this)
-                             });
-                         }
+                                 }
+                             }.createDelegate(this)
+                         });
                      }
                  }
              });
Simple merge
@@@ -4,7 -4,7 +4,7 @@@
          "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
          "This file is @generated automatically"
      ],
-     "hash": "cafad787e54abed7906e7020890d054b",
 -    "hash": "7f598a1ec2745d0206ba93eba4bca97a",
++    "hash": "382e9404c17b35e340a7305bedb2b8e3",
      "packages": [
          {
              "name": "codeplex/phpexcel",