use wcf\data\application\ApplicationList;
use wcf\system\cache\builder\ApplicationCacheBuilder;
use wcf\system\Regex;
+use wcf\system\request\RouteHandler;
use wcf\system\SingletonFactory;
/**
*/
public function getActiveApplication() {
// work-around during WCFSetup
- if (isset($this->cache['application'][PACKAGE_ID])) {
+ if (!PACKAGE_ID) {
+ $host = str_replace(RouteHandler::getProtocol(), '', RouteHandler::getHost());
+
+ return new Application(null, [
+ 'domainName' => $host,
+ 'domainPath' => RouteHandler::getPath(),
+ 'cookieDomain' => $host,
+ 'cookiePath' => RouteHandler::getPath(['acp'])
+ ]);
+ }
+ else if (isset($this->cache['application'][PACKAGE_ID])) {
return $this->cache['application'][PACKAGE_ID];
}
* Default options.inc.php for package installation of package com.woltlab.wcf.
*
* @author Marcel Werk
- * @copyright 2001-2015 WoltLab GmbH
+ * @copyright 2001-2016 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
*/
define('LAST_UPDATE_TIME', TIME_NOW);
-define('COOKIE_PREFIX', 'wcf_');
+define('COOKIE_PREFIX', 'wcf2_');
define('COOKIE_PATH', '');
define('COOKIE_DOMAIN', '');