fix a bunch of php 7 warnings that fill our php error logs
"PHP Warning: Declaration of action_plugin_anewssystem::register(Doku_Event_Handler &$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /srv/web/enlightenment.org/public_html/lib/plugins/anewssystem/action.php on line 0" these ones...
This commit is contained in:
parent
efec8082aa
commit
946ef22d57
|
@ -33,7 +33,7 @@ class action_plugin_anewssystem extends DokuWiki_Action_Plugin {
|
|||
/******************************************************************************
|
||||
** Register its handlers with the dokuwiki's event controller
|
||||
*/
|
||||
function register(Doku_Event_Handler &$controller) {
|
||||
function register(Doku_Event_Handler $controller) {
|
||||
$controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, '_handle_act', array());
|
||||
$controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'output', array());
|
||||
}
|
||||
|
@ -231,4 +231,4 @@ class action_plugin_anewssystem extends DokuWiki_Action_Plugin {
|
|||
$event->preventDefault();
|
||||
}
|
||||
/******************************************************************************/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin {
|
|||
/******************************************************************************/
|
||||
/* handle the match
|
||||
*/
|
||||
function handle($match, $state, $pos,Doku_Handler &$handler) {
|
||||
function handle($match, $state, $pos,Doku_Handler $handler) {
|
||||
global $ID, $conf;
|
||||
$match = substr($match,strlen('{{anss>'),-2); //strip markup from start and end
|
||||
|
||||
|
@ -71,7 +71,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin {
|
|||
/* render output
|
||||
* @author Taggic <taggic@t-online.de>
|
||||
*/
|
||||
function render($mode,Doku_Renderer &$renderer, $ans_conf) {
|
||||
function render($mode,Doku_Renderer $renderer, $ans_conf) {
|
||||
global $ID, $conf;
|
||||
$xhtml_renderer = new Doku_Renderer_xhtml();
|
||||
$records = file(DOKU_PLUGIN.'anewssystem/tpl/newstemplate_'.$conf['lang'].'.txt');
|
||||
|
@ -1559,4 +1559,4 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin {
|
|||
return $news_edit_tb;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -27,9 +27,9 @@ class syntax_plugin_clear extends DokuWiki_Syntax_Plugin {
|
|||
function connectTo($mode) {
|
||||
$this->Lexer->addSpecialPattern('<clear/>',$mode,'plugin_clear');
|
||||
}
|
||||
function handle($match, $state, $pos, &$handler){ return array($match, $state, $pos); }
|
||||
function render($mode, &$renderer, $data) {
|
||||
if($mode == 'xhtml'){
|
||||
function handle($match, $state, $pos, $handler){ return array($match, $state, $pos); }
|
||||
function render($mode, $renderer, $data) {
|
||||
if($mode == 'xhtml'){
|
||||
$renderer->doc .= "<div style='clear:both;'></div>";
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ class syntax_plugin_codelink extends DokuWiki_Syntax_Plugin {
|
|||
* @param Doku_Handler $handler The handler
|
||||
* @return array Data for the renderer
|
||||
*/
|
||||
public function handle($match, $state, $pos, Doku_Handler &$handler){
|
||||
public function handle($match, $state, $pos, Doku_Handler $handler){
|
||||
$data = array();
|
||||
|
||||
if (preg_match('/^~~CODE-/', $match)) {
|
||||
|
@ -133,7 +133,7 @@ class syntax_plugin_codelink extends DokuWiki_Syntax_Plugin {
|
|||
* @param array $data The data from the handler() function
|
||||
* @return bool If rendering was successful.
|
||||
*/
|
||||
public function render($mode, Doku_Renderer &$renderer, $data) {
|
||||
public function render($mode, Doku_Renderer $renderer, $data) {
|
||||
if ($mode != 'xhtml') return false;
|
||||
$renderer->doc .= $data[0];
|
||||
return true;
|
||||
|
|
|
@ -26,11 +26,11 @@ class syntax_plugin_const extends DokuWiki_Syntax_Plugin {
|
|||
$this->Lexer->addSpecialPattern('<const[^>]*>[^<]*</const>',$mode,'plugin_const');
|
||||
}
|
||||
|
||||
function handle($match, $state, $pos, Doku_Handler &$handler) {
|
||||
function handle($match, $state, $pos, Doku_Handler $handler) {
|
||||
return array($match, $state, $pos);
|
||||
}
|
||||
|
||||
function render($mode, Doku_Renderer &$renderer, $data) {
|
||||
function render($mode, Doku_Renderer $renderer, $data) {
|
||||
// $data is what the function handle return'ed.
|
||||
if($mode == 'xhtml'){
|
||||
$renderer->doc .="";
|
||||
|
|
|
@ -43,7 +43,7 @@ class syntax_plugin_html5video_video extends DokuWiki_Syntax_Plugin {
|
|||
$this->Lexer->addSpecialPattern('\{\{[^}]*(?:(?:webm)|(?:ogv)|(?:mp4))(?:\|(?:\d{2,4}x\d{2,4})?(?:\|(?:loop)?,?(?:autoplay)?(?:,loop)?)?)? ?\}\}',$mode,'plugin_html5video_video');
|
||||
}
|
||||
|
||||
public function handle($match, $state, $pos, &$handler){
|
||||
public function handle($match, $state, $pos, $handler){
|
||||
$params = substr($match, strlen('{{'), - strlen('}}')); //Strip markup
|
||||
if(strpos($params, ' ') === 0) { // Space as first character
|
||||
if(substr_compare($params, ' ', -1, 1) === 0) { // Space a front and back = centered
|
||||
|
@ -65,7 +65,7 @@ class syntax_plugin_html5video_video extends DokuWiki_Syntax_Plugin {
|
|||
return array(state, explode('|', $params));
|
||||
}
|
||||
|
||||
public function render($mode, &$renderer, $data) {
|
||||
public function render($mode, $renderer, $data) {
|
||||
if($mode != 'xhtml') return false;
|
||||
|
||||
list($state, $params) = $data;
|
||||
|
|
|
@ -47,7 +47,7 @@ class syntax_plugin_itemtable extends DokuWiki_Syntax_Plugin {
|
|||
/**
|
||||
* Handle the match
|
||||
*/
|
||||
function handle($match, $state, $pos, &$handler){
|
||||
function handle($match, $state, $pos, $handler){
|
||||
switch ($state) {
|
||||
case DOKU_LEXER_ENTER :
|
||||
return array($state, substr($match, 10, -1) );
|
||||
|
@ -177,7 +177,7 @@ class syntax_plugin_itemtable extends DokuWiki_Syntax_Plugin {
|
|||
return $res;
|
||||
}
|
||||
|
||||
function render($mode, &$renderer, $data) {
|
||||
function render($mode, $renderer, $data) {
|
||||
// This will only render in xhtml
|
||||
if($mode == 'xhtml'){
|
||||
list($state, $match) = $data;
|
||||
|
@ -224,4 +224,4 @@ class syntax_plugin_itemtable extends DokuWiki_Syntax_Plugin {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue