protected function init() { $this->title = Piwik::translate('CoreAdminHome_UpdateSettings'); $isWritable = Piwik::hasUserSuperUserAccess() && CoreAdminController::isGeneralSettingsAdminEnabled(); $this->releaseChannel = $this->createReleaseChannel(); $this->releaseChannel->setIsWritableByCurrentUser($isWritable); $isWritable = $isWritable && PluginUpdateCommunication::canBeEnabled(); $this->sendPluginUpdateEmail = $this->createSendPluginUpdateEmail(); $this->sendPluginUpdateEmail->setIsWritableByCurrentUser($isWritable); }
/** * @internal */ public function setTrustedHosts($trustedHosts) { Piwik::checkUserHasSuperUserAccess(); if (!Controller::isGeneralSettingsAdminEnabled()) { throw new Exception('General settings admin is ont enabled'); } if (!empty($trustedHosts)) { Url::saveTrustedHostnameInConfig($trustedHosts); Config::getInstance()->forceSave(); } return true; }
public static function isBrowserTriggerEnabled() { $uiSettingIsEnabled = Controller::isGeneralSettingsAdminEnabled(); if ($uiSettingIsEnabled) { $browserArchivingEnabled = Option::get(self::OPTION_BROWSER_TRIGGER_ARCHIVING); if ($browserArchivingEnabled !== false) { return (bool) $browserArchivingEnabled; } } return (bool) Config::getInstance()->General['enable_browser_archiving_triggering']; }