diff --git a/app/app_model.php b/app/app_model.php index 2e89abe9b..a0c06351e 100644 --- a/app/app_model.php +++ b/app/app_model.php @@ -111,7 +111,7 @@ function __feedableFind(&$Model, $query) $sql .= ', '.implode( ', ', $_fields ); } - $sql .= ' FROM '.$Model->useDbConfig.'_'.$Model->useTable; + $sql .= ' FROM '.$Model->tablePrefix.$Model->useTable; if ( isset( $query['feed'] ) ) { diff --git a/app/plugins/blog/models/post.php b/app/plugins/blog/models/post.php index c996fb2dc..b0421cd88 100644 --- a/app/plugins/blog/models/post.php +++ b/app/plugins/blog/models/post.php @@ -53,7 +53,7 @@ class Post extends BlogAppModel 'Tag' => array( 'className' => 'Blog.Tag', - 'joinTable' => 'posts_tags', + 'joinTable' => 'blog_posts_tags', 'foreignKey' => 'post_id', 'associationForeignKey' => 'tag_id', 'unique' => true, diff --git a/app/plugins/blog/models/tag.php b/app/plugins/blog/models/tag.php index 53f3cce14..02b3453ed 100644 --- a/app/plugins/blog/models/tag.php +++ b/app/plugins/blog/models/tag.php @@ -39,7 +39,7 @@ class Tag extends BlogAppModel 'Post' => array( 'className' => 'Blog.Post', - 'joinTable' => 'posts_tags', + 'joinTable' => 'blog_posts_tags', 'foreignKey' => 'tag_id', 'associationForeignKey' => 'post_id', 'unique' => true,