private static function migrateBrandingConfig(Config $config) { $useCustomLogo = self::getValueAndDelete($config, 'branding', 'use_custom_logo'); $customLogo = new CustomLogo(); $useCustomLogo ? $customLogo->enable() : $customLogo->disable(); }
public function setGeneralSettings() { Piwik::checkUserHasSuperUserAccess(); $response = new ResponseBuilder(Common::getRequestVar('format')); try { $this->checkTokenInUrl(); $this->saveGeneralSettings(); $customLogo = new CustomLogo(); if (Common::getRequestVar('useCustomLogo', '0')) { $customLogo->enable(); } else { $customLogo->disable(); } $toReturn = $response->getResponse(); } catch (Exception $e) { $toReturn = $response->getResponseException($e); } return $toReturn; }
/** * @internal */ public function setBrandingSettings($useCustomLogo) { Piwik::checkUserHasSuperUserAccess(); $customLogo = new CustomLogo(); if ($useCustomLogo) { $customLogo->enable(); } else { $customLogo->disable(); } return true; }