| @@ -56,8 +56,8 @@ discard block | ||
| 56 | 56 | |
| 57 | 57 | protected function init() | 
| 58 | 58 |      { | 
| 59 | -        if($this->request->param('Action')) { | |
| 60 | -            if(empty($this->request->postVars())) { | |
| 59 | +        if ($this->request->param('Action')) { | |
| 60 | +            if (empty($this->request->postVars())) { | |
| 61 | 61 |                  $this->redirect('/admin/find'); | 
| 62 | 62 | } | 
| 63 | 63 | } | 
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 | |
| 111 | 111 |          if (!$this->getRequest()->requestVar('Keywords')) { | 
| 112 | 112 | $lastResults = $this->lastSearchResults(); | 
| 113 | -            if($lastResults) { | |
| 113 | +            if ($lastResults) { | |
| 114 | 114 | $resultsTitle = 'Last Results'; | 
| 115 | 115 |              } else { | 
| 116 | 116 | $resultsTitle = 'Last Edited'; | 
| @@ -180,9 +180,9 @@ discard block | ||
| 180 | 180 | Environment::increaseTimeLimitTo(300); | 
| 181 | 181 | Environment::setMemoryLimitMax(-1); | 
| 182 | 182 | Environment::increaseMemoryLimitTo(-1); | 
| 183 | -        if(empty($this->rawData)) { | |
| 183 | +        if (empty($this->rawData)) { | |
| 184 | 184 | $lastResults = $this->lastSearchResults(); | 
| 185 | -            if($lastResults) { | |
| 185 | +            if ($lastResults) { | |
| 186 | 186 | return $lastResults; | 
| 187 | 187 | } | 
| 188 | 188 | } | 
| @@ -208,14 +208,14 @@ discard block | ||
| 208 | 208 | ->setWordsAsString($this->keywords) | 
| 209 | 209 | ->getLinks() | 
| 210 | 210 | ; | 
| 211 | -        if($results->count() === 1) { | |
| 211 | +        if ($results->count() === 1) { | |
| 212 | 212 | $result = $results->first(); | 
| 213 | 213 | $this->redirect($result->CMSEditLink); | 
| 214 | 214 | return null; | 
| 215 | 215 | } | 
| 216 | 216 | // Accessing the session | 
| 217 | 217 | $session = $this->getRequest()->getSession(); | 
| 218 | -        if($session) { | |
| 218 | +        if ($session) { | |
| 219 | 219 |              $session->set('QuickSearchLastResults', serialize($results->toArray())); | 
| 220 | 220 | } | 
| 221 | 221 | return $results; | 
| @@ -246,16 +246,16 @@ discard block | ||
| 246 | 246 |      { | 
| 247 | 247 | // Accessing the session | 
| 248 | 248 | $session = $this->getRequest()->getSession(); | 
| 249 | -        if($this->quickSearchType) { | |
| 249 | +        if ($this->quickSearchType) { | |
| 250 | 250 |              $session->set('QuickSearchType', $this->quickSearchType); | 
| 251 | -        } elseif($session) { | |
| 251 | +        } elseif ($session) { | |
| 252 | 252 |              $this->quickSearchType = $session->get('QuickSearchType'); | 
| 253 | -            if(isset($_GET['flush'])) { | |
| 253 | +            if (isset($_GET['flush'])) { | |
| 254 | 254 | $this->quickSearchType = ''; | 
| 255 | 255 |                  $session->set('QuickSearchType', ''); | 
| 256 | 256 | } | 
| 257 | 257 | } | 
| 258 | -        if(!$this->quickSearchType) { | |
| 258 | +        if (!$this->quickSearchType) { | |
| 259 | 259 |              $this->quickSearchType = $this->Config()->get('default_quick_search_type'); | 
| 260 | 260 | } | 
| 261 | 261 | return (string) $this->quickSearchType; | 
| @@ -265,15 +265,15 @@ discard block | ||
| 265 | 265 |      { | 
| 266 | 266 | // Accessing the session | 
| 267 | 267 | $session = $this->getRequest()->getSession(); | 
| 268 | -        if($session) { | |
| 269 | -            if(isset($_GET['flush'])) { | |
| 268 | +        if ($session) { | |
| 269 | +            if (isset($_GET['flush'])) { | |
| 270 | 270 |                  $session->clear('QuickSearchLastResults'); | 
| 271 | 271 |              } else { | 
| 272 | 272 |                  $data = $session->get('QuickSearchLastResults'); | 
| 273 | -                if($data) { | |
| 273 | +                if ($data) { | |
| 274 | 274 | $array = unserialize($data); | 
| 275 | 275 | $al = ArrayList::create(); | 
| 276 | -                    foreach($array as $item) { | |
| 276 | +                    foreach ($array as $item) { | |
| 277 | 277 | $al->push($item); | 
| 278 | 278 | } | 
| 279 | 279 | return $al; |