Bearsampp 2026.3.26
API documentation
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{
31 public function __construct($args)
32 {
34
35 // If the executable file exists, return early.
36 if (file_exists($bearsamppCore->getExec())) {
37 return;
38 }
39
40 // Start loading process
42
43 // Reload bins and apps to recreate symlinks if needed
44 $bearsamppBins->reload();
45 $bearsamppApps->reload();
46
47 // Refresh hostname in the configuration
48 $bearsamppConfig->replace(Config::CFG_HOSTNAME, gethostname());
49
50 // Refresh launch startup setting in the configuration
52
53 // Check and update the browser setting in the configuration
54 $currentBrowser = $bearsamppConfig->getBrowser();
55 if (empty($currentBrowser) || !file_exists($currentBrowser)) {
57 }
58
59 // Process and update the bearsampp.ini file
60 file_put_contents($bearsamppRoot->getIniFilePath(), Util::utf8ToCp1252(TplApp::process()));
61
62 // Process and update the PowerShell configuration
64
65 // Refresh PEAR version cache file
66 $bearsamppBins->getPhp()->getPearVersion();
67
68 // Rebuild alias homepage content
69 $bearsamppHomepage->refreshAliasContent();
70
71 // Rebuild _commons.js content
72 $bearsamppHomepage->refreshCommonsJsContent();
73 }
74}
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:41
global $bearsamppHomepage
Definition homepage.php:41