Skip to content

Commit

Permalink
change type of return to galleries:exists method of plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosCoelho committed Apr 15, 2011
1 parent abd3ff9 commit 9194e7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/modules/galleries/plugin.php
Expand Up @@ -61,15 +61,15 @@ function images()
*
* Check if a gallery exists
*
* @return bool
* @return int 0 or 1
*/
function exists()
{
$slug = $this->attribute('slug');

$this->load->model('galleries_m');

return $slug ? (int) $this->galleries_m->count_by('slug', $slug) > 0 : FALSE;
return (int) ($slug ? $this->galleries_m->count_by('slug', $slug) > 0 : FALSE);
}
}

Expand Down

0 comments on commit 9194e7d

Please sign in to comment.