mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-21 07:42:10 +02:00
[core] store parameters values in BridgeAbstract::parameters
This way, any BridgeAbstract method can now have access to these values, no only collectData Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
@@ -19,10 +19,11 @@ class IdenticaBridge extends BridgeAbstract{
|
||||
|
||||
}
|
||||
|
||||
public function collectData(array $param){
|
||||
public function collectData(){
|
||||
$param=$this->parameters[$this->queriedContext];
|
||||
$html = '';
|
||||
if (isset($param['u'])) { /* user timeline mode */
|
||||
$this->request = $param['u'];
|
||||
if (isset($param['u']['value'])) { /* user timeline mode */
|
||||
$this->request = $param['u']['value'];
|
||||
$html = $this->getSimpleHTMLDOM('https://identi.ca/'.urlencode($this->request)) or $this->returnServerError('Requested username can\'t be found.');
|
||||
}
|
||||
else {
|
||||
@@ -34,7 +35,7 @@ class IdenticaBridge extends BridgeAbstract{
|
||||
$item['uri'] = html_entity_decode($dent->find('a', 0)->href); // get dent link
|
||||
$item['timestamp'] = strtotime($dent->find('abbr.easydate', 0)->plaintext); // extract dent timestamp
|
||||
$item['content'] = trim($dent->find('div.activity-content', 0)->innertext); // extract dent text
|
||||
$item['title'] = $param['u'] . ' | ' . $item['content'];
|
||||
$item['title'] = $param['u']['value'] . ' | ' . $item['content'];
|
||||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user