Skip to content

Commit

Permalink
master相手に更新系を動かすように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
RyujiAMANO committed May 21, 2015
1 parent 0a16368 commit 575478d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Model/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ public function getTagsByContentId($modelName, $contentId) {
* @return bool
*/
public function saveTags($blockId, $modelName, $contentId, $tags) {
$this->setDataSource('master');

$TagsContent = ClassRegistry::init('Tags.TagsContent');
$TagsContent->setDataSource('master');

if (!is_array($tags)) {
$tags = array();
}
Expand Down Expand Up @@ -198,6 +202,7 @@ public function afterSave($created, $options = array()) {
* @return void
*/
public function cleanup(Model $Model, $blockId) {
$this->setDataSource('master');
// 下記SQLを分解再構築した is_latest or is_activeなコンテンツとつなっがてないタグidを列挙するクエリ
//select tags.id from tags
//LEFT JOIN tags_contents ON tags.id = tags_contents.tag_id
Expand Down

0 comments on commit 575478d

Please sign in to comment.