mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Set PAGE_TITLE after installation
This commit is contained in:
parent
dbd9c299f5
commit
5a85be5240
@ -18,8 +18,16 @@ final class Install {
|
|||||||
*/
|
*/
|
||||||
private $styles = null;
|
private $styles = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do we need to update the page title?
|
||||||
|
*
|
||||||
|
* @var boolean
|
||||||
|
*/
|
||||||
|
private $updateTitle = false;
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->styles = \wcf\system\style\StyleHandler::getInstance()->getAvailableStyles();
|
$this->styles = \wcf\system\style\StyleHandler::getInstance()->getAvailableStyles();
|
||||||
|
if (!defined('PAGE_TITLE') || !PAGE_TITLE) $this->updateTitle = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,6 +37,18 @@ public function execute() {
|
|||||||
foreach ($this->styles as $style) {
|
foreach ($this->styles as $style) {
|
||||||
\wcf\system\style\StyleHandler::getInstance()->resetStylesheet($style);
|
\wcf\system\style\StyleHandler::getInstance()->resetStylesheet($style);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->updateTitle) {
|
||||||
|
$sql = "UPDATE
|
||||||
|
wcf".WCF_N."_option
|
||||||
|
SET
|
||||||
|
optionValue = ?
|
||||||
|
WHERE
|
||||||
|
optionName = ?";
|
||||||
|
$stmt = \wcf\system\WCF::getDB()->prepareStatement($sql);
|
||||||
|
$stmt->execute(array('Tims Chat 3', 'page_title'));
|
||||||
|
\wcf\data\option\OptionEditor::resetCache();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$install = new Install();
|
$install = new Install();
|
||||||
|
Loading…
Reference in New Issue
Block a user