From 4797bd6d60d4efceaa80ea2f913752277fd59b48 Mon Sep 17 00:00:00 2001
From: aydreeihn <adriane@enhancesoft.com>
Date: Mon, 11 Sep 2017 16:31:05 -0500
Subject: [PATCH] code cleanup

---
 include/class.dept.php       | 3 +--
 include/class.filter.php     | 3 +--
 include/staff/filter.inc.php | 6 ++----
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/include/class.dept.php b/include/class.dept.php
index 99c79ec24..e098e4661 100644
--- a/include/class.dept.php
+++ b/include/class.dept.php
@@ -548,8 +548,7 @@ implements TemplateVariable {
             $query->order_by('name')
                  ->values('id', 'pid', 'flags', 'name', 'parent');
 
-            foreach ($query as $row)
-            {
+            foreach ($query as $row) {
               $display = ($row['flags'] & self::FLAG_ACTIVE);
 
               $depts[$row['id']] = array('id' => $row['id'], 'pid'=>$row['pid'], 'name'=>$row['name'],
diff --git a/include/class.filter.php b/include/class.filter.php
index 4adab8206..5db16cdfe 100644
--- a/include/class.filter.php
+++ b/include/class.filter.php
@@ -457,8 +457,7 @@ class Filter {
     }
 
     function save($id,$vars,&$errors) {
-      if ($this)
-      {
+      if ($this) {
         foreach ($this->getActions() as $A) {
           if ($A->type == 'dept')
               $dept = Dept::lookup($A->parseConfiguration($vars)['dept_id']);
diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php
index c04ad7014..ba0c06ce5 100644
--- a/include/staff/filter.inc.php
+++ b/include/staff/filter.inc.php
@@ -240,8 +240,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                 if ($filter) { foreach ($filter->getActions() as $A) {
                     $_warn = '';
                     $existing[] = $A->type;
-                    if($A->type == 'dept')
-                    {
+                    if($A->type == 'dept') {
                       $errors['topic_id'] = '';
                       // $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                       $dept_config = $A->parseConfiguration($_POST);
@@ -249,8 +248,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                       if($dept && !$dept->isActive())
                         $_warn = sprintf(__('%s must be active'), __('Department'));
                     }
-                    elseif($A->type == 'topic')
-                    {
+                    elseif($A->type == 'topic') {
                       $errors['dept_id'] = '';
                       $topic_config = $A->parseConfiguration($_POST);
                       $topic = Topic::lookup($topic_config['topic_id']);
-- 
GitLab