Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandschuetz committed Apr 3, 2012
1 parent 7fdbad7 commit 4d62985
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/Bancha/BanchaApi.php
Expand Up @@ -49,7 +49,8 @@ public function getRemotableModels()
foreach ($models as $modelClass) {
$model = $this->loadModel($modelClass);
if (isset($model->actsAs) && is_array($model->actsAs)) {
if (in_array('Bancha.BanchaRemotable', $model->actsAs)) {
// check if it is remotable (first when a AppModel behavior is also defined, second when not)
if (array_key_exists('Bancha.BanchaRemotable', $model->actsAs) || in_array('Bancha.BanchaRemotable', $model->actsAs)) {
$remotableModels[] = $modelClass;
}
}
Expand Down

0 comments on commit 4d62985

Please sign in to comment.