Do not directly use native function in API
As fedb877023
showed, we can not directly
use native fuctions because they have no proper type hinting in PHP7.4
This commit is contained in:
parent
5b379b5045
commit
e7323dfb8c
|
@ -44,7 +44,7 @@ class ApiCore
|
|||
'dokuwiki.logoff' => new ApiCall([$this, 'logoff']),
|
||||
'dokuwiki.getPagelist' => new ApiCall([$this, 'readNamespace']),
|
||||
'dokuwiki.search' => new ApiCall([$this, 'search']),
|
||||
'dokuwiki.getTime' => (new ApiCall('time'))
|
||||
'dokuwiki.getTime' => (new ApiCall([$this, 'time']))
|
||||
->setSummary('Returns the current server time')
|
||||
->setReturnDescription('unix timestamp'),
|
||||
'dokuwiki.setLocks' => new ApiCall([$this, 'setLocks']),
|
||||
|
@ -83,6 +83,17 @@ class ApiCore
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the current server time
|
||||
*
|
||||
* Uses a Unix timestamp (seconds since 1970-01-01 00:00:00 UTC)
|
||||
*
|
||||
* @return int A unix timestamp
|
||||
*/
|
||||
public function time() {
|
||||
return time();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a raw wiki page
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue