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
|
** 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('ACTION_ACT_PREPROCESS', 'BEFORE', $this, '_handle_act', array());
|
||||||
$controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, 'output', 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();
|
$event->preventDefault();
|
||||||
}
|
}
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ class syntax_plugin_anewssystem extends DokuWiki_Syntax_Plugin {
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* handle the match
|
/* handle the match
|
||||||
*/
|
*/
|
||||||
function handle($match, $state, $pos,Doku_Handler &$handler) {
|
function handle($match, $state, $pos,Doku_Handler $handler) {
|
||||||
global $ID, $conf;
|
global $ID, $conf;
|
||||||
$match = substr($match,strlen('{{anss>'),-2); //strip markup from start and end
|
$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
|
/* render output
|
||||||
* @author Taggic <taggic@t-online.de>
|
* @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;
|
global $ID, $conf;
|
||||||
$xhtml_renderer = new Doku_Renderer_xhtml();
|
$xhtml_renderer = new Doku_Renderer_xhtml();
|
||||||
$records = file(DOKU_PLUGIN.'anewssystem/tpl/newstemplate_'.$conf['lang'].'.txt');
|
$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;
|
return $news_edit_tb;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -27,9 +27,9 @@ class syntax_plugin_clear extends DokuWiki_Syntax_Plugin {
|
||||||
function connectTo($mode) {
|
function connectTo($mode) {
|
||||||
$this->Lexer->addSpecialPattern('<clear/>',$mode,'plugin_clear');
|
$this->Lexer->addSpecialPattern('<clear/>',$mode,'plugin_clear');
|
||||||
}
|
}
|
||||||
function handle($match, $state, $pos, &$handler){ return array($match, $state, $pos); }
|
function handle($match, $state, $pos, $handler){ return array($match, $state, $pos); }
|
||||||
function render($mode, &$renderer, $data) {
|
function render($mode, $renderer, $data) {
|
||||||
if($mode == 'xhtml'){
|
if($mode == 'xhtml'){
|
||||||
$renderer->doc .= "<div style='clear:both;'></div>";
|
$renderer->doc .= "<div style='clear:both;'></div>";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ class syntax_plugin_codelink extends DokuWiki_Syntax_Plugin {
|
||||||
* @param Doku_Handler $handler The handler
|
* @param Doku_Handler $handler The handler
|
||||||
* @return array Data for the renderer
|
* @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();
|
$data = array();
|
||||||
|
|
||||||
if (preg_match('/^~~CODE-/', $match)) {
|
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
|
* @param array $data The data from the handler() function
|
||||||
* @return bool If rendering was successful.
|
* @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;
|
if ($mode != 'xhtml') return false;
|
||||||
$renderer->doc .= $data[0];
|
$renderer->doc .= $data[0];
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -26,11 +26,11 @@ class syntax_plugin_const extends DokuWiki_Syntax_Plugin {
|
||||||
$this->Lexer->addSpecialPattern('<const[^>]*>[^<]*</const>',$mode,'plugin_const');
|
$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);
|
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.
|
// $data is what the function handle return'ed.
|
||||||
if($mode == 'xhtml'){
|
if($mode == 'xhtml'){
|
||||||
$renderer->doc .="";
|
$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');
|
$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
|
$params = substr($match, strlen('{{'), - strlen('}}')); //Strip markup
|
||||||
if(strpos($params, ' ') === 0) { // Space as first character
|
if(strpos($params, ' ') === 0) { // Space as first character
|
||||||
if(substr_compare($params, ' ', -1, 1) === 0) { // Space a front and back = centered
|
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));
|
return array(state, explode('|', $params));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render($mode, &$renderer, $data) {
|
public function render($mode, $renderer, $data) {
|
||||||
if($mode != 'xhtml') return false;
|
if($mode != 'xhtml') return false;
|
||||||
|
|
||||||
list($state, $params) = $data;
|
list($state, $params) = $data;
|
||||||
|
|
|
@ -47,7 +47,7 @@ class syntax_plugin_itemtable extends DokuWiki_Syntax_Plugin {
|
||||||
/**
|
/**
|
||||||
* Handle the match
|
* Handle the match
|
||||||
*/
|
*/
|
||||||
function handle($match, $state, $pos, &$handler){
|
function handle($match, $state, $pos, $handler){
|
||||||
switch ($state) {
|
switch ($state) {
|
||||||
case DOKU_LEXER_ENTER :
|
case DOKU_LEXER_ENTER :
|
||||||
return array($state, substr($match, 10, -1) );
|
return array($state, substr($match, 10, -1) );
|
||||||
|
@ -177,7 +177,7 @@ class syntax_plugin_itemtable extends DokuWiki_Syntax_Plugin {
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
function render($mode, &$renderer, $data) {
|
function render($mode, $renderer, $data) {
|
||||||
// This will only render in xhtml
|
// This will only render in xhtml
|
||||||
if($mode == 'xhtml'){
|
if($mode == 'xhtml'){
|
||||||
list($state, $match) = $data;
|
list($state, $match) = $data;
|
||||||
|
@ -224,4 +224,4 @@ class syntax_plugin_itemtable extends DokuWiki_Syntax_Plugin {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue