[PikabuBridge] Added filtering by user (#1266)
This commit is contained in:
parent
48d0385653
commit
b440a6fdc6
1 changed files with 9 additions and 0 deletions
|
@ -32,6 +32,13 @@ class PikabuBridge extends BridgeAbstract {
|
||||||
'required' => true
|
'required' => true
|
||||||
),
|
),
|
||||||
'filter' => self::PARAMETERS_FILTER
|
'filter' => self::PARAMETERS_FILTER
|
||||||
|
),
|
||||||
|
'По пользователю' => array(
|
||||||
|
'user' => array(
|
||||||
|
'name' => 'Пользователь',
|
||||||
|
'exampleValue' => 'admin',
|
||||||
|
'required' => true
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -40,6 +47,8 @@ class PikabuBridge extends BridgeAbstract {
|
||||||
public function getURI() {
|
public function getURI() {
|
||||||
if ($this->getInput('tag')) {
|
if ($this->getInput('tag')) {
|
||||||
return self::URI . '/tag/' . rawurlencode($this->getInput('tag')) . '/' . rawurlencode($this->getInput('filter'));
|
return self::URI . '/tag/' . rawurlencode($this->getInput('tag')) . '/' . rawurlencode($this->getInput('filter'));
|
||||||
|
} else if ($this->getInput('user')) {
|
||||||
|
return self::URI . '/@' . rawurlencode($this->getInput('user'));
|
||||||
} else if ($this->getInput('community')) {
|
} else if ($this->getInput('community')) {
|
||||||
$uri = self::URI . '/community/' . rawurlencode($this->getInput('community'));
|
$uri = self::URI . '/community/' . rawurlencode($this->getInput('community'));
|
||||||
if ($this->getInput('filter') != 'hot') {
|
if ($this->getInput('filter') != 'hot') {
|
||||||
|
|
Loading…
Reference in a new issue