1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-13 12:04:09 +02:00

Merge branch 'methods2functions' of https://framagit.org/peetah/rss-bridge

This commit is contained in:
logmanoriginal
2016-10-02 16:05:58 +02:00
114 changed files with 899 additions and 904 deletions

View File

@@ -20,19 +20,19 @@ class WhydBridge extends BridgeAbstract{
$html = '';
if (strlen(preg_replace("/[^0-9a-f]/",'', $this->getInput('u'))) == 24){
// is input the userid ?
$html = $this->getSimpleHTMLDOM(
$html = getSimpleHTMLDOM(
self::URI.'u/'.preg_replace("/[^0-9a-f]/",'', $this->getInput('u'))
) or $this->returnServerError('No results for this query.');
) or returnServerError('No results for this query.');
} else { // input may be the username
$html = $this->getSimpleHTMLDOM(
$html = getSimpleHTMLDOM(
self::URI.'search?q='.urlencode($this->getInput('u'))
) or $this->returnServerError('No results for this query.');
) or returnServerError('No results for this query.');
for ($j = 0; $j < 5; $j++) {
if (strtolower($html->find('div.user', $j)->find('a',0)->plaintext) == strtolower($this->getInput('u'))) {
$html = $this->getSimpleHTMLDOM(
$html = getSimpleHTMLDOM(
self::URI . $html->find('div.user', $j)->find('a', 0)->getAttribute('href')
) or $this->returnServerError('No results for this query');
) or returnServerError('No results for this query');
break;
}
}