|
|
@@ -395,11 +395,11 @@ class FreshRSS_Feed extends Minz_Model {
|
|
|
$this->entries = $entries;
|
|
|
}
|
|
|
|
|
|
- function cacheModifiedTime() {
|
|
|
+ public function cacheModifiedTime() {
|
|
|
return @filemtime(CACHE_PATH . '/' . md5($this->url) . '.spc');
|
|
|
}
|
|
|
|
|
|
- function lock() {
|
|
|
+ public function lock() {
|
|
|
$this->lockPath = TMP_PATH . '/' . $this->hash() . '.freshrss.lock';
|
|
|
if (file_exists($this->lockPath) && ((time() - @filemtime($this->lockPath)) > 3600)) {
|
|
|
@unlink($this->lockPath);
|
|
|
@@ -412,13 +412,13 @@ class FreshRSS_Feed extends Minz_Model {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- function unlock() {
|
|
|
+ public function unlock() {
|
|
|
@unlink($this->lockPath);
|
|
|
}
|
|
|
|
|
|
//<PubSubHubbub>
|
|
|
|
|
|
- function pubSubHubbubEnabled() {
|
|
|
+ public function pubSubHubbubEnabled() {
|
|
|
$url = $this->selfUrl ? $this->selfUrl : $this->url;
|
|
|
$hubFilename = PSHB_PATH . '/feeds/' . base64url_encode($url) . '/!hub.json';
|
|
|
if ($hubFile = @file_get_contents($hubFilename)) {
|
|
|
@@ -431,7 +431,7 @@ class FreshRSS_Feed extends Minz_Model {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- function pubSubHubbubError($error = true) {
|
|
|
+ public function pubSubHubbubError($error = true) {
|
|
|
$url = $this->selfUrl ? $this->selfUrl : $this->url;
|
|
|
$hubFilename = PSHB_PATH . '/feeds/' . base64url_encode($url) . '/!hub.json';
|
|
|
$hubFile = @file_get_contents($hubFilename);
|
|
|
@@ -444,7 +444,7 @@ class FreshRSS_Feed extends Minz_Model {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- function pubSubHubbubPrepare() {
|
|
|
+ public function pubSubHubbubPrepare() {
|
|
|
$key = '';
|
|
|
if (FreshRSS_Context::$system_conf->base_url && $this->hubUrl && $this->selfUrl && @is_dir(PSHB_PATH)) {
|
|
|
$path = PSHB_PATH . '/feeds/' . base64url_encode($this->selfUrl);
|
|
|
@@ -491,7 +491,7 @@ class FreshRSS_Feed extends Minz_Model {
|
|
|
}
|
|
|
|
|
|
//Parameter true to subscribe, false to unsubscribe.
|
|
|
- function pubSubHubbubSubscribe($state) {
|
|
|
+ public function pubSubHubbubSubscribe($state) {
|
|
|
$url = $this->selfUrl ? $this->selfUrl : $this->url;
|
|
|
if (FreshRSS_Context::$system_conf->base_url && $url) {
|
|
|
$hubFilename = PSHB_PATH . '/feeds/' . base64url_encode($url) . '/!hub.json';
|