File modules/cms/action/search/SearchQuicksearchAction.class.php

Last commit: Sat Oct 17 02:16:28 2026 +0200	Jan Dankert	Refactoring: Removed empty view() and post() methods; OpenAPI cleanup, removed these unused paths.
1 <?php 2 namespace cms\action\search; 3 use cms\action\Method; 4 use cms\action\SearchAction; 5 use cms\base\Configuration; 6 7 class SearchQuicksearchAction extends SearchAction implements Method { 8 public function view() { 9 $searchConfig = Configuration::subset('search')->subset('quicksearch'); 10 11 $text = $this->request->getText('search'); 12 13 $flag = $searchConfig->subset('flag'); 14 15 $searchFlags = 0; 16 17 // Always search for the id without a max length 18 if ( $flag->is('id' ) ) $searchFlags |= self::FLAG_ID; 19 20 if ( strlen($text) >= $searchConfig->get('maxlength',3 ) ) { 21 22 if ( $flag->is('name' ) ) $searchFlags |= self::FLAG_NAME; 23 if ( $flag->is('filename' ) ) $searchFlags |= self::FLAG_FILENAME; 24 if ( $flag->is('description') ) $searchFlags |= self::FLAG_DESCRIPTION; 25 if ( $flag->is('content' ) ) $searchFlags |= self::FLAG_VALUE; 26 } 27 28 $this->performSearch($text, $searchFlags); 29 } 30 31 32 33 }
Download modules/cms/action/search/SearchQuicksearchAction.class.php
History Sat, 17 Oct 2026 02:16:28 +0200 Jan Dankert Refactoring: Removed empty view() and post() methods; OpenAPI cleanup, removed these unused paths. Fri, 26 Feb 2021 01:06:01 +0100 Jan Dankert Refactoring accessing the request parameter values. Tue, 17 Nov 2020 23:51:00 +0100 Jan Dankert Refactoring: Every Actionmethod has now its own class.