Skip to content

Commit

Permalink
Merge pull request #61 from MachX428/igor_fix
Browse files Browse the repository at this point in the history
Fix for Igor "IXR_Client::$timeout" error
  • Loading branch information
splitbrain committed Aug 16, 2022
2 parents 6d6286a + d2076b7 commit a7487a6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ function admin_plugin_sync(){

function _connect(){
if(!is_null($this->client)) return true;
$this->client = new IXR_Client($this->profiles[$this->profno]['server']);

if ( isset($this->profiles[$this->profno]['timeout']) ){
$timeout = (int) $this->profiles[$this->profno]['timeout'];
} else {
$timeout = $this->defaultTimeout;
}
$this->client->timeout = $timeout;

if(class_exists('IXR_Client')) {
$this->client = new IXR_Client($this->profiles[$this->profno]['server'], false, 80, $timeout);
}
else {
$this->client = new dokuwiki\Remote\IXR\Client($this->profiles[$this->profno]['server']);
$this->client->timeout = $timeout;
}

// do the login
if($this->profiles[$this->profno]['user']){
Expand Down

0 comments on commit a7487a6

Please sign in to comment.