X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=09d9f4ef87125eaf3de6d28604fbdc9f73a3fc48;hb=bea02876eb41c8ffdffbeb90083491be9c334a1a;hp=d5adbd7cf17de729924fd538bee2034619e1db8f;hpb=48ffa880f099b19052f18e399bf6af50780a24b0;p=friendica.git diff --git a/boot.php b/boot.php index d5adbd7cf1..09d9f4ef87 100644 --- a/boot.php +++ b/boot.php @@ -7,13 +7,13 @@ require_once('include/text.php'); require_once("include/pgettext.php"); -define ( 'FRIENDIKA_VERSION', '2.2.1065' ); +define ( 'FRIENDIKA_VERSION', '2.2.1075' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); -define ( 'DB_UPDATE_VERSION', 1078 ); +define ( 'DB_UPDATE_VERSION', 1080 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); -define ( 'DOWN_ARROW', '⇩' ); + /** * @@ -610,12 +610,12 @@ function check_config(&$a) { }} -function get_guid() { - $exists = true; +function get_guid($size=16) { + $exists = true; // assume by default that we don't have a unique guid do { - $s = random_string(16); + $s = random_string($size); $r = q("select id from guid where guid = '%s' limit 1", dbesc($s)); - if(! results($r)) + if(! count($r)) $exists = false; } while($exists); q("insert into guid ( guid ) values ( '%s' ) ", dbesc($s)); @@ -1033,11 +1033,14 @@ function proc_run($cmd){ $a = get_app(); $args = func_get_args(); - call_hooks("proc_run", $args); + $arr = array('args' => $args, 'run_cmd' => true); + + call_hooks("proc_run", $arr); + if(! $arr['run_cmd']) + return; if(count($args) && $args[0] === 'php') $args[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - foreach ($args as $arg){ $arg = escapeshellarg($arg); }