Bearsampp 2025.8.29
Loading...
Searching...
No Matches
class.action.reload.php
Go to the documentation of this file.
1<?php
2/*
3 * Copyright (c) 2021-2024 Bearsampp
4 * License: GNU General Public License version 3 or later; see LICENSE.txt
5 * Author: Bear
6 * Website: https://bearsampp.com
7 * Github: https://github.com/Bearsampp
8 */
9
18{
30 public function __construct($args)
31 {
33
34 // If the executable file exists, return early.
35 if (file_exists($bearsamppCore->getExec())) {
36 return;
37 }
38
39 // Start loading process
41
42 // Refresh hostname in the configuration
43 $bearsamppConfig->replace(Config::CFG_HOSTNAME, gethostname());
44
45 // Refresh launch startup setting in the configuration
47
48 // Check and update the browser setting in the configuration
49 $currentBrowser = $bearsamppConfig->getBrowser();
50 if (empty($currentBrowser) || !file_exists($currentBrowser)) {
52 }
53
54 // Process and update the bearsampp.ini file
55 file_put_contents($bearsamppRoot->getIniFilePath(), Util::utf8ToCp1252(TplApp::process()));
56
57 // Process and update the ConsoleZ configuration
59
60 // Refresh PEAR version cache file
61 $bearsamppBins->getPhp()->getPearVersion();
62
63 // Rebuild alias homepage content
64 $bearsamppHomepage->refreshAliasContent();
65
66 // Rebuild _commons.js content
67 $bearsamppHomepage->refreshCommonsJsContent();
68 }
69}
global $bearsamppBins
global $bearsamppRoot
global $bearsamppCore
const CFG_HOSTNAME
const DISABLED
const CFG_BROWSER
const ENABLED
const CFG_LAUNCH_STARTUP
static process()
static isLaunchStartup()
static utf8ToCp1252($data)
static startLoading()
static getDefaultBrowser()
Definition class.vbs.php:81
global $bearsamppConfig
Definition homepage.php:27
global $bearsamppHomepage
Definition homepage.php:27