mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:35:12 +00:00
Merge branch 'dev' of /home/macgirvin/roadhouse into dev
This commit is contained in:
commit
ddec5ee2ed
2 changed files with 33 additions and 7 deletions
|
@ -158,7 +158,7 @@ class Apps {
|
|||
foreach (self::$available_apps as $iapp) {
|
||||
if ($iapp['app_id'] == hash('whirlpool',$app['name'])) {
|
||||
$notfound = false;
|
||||
if (($iapp['app_version'] !== $app['version'])
|
||||
if ((isset($app['version']) && $iapp['app_version'] !== $app['version'])
|
||||
|| ((isset($app['plugin']) && $app['plugin']) && (! (isset($iapp['app_plugin']) && $iapp['app_plugin'])))) {
|
||||
return intval($iapp['app_id']);
|
||||
}
|
||||
|
@ -606,7 +606,7 @@ class Apps {
|
|||
'$edit' => ((local_channel() && $installed && $mode === 'edit') ? t('Edit') : ''),
|
||||
'$delete' => ((local_channel() && $installed && $mode === 'edit') ? t('Delete') : ''),
|
||||
'$undelete' => ((local_channel() && $installed && $mode === 'edit') ? t('Undelete') : ''),
|
||||
'$settings_url' => ((local_channel() && $installed && $mode === 'list') ? $papp['settings_url'] : ''),
|
||||
'$settings_url' => ((local_channel() && $installed && $mode === 'list' && isset($papp['settings_url'])) ? $papp['settings_url'] : ''),
|
||||
'$deleted' => ((isset($papp['deleted'])) ? intval($papp['deleted']) : false),
|
||||
'$feature' => (((isset($papp['embed']) && $papp['embed']) || $mode === 'edit') ? false : true),
|
||||
'$pin' => (((isset($papp['embed']) && $papp['embed']) || $mode === 'edit') ? false : true),
|
||||
|
|
34
boot.php
34
boot.php
|
@ -1949,12 +1949,17 @@ function proc_run() {
|
|||
|
||||
call_hooks('proc_run', $arr);
|
||||
|
||||
if (! $arr['run_cmd'])
|
||||
if (! $arr['run_cmd']) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (count($args) && $args[0] === 'php')
|
||||
$args[0] = ((x(App::$config,'system')) && (x(App::$config['system'],'php_path')) && (strlen(App::$config['system']['php_path'])) ? App::$config['system']['php_path'] : 'php');
|
||||
|
||||
if (count($args) > 1 && $args[0] === 'php') {
|
||||
$php = check_php_cli();
|
||||
if (! $php) {
|
||||
return;
|
||||
}
|
||||
$args[0] = $php;
|
||||
}
|
||||
|
||||
$args = array_map('escapeshellarg',$args);
|
||||
$cmdline = implode(' ', $args);
|
||||
|
@ -1972,6 +1977,27 @@ function proc_run() {
|
|||
}
|
||||
}
|
||||
|
||||
function check_php_cli() {
|
||||
|
||||
$cfg = (isset(App::$config['system']['php_path']))
|
||||
? App::$config['system']['php_path']
|
||||
: NULL;
|
||||
|
||||
if (isset($cfg) && is_executable(realpath($cfg))) {
|
||||
return realpath($cfg);
|
||||
}
|
||||
|
||||
$path = shell_exec('which php');
|
||||
if ($path && is_executable(realpath(trim($path)))) {
|
||||
return realpath(trim($path));
|
||||
}
|
||||
|
||||
logger('PHP command line interpreter not found.');
|
||||
throw new Exception('interpreter not found.');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Checks if we are running on M$ Windows.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue