modifs.mineures sans commentaires
This commit is contained in:
		
							parent
							
								
									1c936caf26
								
							
						
					
					
						commit
						1cc2fff84e
					
				@ -7,15 +7,13 @@ use nur\sery\os\path;
 | 
			
		||||
use nur\sery\wip\app\app2;
 | 
			
		||||
 | 
			
		||||
if ($argc <= 1) die("invalid arguments");
 | 
			
		||||
app2::init([
 | 
			
		||||
  "projdir" => __DIR__ . '/..',
 | 
			
		||||
  "appcode" => \app\config\bootstrap::APPCODE,
 | 
			
		||||
]);
 | 
			
		||||
 | 
			
		||||
app2::init(NULIB_APP_app_params);
 | 
			
		||||
 | 
			
		||||
$app = $argv[1];
 | 
			
		||||
if (class_exists($app)) {
 | 
			
		||||
  # la configuration est celle actuellement chargée
 | 
			
		||||
  array_splice($argv, 1, 1);
 | 
			
		||||
  $argc--;
 | 
			
		||||
  array_splice($argv, 1, 1); $argc--;
 | 
			
		||||
  $app::run();
 | 
			
		||||
} elseif (is_executable($app)) {
 | 
			
		||||
  # la configuration est passée par une variable d'environnement
 | 
			
		||||
@ -23,8 +21,7 @@ if (class_exists($app)) {
 | 
			
		||||
  pcntl_exec($app, array_slice($argv, 1));
 | 
			
		||||
} else {
 | 
			
		||||
  # la configuration est celle actuellement chargée
 | 
			
		||||
  array_splice($argv, 0, 1);
 | 
			
		||||
  $argc--;
 | 
			
		||||
  array_splice($argv, 0, 1); $argc--;
 | 
			
		||||
  $name = preg_replace('/\.php$/', "", path::basename($app));
 | 
			
		||||
  app2::init([
 | 
			
		||||
    "name" => $name,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user