Skip to content

Commit

Permalink
Removing some redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
jamierumbelow committed Jun 9, 2011
1 parent 92428ba commit 9a6f3d8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions third_party/blog/libraries/blog.php
Expand Up @@ -392,7 +392,6 @@ public function entries($template_data) {
if ($category) {
// Get rid of 'not '
$not = FALSE;
$first = TRUE;
if (substr($category, 0, 4) == 'not ') { $category = substr($category, 4); $not = TRUE; }

// Multiple categories
Expand All @@ -402,11 +401,9 @@ public function entries($template_data) {
$cat_id = $this->mojo->blog_model->isolate()->where('url_name', $category)->category()->id;
$this->mojo->blog_model->unisolate();

if ($not) {
$this->mojo->blog_model->where('category_id !=', $cat_id);
} else {
if ($first) {
$this->mojo->blog_model->where('category_id', $cat_id);
if ($cat_id) {
if ($not) {
$this->mojo->blog_model->where('category_id !=', $cat_id);
} else {
$this->mojo->blog_model->or_where('category_id', $cat_id);
}
Expand Down

0 comments on commit 9a6f3d8

Please sign in to comment.