Skip to content

Commit

Permalink
phpmdエラー
Browse files Browse the repository at this point in the history
  • Loading branch information
s-nakajima committed Nov 16, 2015
1 parent 9c100d3 commit 6827c50
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Model/Behavior/SearchableBehavior.php
Expand Up @@ -139,13 +139,17 @@ public function beforeSave(Model $model, $options = []) {
$indexes[$column] = $model->data[$model->alias][$fields[$column]];
}
}
if (isset($indexes['title'])) {
$this->setSearchableTitle($indexes['title']);
}
if (isset($indexes['contents'])) {
$this->setSearchableContents($indexes['contents']);
/* var_dump($this->getSearchableContents()); */
}
//if (isset($indexes['title'])) {
// $this->setSearchableTitle($indexes['title']);
//}
$this->setSearchableTitle(Hash::get($indexes, 'title'));

//if (isset($indexes['contents'])) {
// $this->setSearchableContents($indexes['contents']);
// /* var_dump($this->getSearchableContents()); */
//}
$this->setSearchableContents(Hash::get($indexes, 'contents'));

/* var_dump($indexes); */
/* /\* var_dump($model); *\/ */
/* var_dump($model->data); */
Expand Down

0 comments on commit 6827c50

Please sign in to comment.