some windows fixes
This commit is contained in:
parent
e83419b53e
commit
b39c0d54c0
6
boot.php
6
boot.php
@ -1571,13 +1571,17 @@ function proc_run($cmd){
|
|||||||
$args[$x] = escapeshellarg($args[$x]);
|
$args[$x] = escapeshellarg($args[$x]);
|
||||||
|
|
||||||
$cmdline = implode($args," ");
|
$cmdline = implode($args," ");
|
||||||
if(get_config('system','proc_windows'))
|
if(is_windows())
|
||||||
proc_close(proc_open('cmd /c start /b ' . $cmdline,array(),$foo));
|
proc_close(proc_open('cmd /c start /b ' . $cmdline,array(),$foo));
|
||||||
else
|
else
|
||||||
proc_close(proc_open($cmdline." &",array(),$foo));
|
proc_close(proc_open($cmdline." &",array(),$foo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function is_windows() {
|
||||||
|
return ((strtoupper(substr(PHP_OS,0,3)) === 'WIN') ? true : false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function current_theme(){
|
function current_theme(){
|
||||||
$app_base_themes = array('redbasic');
|
$app_base_themes = array('redbasic');
|
||||||
|
10
index.php
10
index.php
@ -242,6 +242,9 @@ if (file_exists($theme_info_file)){
|
|||||||
if(! x($a->page,'content'))
|
if(! x($a->page,'content'))
|
||||||
$a->page['content'] = '';
|
$a->page['content'] = '';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(! $install) {
|
||||||
/* set JS cookie */
|
/* set JS cookie */
|
||||||
if($_COOKIE['jsAvailable'] != 1) {
|
if($_COOKIE['jsAvailable'] != 1) {
|
||||||
$a->page['content'] .= '<script>document.cookie="jsAvailable=1; path=/"; var jsMatch = /\&JS=1/; if (!jsMatch.exec(location.href)) { location.href = location.href + "&JS=1"; }</script>';
|
$a->page['content'] .= '<script>document.cookie="jsAvailable=1; path=/"; var jsMatch = /\&JS=1/; if (!jsMatch.exec(location.href)) { location.href = location.href + "&JS=1"; }</script>';
|
||||||
@ -250,10 +253,11 @@ if($_COOKIE['jsAvailable'] != 1) {
|
|||||||
$_COOKIE['jsAvailable'] = 1;
|
$_COOKIE['jsAvailable'] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(! $install)
|
|
||||||
call_hooks('page_content_top',$a->page['content']);
|
call_hooks('page_content_top',$a->page['content']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call module functions
|
* Call module functions
|
||||||
|
@ -373,6 +373,9 @@ function check_php(&$phpath, &$checks) {
|
|||||||
if (strlen($phpath)){
|
if (strlen($phpath)){
|
||||||
$passed = file_exists($phpath);
|
$passed = file_exists($phpath);
|
||||||
} else {
|
} else {
|
||||||
|
if(is_windows())
|
||||||
|
$phpath = trim(shell_exec('where php'));
|
||||||
|
else
|
||||||
$phpath = trim(shell_exec('which php'));
|
$phpath = trim(shell_exec('which php'));
|
||||||
$passed = strlen($phpath);
|
$passed = strlen($phpath);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user