1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 09:44:38 +02:00

Update to processwire/processwire-issues#60 for multi-instance support with multi-language page names

This commit is contained in:
Ryan Cramer
2016-10-31 13:49:42 -04:00
parent c435081050
commit b50b1f9a28

View File

@@ -147,10 +147,21 @@ class ProcessWire extends Wire {
$this->shutdown = $this->wire(new WireShutdown());
$this->config($config);
$this->load($config);
if($this->getNumInstances() > 1) {
// this instance is not handling the request and needs a mock $page API var and pageview
/** @var ProcessPageView $view */
$view = $this->wire('modules')->get('ProcessPageView');
$view->execute(false);
}
}
public function __toString() {
return $this->className() . " " . self::versionMajor . "." . self::versionMinor . "." . self::versionRevision;
$str = $this->className() . " ";
$str .= self::versionMajor . "." . self::versionMinor . "." . self::versionRevision;
if(self::versionSuffix) $str .= " " . self::versionSuffix;
if($this->getNumInstances() > 1) $str .= " #$this->instanceID";
return $str;
}
/**