From 1c6d0d5642483c0e1b53602d9592bc4c7acdd6d2 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 1 Jul 2009 00:48:53 -0400 Subject: [PATCH] Removing old files. --- .../libs/templates/objects/controller.ctp | 57 ------- .../templates/objects/controller_actions.ctp | 142 ----------------- .../libs/templates/objects/fixture.ctp | 42 ----- cake/console/libs/templates/objects/model.ctp | 127 --------------- cake/console/libs/templates/objects/test.ctp | 57 ------- cake/console/libs/templates/views/form.ctp | 69 -------- cake/console/libs/templates/views/home.ctp | 82 ---------- cake/console/libs/templates/views/index.ctp | 99 ------------ cake/console/libs/templates/views/view.ctp | 150 ------------------ .../shells/templates/objects/test_object.ctp | 2 - 10 files changed, 827 deletions(-) delete mode 100644 cake/console/libs/templates/objects/controller.ctp delete mode 100644 cake/console/libs/templates/objects/controller_actions.ctp delete mode 100644 cake/console/libs/templates/objects/fixture.ctp delete mode 100644 cake/console/libs/templates/objects/model.ctp delete mode 100644 cake/console/libs/templates/objects/test.ctp delete mode 100644 cake/console/libs/templates/views/form.ctp delete mode 100644 cake/console/libs/templates/views/home.ctp delete mode 100644 cake/console/libs/templates/views/index.ctp delete mode 100644 cake/console/libs/templates/views/view.ctp delete mode 100644 cake/tests/test_app/vendors/shells/templates/objects/test_object.ctp diff --git a/cake/console/libs/templates/objects/controller.ctp b/cake/console/libs/templates/objects/controller.ctp deleted file mode 100644 index 539210d2e2d..00000000000 --- a/cake/console/libs/templates/objects/controller.ctp +++ /dev/null @@ -1,57 +0,0 @@ - -class Controller extends AppController { - - var $name = ''; - - var $scaffold; - - -} -"; ?> \ No newline at end of file diff --git a/cake/console/libs/templates/objects/controller_actions.ctp b/cake/console/libs/templates/objects/controller_actions.ctp deleted file mode 100644 index 99b18bd336e..00000000000 --- a/cake/console/libs/templates/objects/controller_actions.ctp +++ /dev/null @@ -1,142 +0,0 @@ - - - function index() { - $this->->recursive = 0; - $this->set('', $this->paginate()); - } - - function view($id = null) { - if (!$id) { - - $this->Session->setFlash(__('Invalid ', true)); - $this->redirect(array('action' => 'index')); - - $this->flash(__('Invalid ', true), array('action' => 'index')); - - } - $this->set('', $this->->read(null, $id)); - } - - - function add() { - if (!empty($this->data)) { - $this->->create(); - if ($this->->save($this->data)) { - - $this->Session->setFlash(__('The has been saved', true)); - $this->redirect(array('action' => 'index')); - - $this->flash(__(' saved.', true), array('action' => 'index')); - - } else { - - $this->Session->setFlash(__('The could not be saved. Please, try again.', true)); - - } - } -{$assoc} as $associationName => $relation): - if (!empty($associationName)): - $otherModelName = $this->_modelName($associationName); - $otherPluralName = $this->_pluralName($associationName); - echo "\t\t\${$otherPluralName} = \$this->{$currentModelName}->{$otherModelName}->find('list');\n"; - $compact[] = "'{$otherPluralName}'"; - endif; - endforeach; - endforeach; - if (!empty($compact)): - echo "\t\t\$this->set(compact(".join(', ', $compact)."));\n"; - endif; -?> - } - - - function edit($id = null) { - if (!$id && empty($this->data)) { - - $this->Session->setFlash(__('Invalid ', true)); - $this->redirect(array('action' => 'index')); - - $this->flash(__('Invalid ', true), array('action' => 'index')); - - } - if (!empty($this->data)) { - if ($this->->save($this->data)) { - - $this->Session->setFlash(__('The has been saved', true)); - $this->redirect(array('action' => 'index')); - - $this->flash(__('The has been saved.', true), array('action' => 'index')); - - } else { - - $this->Session->setFlash(__('The could not be saved. Please, try again.', true)); - - } - } - if (empty($this->data)) { - $this->data = $this->->read(null, $id); - } -{$assoc} as $associationName => $relation): - if (!empty($associationName)): - $otherModelName = $this->_modelName($associationName); - $otherPluralName = $this->_pluralName($associationName); - echo "\t\t\${$otherPluralName} = \$this->{$currentModelName}->{$otherModelName}->find('list');\n"; - $compact[] = "'{$otherPluralName}'"; - endif; - endforeach; - endforeach; - if (!empty($compact)): - echo "\t\t\$this->set(compact(".join(', ', $compact)."));\n"; - endif; - ?> - } - - function delete($id = null) { - if (!$id) { - - $this->Session->setFlash(__('Invalid id for ', true)); - $this->redirect(array('action'=>'index')); - - $this->flash(__('Invalid ', true), array('action' => 'index')); - - } - if ($this->->del($id)) { - - $this->Session->setFlash(__(' deleted', true)); - $this->redirect(array('action'=>'index')); - - $this->flash(__(' deleted', true), array('action' => 'index')); - - } - - $this->Session->setFlash(__(' was not deleted', true)); - - $this->flash(__(' was not deleted', true), array('action' => 'index')); - - $this->redirect(array('action' => 'index')); - } diff --git a/cake/console/libs/templates/objects/fixture.ctp b/cake/console/libs/templates/objects/fixture.ctp deleted file mode 100644 index 34d84bf4a22..00000000000 --- a/cake/console/libs/templates/objects/fixture.ctp +++ /dev/null @@ -1,42 +0,0 @@ - - -/* Fixture generated on: */ -class Fixture extends CakeTestFixture { - var $name = ''; - - var $table = ''; - - - var $import = ; - - - - var $fields = ; - - - - var $records = ; - -} -'; ?> \ No newline at end of file diff --git a/cake/console/libs/templates/objects/model.ctp b/cake/console/libs/templates/objects/model.ctp deleted file mode 100644 index 849be35b34c..00000000000 --- a/cake/console/libs/templates/objects/model.ctp +++ /dev/null @@ -1,127 +0,0 @@ - -class extends AppModel { - var $name = ''; - - var $useDbConfig = ''; - - - var $primaryKey = ''; - $validations): - echo "\t\t'$field' => array(\n"; - foreach ($validations as $key => $validator): - echo "\t\t\t'$key' => array('rule' => array('$validator')),\n"; - endforeach; - echo "\t\t),\n"; - endforeach; - echo "\t);\n"; -endif; - -?> - //The Associations below have been created with all possible keys, those that are not needed can be removed - $relation): - $out = "\n\t\t'{$relation['alias']}' => array(\n"; - $out .= "\t\t\t'className' => '{$relation['className']}',\n"; - $out .= "\t\t\t'foreignKey' => '{$relation['foreignKey']}',\n"; - $out .= "\t\t\t'conditions' => '',\n"; - $out .= "\t\t\t'fields' => '',\n"; - $out .= "\t\t\t'order' => ''\n"; - $out .= "\t\t)"; - if ($i + 1 < $typeCount) { - $out .= ","; - } - echo $out; - endforeach; - echo "\n\t);\n"; - endif; -endforeach; - -if (!empty($associations['hasMany'])): - $belongsToCount = count($associations['hasMany']); - echo "\n\tvar \$hasMany = array("; - foreach ($associations['hasMany'] as $i => $relation): - $out = "\n\t\t'{$relation['alias']}' => array(\n"; - $out .= "\t\t\t'className' => '{$relation['className']}',\n"; - $out .= "\t\t\t'foreignKey' => '{$relation['foreignKey']}',\n"; - $out .= "\t\t\t'dependent' => false,\n"; - $out .= "\t\t\t'conditions' => '',\n"; - $out .= "\t\t\t'fields' => '',\n"; - $out .= "\t\t\t'order' => '',\n"; - $out .= "\t\t\t'limit' => '',\n"; - $out .= "\t\t\t'offset' => '',\n"; - $out .= "\t\t\t'exclusive' => '',\n"; - $out .= "\t\t\t'finderQuery' => '',\n"; - $out .= "\t\t\t'counterQuery' => ''\n"; - $out .= "\t\t)"; - if ($i + 1 < $belongsToCount) { - $out .= ","; - } - echo $out; - endforeach; - echo "\n\t);\n\n"; -endif; - -if (!empty($associations['hasAndBelongsToMany'])): - $habtmCount = count($associations['hasAndBelongsToMany']); - echo "\n\tvar \$hasAndBelongsToMany = array("; - foreach ($associations['hasAndBelongsToMany'] as $i => $relation): - $out = "\n\t\t'{$relation['alias']}' => array(\n"; - $out .= "\t\t\t'className' => '{$relation['className']}',\n"; - $out .= "\t\t\t'joinTable' => '{$relation['joinTable']}',\n"; - $out .= "\t\t\t'foreignKey' => '{$relation['foreignKey']}',\n"; - $out .= "\t\t\t'associationForeignKey' => '{$relation['associationForeignKey']}',\n"; - $out .= "\t\t\t'unique' => true,\n"; - $out .= "\t\t\t'conditions' => '',\n"; - $out .= "\t\t\t'fields' => '',\n"; - $out .= "\t\t\t'order' => '',\n"; - $out .= "\t\t\t'limit' => '',\n"; - $out .= "\t\t\t'offset' => '',\n"; - $out .= "\t\t\t'finderQuery' => '',\n"; - $out .= "\t\t\t'deleteQuery' => '',\n"; - $out .= "\t\t\t'insertQuery' => ''\n"; - $out .= "\t\t)"; - if ($i + 1 < $habtmCount) { - $out .= ","; - } - echo $out; - endforeach; - echo "\n\t);\n\n"; -endif; -?> -} -'; ?> diff --git a/cake/console/libs/templates/objects/test.ctp b/cake/console/libs/templates/objects/test.ctp deleted file mode 100644 index b19b8979369..00000000000 --- a/cake/console/libs/templates/objects/test.ctp +++ /dev/null @@ -1,57 +0,0 @@ - -App::import('', ''); - - -class Test extends { - var $autoRender = false; - - function redirect($url, $status = null, $exit = true) { - $this->redirectUrl = $url; - } -} - - -class TestCase extends CakeTestCase { - - var $fixtures = array(''); - - - function startTest() { - $this-> - } - - function endTest() { - unset($this->); - ClassRegistry::flush(); - } - - - function test() { - - } - - -} -'; ?> \ No newline at end of file diff --git a/cake/console/libs/templates/views/form.ctp b/cake/console/libs/templates/views/form.ctp deleted file mode 100644 index 961d653a3a4..00000000000 --- a/cake/console/libs/templates/views/form.ctp +++ /dev/null @@ -1,69 +0,0 @@ - -
-create('{$modelClass}');?>\n";?> -
- ";?> -input('{$field}');\n"; - } - } - if (!empty($associations['hasAndBelongsToMany'])) { - foreach ($associations['hasAndBelongsToMany'] as $assocName => $assocData) { - echo "\t\techo \$form->input('{$assocName}');\n"; - } - } - echo "\t?>\n"; -?> -
-end('Submit');?>\n"; -?> -
-
- -
diff --git a/cake/console/libs/templates/views/home.ctp b/cake/console/libs/templates/views/home.ctp deleted file mode 100644 index 39020d488a6..00000000000 --- a/cake/console/libs/templates/views/home.ctp +++ /dev/null @@ -1,82 +0,0 @@ -Sweet, \"".Inflector::humanize($app)."\" got Baked by CakePHP!\n"; -$output .=" - 0): - Debugger::checkSessionKey(); -endif; -?> -

-'; - __('Your tmp directory is writable.'); - echo ''; - else: - echo ''; - __('Your tmp directory is NOT writable.'); - echo ''; - endif; -?> -

-

-'; - echo sprintf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), ''. \$settings['engine'] . 'Engine'); - echo ''; - else: - echo ''; - __('Your cache is NOT working. Please check the settings in APP/config/core.php'); - echo ''; - endif; -?> -

-

-'; - __('Your database configuration file is present.'); - \$filePresent = true; - echo ''; - else: - echo ''; - __('Your database configuration file is NOT present.'); - echo '
'; - __('Rename config/database.php.default to config/database.php'); - echo '
'; - endif; -?> -

-getDataSource('default'); -?> -

-isConnected()): - echo ''; - __('Cake is able to connect to the database.'); - echo ''; - else: - echo ''; - __('Cake is NOT able to connect to the database.'); - echo ''; - endif; -?> -

\n"; -$output .= "\n"; -$output .= "

\n"; -$output .= "

\n"; -$output .= "', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.
', APP . 'webroot' . DS . 'css');\n"; -$output .= "?>\n"; -$output .= "

\n"; -?> diff --git a/cake/console/libs/templates/views/index.ctp b/cake/console/libs/templates/views/index.ctp deleted file mode 100644 index ea864c17d19..00000000000 --- a/cake/console/libs/templates/views/index.ctp +++ /dev/null @@ -1,99 +0,0 @@ - -
-

";?>

-

-counter(array( -'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true) -)); -?>";?> -

- - - - - - - -\n"; - echo "\t>\n"; - foreach ($fields as $field) { - $isKey = false; - if (!empty($associations['belongsTo'])) { - foreach ($associations['belongsTo'] as $alias => $details) { - if ($field === $details['foreignKey']) { - $isKey = true; - echo "\t\t\n"; - break; - } - } - } - if ($isKey !== true) { - echo "\t\t\n"; - } - } - - echo "\t\t\n"; - echo "\t\n"; - -echo "\n"; -?> -
sort('{$field}');?>";?>";?>
\n\t\t\tlink(\${$singularVar}['{$alias}']['{$details['displayField']}'], array('controller'=> '{$details['controller']}', 'action'=>'view', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?>\n\t\t\n\t\t\t\n\t\t\n"; - echo "\t\t\tlink(__('View', true), array('action'=>'view', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n"; - echo "\t\t\tlink(__('Edit', true), array('action'=>'edit', \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n"; - echo "\t\t\tlink(__('Delete', true), array('action'=>'delete', \${$singularVar}['{$modelClass}']['{$primaryKey}']), null, sprintf(__('Are you sure you want to delete # %s?', true), \${$singularVar}['{$modelClass}']['{$primaryKey}'])); ?>\n"; - echo "\t\t
-
-
-prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>\n";?> - | numbers();?>\n"?> -next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?>\n";?> -
-
- -
diff --git a/cake/console/libs/templates/views/view.ctp b/cake/console/libs/templates/views/view.ctp deleted file mode 100644 index 24de7d1e898..00000000000 --- a/cake/console/libs/templates/views/view.ctp +++ /dev/null @@ -1,150 +0,0 @@ - -
-

";?>

-
\n";?> - $details) { - if ($field === $details['foreignKey']) { - $isKey = true; - echo "\t\t>\n"; - echo "\t\t>\n\t\t\tlink(\${$singularVar}['{$alias}']['{$details['displayField']}'], array('controller'=> '{$details['controller']}', 'action'=>'view', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?>\n\t\t\t \n\t\t\n"; - break; - } - } - } - if ($isKey !== true) { - echo "\t\t>\n"; - echo "\t\t>\n\t\t\t\n\t\t\t \n\t\t\n"; - } -} -?> -
-
-
- -
- $details): ?> - - $details): - $otherSingularVar = Inflector::variable($alias); - $otherPluralHumanName = Inflector::humanize($details['controller']); - ?> - - \ No newline at end of file diff --git a/cake/tests/test_app/vendors/shells/templates/objects/test_object.ctp b/cake/tests/test_app/vendors/shells/templates/objects/test_object.ctp deleted file mode 100644 index c524b823191..00000000000 --- a/cake/tests/test_app/vendors/shells/templates/objects/test_object.ctp +++ /dev/null @@ -1,2 +0,0 @@ -I got rendered - \ No newline at end of file