forked from blallo/rss-bridge
Added parameters checks for PinterestBridge
This commit is contained in:
parent
a1152aee96
commit
b4b3c4b0ac
1 changed files with 12 additions and 1 deletions
|
@ -16,7 +16,18 @@ class PinterestBridge extends BridgeAbstract{
|
||||||
|
|
||||||
public function collectData(array $param){
|
public function collectData(array $param){
|
||||||
$html = '';
|
$html = '';
|
||||||
if (isset($param['u']) && isset($param['b'])) {
|
if (isset($param['u']) || isset($param['b'])) {
|
||||||
|
|
||||||
|
if (empty($param['u']))
|
||||||
|
{
|
||||||
|
$this->returnError('You must specify a Pinterest username (?u=...).', 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($param['b']))
|
||||||
|
{
|
||||||
|
$this->returnError('You must specify a Pinterest board for this username (?b=...).', 400);
|
||||||
|
}
|
||||||
|
|
||||||
$this->username = $param['u'];
|
$this->username = $param['u'];
|
||||||
$this->board = $param['b'];
|
$this->board = $param['b'];
|
||||||
$html = file_get_html($this->getURI().'/'.urlencode($this->username).'/'.urlencode($this->board)) or $this->returnError('Could not request Pinterest.', 404);
|
$html = file_get_html($this->getURI().'/'.urlencode($this->username).'/'.urlencode($this->board)) or $this->returnError('Could not request Pinterest.', 404);
|
||||||
|
|
Loading…
Reference in a new issue