cli : if no controller or models exists, return nothing in listonly mode (bash_completion)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2361 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
8
cli.php
8
cli.php
@@ -102,9 +102,17 @@ class cli
|
|||||||
if ($this->EXPERT)
|
if ($this->EXPERT)
|
||||||
$files = array_merge ($files, glob ("models/*.php"));
|
$files = array_merge ($files, glob ("models/*.php"));
|
||||||
if (count ($files) === 0 && $this->EXPERT === FALSE)
|
if (count ($files) === 0 && $this->EXPERT === FALSE)
|
||||||
|
{
|
||||||
|
if (isset ($argv[0]) && $argv[0] === "-listonly")
|
||||||
|
exit;
|
||||||
die ("No controllers available in ".getcwd()."\n");
|
die ("No controllers available in ".getcwd()."\n");
|
||||||
|
}
|
||||||
if (count ($files) === 0 && $this->EXPERT === TRUE)
|
if (count ($files) === 0 && $this->EXPERT === TRUE)
|
||||||
|
{
|
||||||
|
if (isset ($argv[0]) && $argv[0] === "-listonly")
|
||||||
|
exit;
|
||||||
die ("No controllers/models available in ".getcwd()."\n");
|
die ("No controllers/models available in ".getcwd()."\n");
|
||||||
|
}
|
||||||
foreach ($files as $file)
|
foreach ($files as $file)
|
||||||
{
|
{
|
||||||
if (strpos ($file, "_"))
|
if (strpos ($file, "_"))
|
||||||
|
|||||||
Reference in New Issue
Block a user