mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Duplicating fixes in [3329]
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3330 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
2b69e99ae3
commit
f8123f131a
1 changed files with 21 additions and 24 deletions
|
@ -38,11 +38,10 @@
|
|||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
$here = $argv[0];
|
||||
$dataSource = 'default';
|
||||
for ($i = 1; $i < count($argv); $i++)
|
||||
{
|
||||
|
||||
for ($i = 1; $i < count($argv); $i++) {
|
||||
// Process command-line modifiers here
|
||||
switch (strtolower($argv[$i]))
|
||||
{
|
||||
switch (strtolower($argv[$i])) {
|
||||
case '-app':
|
||||
$app = $argv[$i + 1];
|
||||
break;
|
||||
|
@ -85,12 +84,10 @@
|
|||
require ('cake'.DS.'basics.php');
|
||||
require ('cake'.DS.'config'.DS.'paths.php');
|
||||
require (CONFIGS.'core.php');
|
||||
if (file_exists( CONFIGS.'database.php' ))
|
||||
{
|
||||
|
||||
if (file_exists( CONFIGS.'database.php' )) {
|
||||
require_once (CONFIGS.'database.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
die("Unable to find /app/config/database.php. Please create it before continuing.\n\n");
|
||||
}
|
||||
uses ('object', 'neat_array', 'session', 'security', 'inflector', 'model'.DS.'connection_manager',
|
||||
|
@ -185,7 +182,7 @@ class AclCLI {
|
|||
exit();
|
||||
}
|
||||
|
||||
switch ($command){
|
||||
switch ($command) {
|
||||
case 'create':
|
||||
$this->create();
|
||||
break;
|
||||
|
@ -350,7 +347,7 @@ class AclCLI {
|
|||
$db =& ConnectionManager::getDataSource($this->dataSource);
|
||||
fwrite($this->stdout, "Initializing Database...\n");
|
||||
fwrite($this->stdout, "Creating access control objects table (acos)...\n");
|
||||
$sql = " CREATE TABLE ".$db->name('acos')." (
|
||||
$sql = " CREATE TABLE ".$db->fullTableName('acos')." (
|
||||
".$db->name('id')." ".$db->column($db->columns['primary_key']).",
|
||||
".$db->name('object_id')." ".$db->column($db->columns['integer'])." default NULL,
|
||||
".$db->name('alias')." ".$db->column($db->columns['string'])." NOT NULL default '',
|
||||
|
@ -361,7 +358,7 @@ class AclCLI {
|
|||
$db->query($sql);
|
||||
|
||||
fwrite($this->stdout, "Creating access request objects table (aros)...\n");
|
||||
$sql2 = "CREATE TABLE ".$db->name('aros')." (
|
||||
$sql2 = "CREATE TABLE ".$db->fullTableName('aros')." (
|
||||
".$db->name('id')." ".$db->column($db->columns['primary_key']).",
|
||||
".$db->name('user_id')." ".$db->column($db->columns['integer'])." default NULL,
|
||||
".$db->name('alias')." ".$db->column($db->columns['string'])." NOT NULL default '',
|
||||
|
@ -372,7 +369,7 @@ class AclCLI {
|
|||
$db->query($sql2);
|
||||
|
||||
fwrite($this->stdout, "Creating relationships table (aros_acos)...\n");
|
||||
$sql3 = "CREATE TABLE ".$db->name('aros_acos')." (
|
||||
$sql3 = "CREATE TABLE ".$db->fullTableName('aros_acos')." (
|
||||
".$db->name('id')." ".$db->column($db->columns['primary_key']).",
|
||||
".$db->name('aro_id')." ".$db->column($db->columns['integer'])." default NULL,
|
||||
".$db->name('aco_id')." ".$db->column($db->columns['integer'])." default NULL,
|
||||
|
|
Loading…
Reference in a new issue