mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-08 17:46:34 +02:00
[bridges] use constants instead of variable members
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
class LWNprevBridge extends BridgeAbstract{
|
||||
public $maintainer = 'Pierre Mazière';
|
||||
public $name = 'LWN Free Weekly Edition';
|
||||
public $uri = 'https://lwn.net/';
|
||||
public $description = 'LWN Free Weekly Edition available one week late';
|
||||
const MAINTAINER = 'Pierre Mazière';
|
||||
const NAME = 'LWN Free Weekly Edition';
|
||||
const URI = 'https://lwn.net/';
|
||||
const DESCRIPTION = 'LWN Free Weekly Edition available one week late';
|
||||
|
||||
function getURI(){
|
||||
return $this->uri.'free/bigpage';
|
||||
return self::URI.'free/bigpage';
|
||||
}
|
||||
|
||||
private function jumpToNextTag(&$node){
|
||||
@@ -48,7 +48,7 @@ class LWNprevBridge extends BridgeAbstract{
|
||||
break;
|
||||
}
|
||||
}
|
||||
$realURI=$this->uri.$a->getAttribute('href');
|
||||
$realURI=self::URI.$a->getAttribute('href');
|
||||
$URICounter=0;
|
||||
|
||||
$edition=$html->getElementsByTagName('h1')->item(0)->textContent;
|
||||
@@ -82,7 +82,7 @@ class LWNprevBridge extends BridgeAbstract{
|
||||
$h2FirstChild=$h2->firstChild;
|
||||
$this->jumpToNextTag($h2FirstChild);
|
||||
if($h2FirstChild->nodeName==='a'){
|
||||
$item['uri']=$this->uri.$h2FirstChild->getAttribute('href');
|
||||
$item['uri']=self::URI.$h2FirstChild->getAttribute('href');
|
||||
}else{
|
||||
$item['uri']=$realURI.'#'.$URICounter;
|
||||
}
|
||||
|
Reference in New Issue
Block a user