Skip to content
Snippets Groups Projects
Commit b9f3bb24 authored by Markus Goetz's avatar Markus Goetz
Browse files

Merge pull request #4441 from guruz/checkServer_cache_result

Cache OC_Util::checkServer() result in session
parents 680ac488 3972198b
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,10 @@ class OC_Util { ...@@ -168,6 +168,10 @@ class OC_Util {
* @return array arrays with error messages and hints * @return array arrays with error messages and hints
*/ */
public static function checkServer() { public static function checkServer() {
// Assume that if checkServer() succeeded before in this session, then all is fine.
if(\OC::$session->exists('checkServer_suceeded') && \OC::$session->get('checkServer_suceeded'))
return array();
$errors=array(); $errors=array();
$defaults = new \OC_Defaults(); $defaults = new \OC_Defaults();
...@@ -309,6 +313,9 @@ class OC_Util { ...@@ -309,6 +313,9 @@ class OC_Util {
'hint'=>'Please ask your server administrator to restart the web server.'); 'hint'=>'Please ask your server administrator to restart the web server.');
} }
// Cache the result of this function
\OC::$session->set('checkServer_suceeded', count($errors) == 0);
return $errors; return $errors;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment