public static function doInit() { $dataRootDir = join(DIRECTORY_SEPARATOR, [__DIR__, '..', 'data', '']); $htmlRootDir = join(DIRECTORY_SEPARATOR, [__DIR__, '..', 'public_html']); self::$version = '4.2.0'; self::$mail = '*****@*****.**'; self::$cronInterval = 5; //minutes self::$usersPerCronRun = 5; self::$enqueueEnabled = true; self::$userQueuePath = $dataRootDir . 'queue-users.lst'; self::$userQueueMinWait = 24 * 60 * 60; //seconds self::$userQueueMaxAttempts = 20; self::$mediaPerCronRun = 5; self::$mediaQueuePath = $dataRootDir . 'queue-media.lst'; self::$mediaQueueMinWait = 7 * 24 * 60 * 60; //seconds self::$mediaQueueMaxAttempts = 2; self::$downloaderUserAgent = 'MALgraph v' . self::$version; self::$downloaderProxy = null; self::$downloaderCookieFilePath = $dataRootDir . 'cookies.dat'; self::$downloaderMaxParallelJobs = 10; self::$downloaderMaxTimeout = 10000; self::$downloaderUseMultiHandles = true; self::$mirrorEnabled = false; self::$mirrorPath = $dataRootDir . 'mirror'; self::$mirrorPurgeFailures = true; self::$cacheEnabled = true; self::$cachePath = $dataRootDir . 'cache'; self::$cacheTimeToLive = 24 * 60 * 60; self::$dbPath = $dataRootDir . 'db'; self::$dbCount = 64; self::$transactionCommitFrequency = 20; self::$maxDbBindings = 50; self::$maxProcessingAttempts = 1; self::$bannedUsersListPath = $dataRootDir . 'banned-users.lst'; self::$bannedGenresListPath = $dataRootDir . 'banned-genres.lst'; self::$bannedCreatorsListPath = $dataRootDir . 'banned-creators.lst'; self::$bannedGenresForRecsListPath = $dataRootDir . 'recs-banned-genres.lst'; self::$bannedFranchiseCouplingListPath = $dataRootDir . 'banned-franchise-coupling.lst'; self::$staticRecommendationListPath = $dataRootDir . 'static-recommendations.lst'; self::$achievementsDefinitionsDirectory = $dataRootDir . 'achievements'; self::$maxLogSize = 1024 * 1024 * 12; self::$keepOldLogs = false; self::$logsPath = $dataRootDir . 'logs'; self::$globalsCachePath = $dataRootDir . 'globals-cache.json'; self::$userQueueSizesPath = $dataRootDir . 'queue-sizes.json'; self::$mediaDirectory = $htmlRootDir . DIRECTORY_SEPARATOR . 'media'; self::$mediaUrl = '/media/'; self::$baseUrl = isset($_SERVER['HTTP_HOST']) ? 'http://' . $_SERVER['HTTP_HOST'] . '/' : 'http://mal.oko.im/'; self::$googleAnalyticsEnabled = true; self::$adminPassword = '******'; self::$maintenanceMessage = null; self::$noticeMessage = null; self::$sendReferrer = true; self::$enforcedDomain = null; }
/** * Create a new template either with a file-based Twig template, or a Twig string. * @global type $wpdb * @param string|false $templateName * @param string|false $templateString */ public function __construct($templateName = false, $templateString = false) { $this->templateName = $templateName; $this->templateString = $templateString; $this->transientNotices = 'notices'; $notices = isset($_SESSION[$this->transientNotices]) ? $_SESSION[$this->transientNotices] : array(); $this->data = array('tabulate_version' => Config::version(), 'notices' => $notices, 'baseurl' => Config::baseUrl(), 'debug' => Config::debug(), 'site_title' => Config::siteTitle()); $this->loader = new \Twig_Loader_Filesystem([__DIR__ . '/../templates']); }
/** * Return the cdn domain/version * * @param string $protocol * @return string */ public static function cdnv($protocol = '//') { return self::cdn($protocol) . '/' . Config::version(); }