--- /dev/null
+{include file='documentHeader'}
+
+<head>
+ <title>{lang}wcf.global.error.title{/lang} - {PAGE_TITLE|language}</title>
+
+ {include file='headInclude'}
+</head>
+
+<body{if $templateName|isset} id="tpl{$templateName|ucfirst}"{/if}>
+
+{include file='header'}
+
+<div class="warning">
+ <p><strong>{lang}wcf.page.offline{/lang}</strong></p>
+ <p>{if OFFLINE_MESSAGE_ALLOW_HTML}{@OFFLINE_MESSAGE}{else}{@OFFLINE_MESSAGE|htmlspecialchars|nl2br}{/if}</p>
+</div>
+
+{include file='footer'}
+
+</body>
+</html>
\ No newline at end of file
<div class="userNotice">
+ {if OFFLINE && $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')}
+ <div class="warning">
+ <p><strong>{lang}wcf.page.offline{/lang}</strong></p>
+ <p>{if OFFLINE_MESSAGE_ALLOW_HTML}{@OFFLINE_MESSAGE}{else}{@OFFLINE_MESSAGE|htmlspecialchars|nl2br}{/if}</p>
+ </div>
+ {/if}
+
{event name='userNotice'}
</div>
\ No newline at end of file
<defaultvalue>0</defaultvalue>
<admindefaultvalue>1</admindefaultvalue>
</option>
+ <option name="admin.general.canViewPageDuringOfflineMode">
+ <categoryname>admin.general</categoryname>
+ <optiontype>boolean</optiontype>
+ <defaultvalue>0</defaultvalue>
+ <admindefaultvalue>1</admindefaultvalue>
+ </option>
<option name="admin.system.canEditOption">
<categoryname>admin.system</categoryname>
<optiontype>boolean</optiontype>
public function getRequestObject() {
return $this->requestObject;
}
+
+ /**
+ * Returns true, if the requested page is avaiable during the offline mode.
+ *
+ * @return boolean
+ */
+ public function isAvailableDuringOfflineMode() {
+ if (defined($this->className . '::AVAILABLE_DURING_OFFLINE_MODE') && constant($this->className . '::AVAILABLE_DURING_OFFLINE_MODE')) {
+ return true;
+ }
+
+ return false;
+ }
}
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\SystemException;
use wcf\system\SingletonFactory;
+use wcf\system\WCF;
/**
* Handles http requests.
// build request
$this->buildRequest($application);
+ // handle offline mode
+ if (!$isACPRequest && defined('OFFLINE') && OFFLINE) {
+ if (!WCF::getSession()->getPermission('admin.general.canViewPageDuringOfflineMode') && !$this->activeRequest->isAvailableDuringOfflineMode()) {
+ WCF::getTPL()->display('offline');
+ exit;
+ }
+ }
+
// start request
$this->activeRequest->execute();
}
<category name="wcf.page">
<item name="wcf.page.pageNo"><![CDATA[Seite {#$pageNo}]]></item>
+ <item name="wcf.page.offline"><![CDATA[Die Seite befindet sich zur Zeit {if OFFLINE_MESSAGE != ''}aus folgenden GrĂ¼nden im Wartungsmodus:{else}im Wartungsmodus.{/if}]]></item>
</category>
<category name="wcf.sitemap">