Skip to content

Commit

Permalink
Merge pull request #581 from Flyspray/dokuwiki-php7-compat
Browse files Browse the repository at this point in the history
Mainly drop PHP4 style constructors and replace them with PHP5 __construct() constructors, so PHP7 is not whining about old constructors.

Updated syntax highlighter geshi.php (the main file) to the easybook/geshi fork version 1.0.8.17
  • Loading branch information
peterdd committed Aug 10, 2016
2 parents 2308d48 + 8073365 commit 04e4f86
Show file tree
Hide file tree
Showing 6 changed files with 4,139 additions and 2,098 deletions.
6 changes: 3 additions & 3 deletions plugins/dokuwiki/inc/HTTPClient.php
Expand Up @@ -24,11 +24,11 @@ class DokuHTTPClient extends HTTPClient {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function DokuHTTPClient(){
function __construct(){
global $conf;

// call parent constructor
$this->HTTPClient();
parent::__construct();

// set some values from the config
$this->proxy_host = $conf['proxy']['host'];
Expand Down Expand Up @@ -88,7 +88,7 @@ class HTTPClient {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function HTTPClient(){
function __construct(){
$this->agent = 'Mozilla/4.0 (compatible; DokuWiki HTTP Client; '.PHP_OS.')';
$this->timeout = 15;
$this->cookies = array();
Expand Down
2 changes: 1 addition & 1 deletion plugins/dokuwiki/inc/JpegMeta.php
Expand Up @@ -43,7 +43,7 @@ class JpegMeta
*
* @author Sebastian Delmont <sdelmont@zonageek.com>
*/
function JpegMeta($fileName)
function __construct($fileName)
{

$this->_fileName = $fileName;
Expand Down
10 changes: 5 additions & 5 deletions plugins/dokuwiki/inc/cache.php
Expand Up @@ -21,7 +21,7 @@ class cache {

var $_event = ''; // event to be triggered during useCache

function cache($key,$ext) {
function __construct($key,$ext) {
$this->key = $key;
$this->ext = $ext;
$this->cache = getCacheName($key,$ext);
Expand Down Expand Up @@ -167,12 +167,12 @@ class cache_parser extends cache {

var $_event = 'PARSER_CACHE_USE';

function cache_parser($id, $file, $mode) {
function __construct($id, $file, $mode) {
if ($id) $this->page = $id;
$this->file = $file;
$this->mode = $mode;

parent::cache($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
parent::__construct($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.'.$mode);
}

function _useCache() {
Expand Down Expand Up @@ -276,8 +276,8 @@ function _addDependencies() {

class cache_instructions extends cache_parser {

function cache_instructions($id, $file) {
parent::cache_parser($id, $file, 'i');
function __construct($id, $file) {
parent::__construct($id, $file, 'i');
}

function retrieveCache($clean=true) {
Expand Down
4 changes: 2 additions & 2 deletions plugins/dokuwiki/inc/events.php
Expand Up @@ -26,7 +26,7 @@ class Doku_Event {
/**
* event constructor
*/
function Doku_Event($name, &$data) {
function __construct($name, &$data) {

$this->name = $name;
$this->data =& $data;
Expand Down Expand Up @@ -126,7 +126,7 @@ class Doku_Event_Handler {
* constructor, loads all action plugins and calls their register() method giving them
* an opportunity to register any hooks they require
*/
function Doku_Event_Handler() {
function __construct() {

// load action plugins
$plugin = NULL;
Expand Down

0 comments on commit 04e4f86

Please sign in to comment.