瀏覽代碼

in case of maintenance the error page returns http status 503.

This is necessary to enable the desktop sync client to react properly.
Currently the SabreDAV plugin OC_Connector_Sabre_MaintenancePlugin is not executed because this error page is returned before the SabreDAV code is executed
tags/v5.0.0alpha1
Thomas Mueller 11 年之前
父節點
當前提交
31ce320c52
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6
    0
      lib/base.php

+ 6
- 0
lib/base.php 查看文件

@@ -231,6 +231,12 @@ class OC
public static function checkMaintenanceMode() {
// Allow ajax update script to execute without being stopped
if (OC_Config::getValue('maintenance', false) && OC::$SUBURI != '/core/ajax/update.php') {
// send http status 503
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 120');

// render error page
$tmpl = new OC_Template('', 'error', 'guest');
$tmpl->assign('errors', array(1 => array('error' => 'ownCloud is in maintenance mode')));
$tmpl->printPage();

Loading…
取消
儲存