1*64ab5140SAndreas Gohr<?php 2*64ab5140SAndreas Gohr 3*64ab5140SAndreas Gohrnamespace dokuwiki\Action; 4*64ab5140SAndreas Gohr 5*64ab5140SAndreas Gohruse dokuwiki\Action\Exception\ActionAbort; 6*64ab5140SAndreas Gohr 7*64ab5140SAndreas Gohrclass Search extends AbstractAction { 8*64ab5140SAndreas Gohr 9*64ab5140SAndreas Gohr /** @inheritdoc */ 10*64ab5140SAndreas Gohr function minimumPermission() { 11*64ab5140SAndreas Gohr return AUTH_NONE; 12*64ab5140SAndreas Gohr } 13*64ab5140SAndreas Gohr 14*64ab5140SAndreas Gohr /** 15*64ab5140SAndreas Gohr * we only search if a search word was given 16*64ab5140SAndreas Gohr * 17*64ab5140SAndreas Gohr * @inheritdoc 18*64ab5140SAndreas Gohr */ 19*64ab5140SAndreas Gohr public function checkPermissions() { 20*64ab5140SAndreas Gohr parent::checkPermissions(); 21*64ab5140SAndreas Gohr global $QUERY; 22*64ab5140SAndreas Gohr $s = cleanID($QUERY); 23*64ab5140SAndreas Gohr if($s === '') throw new ActionAbort(); 24*64ab5140SAndreas Gohr } 25*64ab5140SAndreas Gohr 26*64ab5140SAndreas Gohr /** @inheritdoc */ 27*64ab5140SAndreas Gohr public function tplContent() { 28*64ab5140SAndreas Gohr html_search(); 29*64ab5140SAndreas Gohr } 30*64ab5140SAndreas Gohr} 31