Updates
This commit is contained in:
parent
88a36bf433
commit
f4cc449177
1 changed files with 9 additions and 3 deletions
|
@ -7,10 +7,10 @@ class pluginAPI extends Plugin {
|
||||||
global $Security;
|
global $Security;
|
||||||
|
|
||||||
// This key is used for request such as get the list of all posts and pages
|
// This key is used for request such as get the list of all posts and pages
|
||||||
$authKey = md5($Security->key1().time().DOMAIN_BASE);
|
$authKey = md5($Security->key1().time().DOMAIN);
|
||||||
|
|
||||||
$this->dbFields = array(
|
$this->dbFields = array(
|
||||||
'ping'=>0, // 0 = false, 1 = true
|
'ping'=>1, // 0 = false, 1 = true
|
||||||
'authKey'=>$authKey, // Private key
|
'authKey'=>$authKey, // Private key
|
||||||
'showAllAmount'=>15 // Amount of posts and pages for return
|
'showAllAmount'=>15 // Amount of posts and pages for return
|
||||||
);
|
);
|
||||||
|
@ -60,6 +60,13 @@ class pluginAPI extends Plugin {
|
||||||
$this->ping();
|
$this->ping();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function install($position=0)
|
||||||
|
{
|
||||||
|
parent::install($position);
|
||||||
|
|
||||||
|
$this->ping();
|
||||||
|
}
|
||||||
|
|
||||||
private function ping()
|
private function ping()
|
||||||
{
|
{
|
||||||
if($this->getDbField('ping')) {
|
if($this->getDbField('ping')) {
|
||||||
|
@ -76,7 +83,6 @@ class pluginAPI extends Plugin {
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_HEADER, false);
|
curl_setopt($ch, CURLOPT_HEADER, false);
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
|
|
||||||
$out = curl_exec($ch);
|
$out = curl_exec($ch);
|
||||||
|
|
||||||
if($out === false) {
|
if($out === false) {
|
||||||
|
|
Loading…
Reference in a new issue