Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

2.0 #150

Closed
wants to merge 1 commit into from

2 participants

@ajibarra

Removed AppModel from Models array on CakeSchema->readSchema because it tries to find 'app_models' table

@markstory markstory commented on the diff
lib/Cake/Model/CakeSchema.php
@@ -321,8 +322,6 @@ class CakeSchema extends Object {
}
}
}
-
- ksort($tables);
@markstory Owner

Why remove the ksort?

I think that it was a mistake, let me check and also verify if remove Plugin.Model is needed. i'll close this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@ajibarra ajibarra closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 14, 2011
  1. @ajibarra

    Removed AppModel from Models array on CakeSchema->readSchema because …

    ajibarra authored
    …it tries to find 'app_models' table
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 13 deletions.
  1. +12 −13 lib/Cake/Model/CakeSchema.php
View
25 lib/Cake/Model/CakeSchema.php
@@ -216,17 +216,18 @@ public function read($options = array()) {
if (isset($db->config['prefix'])) {
$prefix = $db->config['prefix'];
}
-
- if (!is_array($models) && $models !== false) {
- if (isset($this->plugin)) {
- $models = App::objects($this->plugin . '.Model', null, false);
- } else {
- $models = App::objects('Model');
- }
- }
-
- if (is_array($models)) {
- foreach ($models as $model) {
+
+ if (!is_array($models) && $models !== false) {
+ if (isset($this->plugin)) {
+ $models = App::objects($this->plugin . '.Model', null, false);
+ } else {
+ $models = App::objects('Model');
+ }
+ }
+
+ if (is_array($models)) {
+ $models = array_diff($models, array('AppModel'));
+ foreach ($models as $model) {
$importModel = $model;
$plugin = null;
if (isset($this->plugin)) {
@@ -321,8 +322,6 @@ public function read($options = array()) {
}
}
}
-
- ksort($tables);
@markstory Owner

Why remove the ksort?

I think that it was a mistake, let me check and also verify if remove Plugin.Model is needed. i'll close this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
return compact('name', 'tables');
}
Something went wrong with that request. Please try again.