aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 7fc096fa3..e8a3e1e11 100755
--- a/boot.php
+++ b/boot.php
@@ -46,7 +46,7 @@ require_once('include/account.php');
define ( 'PLATFORM_NAME', 'hubzilla' );
-define ( 'STD_VERSION', '1.7' );
+define ( 'STD_VERSION', '1.7.1' );
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1168 );
@@ -1570,7 +1570,7 @@ function fix_system_urls($oldurl, $newurl) {
}
}
- proc_run('php', 'include/notifier.php', 'refresh_all', $c[0]['channel_id']);
+ Zotlabs\Daemon\Master::Summon(array('Notifier', 'refresh_all', $c[0]['channel_id']));
}
}
@@ -1847,6 +1847,23 @@ function proc_run($cmd){
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');
+
+ // redirect proc_run statements of legacy daemon processes to the new Daemon Master object class
+ // We will keep this interface until everybody has transitioned.
+
+ if(strstr($args[1],'include/')) {
+ // convert 'include/foo.php' to 'Foo'
+ $orig = substr(ucfirst(substr($args[1],8)),0,-4);
+ logger('proc_run_redirect: ' . $orig);
+ if(file_exists('Zotlabs/Daemon/' . $orig . '.php')) {
+ array_shift($args); // daemons are all run by php, pop it off the top of the array
+ $args[0] = $orig; // replace with the new daemon name
+ logger('Redirecting old proc_run interface: ' . print_r($args,true), LOGGER_DEBUG, LOG_DEBUG);
+ \Zotlabs\Daemon\Master::Summon($args); // summon the daemon
+ return;
+ }
+ }
+
for($x = 0; $x < count($args); $x++)
$args[$x] = escapeshellarg($args[$x]);