mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Misc/Fixup
* remove unnecessary tab components from ?unrated-comments page * fix urls generated by guides listview
This commit is contained in:
@@ -92,7 +92,7 @@ class GuideList extends BaseType
|
|||||||
'description' => $this->getField('description'),
|
'description' => $this->getField('description'),
|
||||||
'sticky' => !!($this->getField('cuFlags') & CC_FLAG_STICKY),
|
'sticky' => !!($this->getField('cuFlags') & CC_FLAG_STICKY),
|
||||||
'nvotes' => $this->getField('nvotes'),
|
'nvotes' => $this->getField('nvotes'),
|
||||||
'url' => '/?guide=' . ($this->getField('url') ?: $this->id),
|
'url' => '?guide=' . ($this->getField('url') ?: $this->id),
|
||||||
'status' => $this->getField('status'),
|
'status' => $this->getField('status'),
|
||||||
'author' => $this->getField('author'),
|
'author' => $this->getField('author'),
|
||||||
'authorroles' => $this->getField('roles'),
|
'authorroles' => $this->getField('roles'),
|
||||||
@@ -103,8 +103,6 @@ class GuideList extends BaseType
|
|||||||
'date' => $this->getField('date'), // ok
|
'date' => $this->getField('date'), // ok
|
||||||
'when' => date(Util::$dateFormatInternal, $this->getField('date'))
|
'when' => date(Util::$dateFormatInternal, $this->getField('date'))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
|||||||
@@ -162,22 +162,8 @@ class UtilityPage extends GenericPage
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 'unrated-comments':
|
case 'unrated-comments':
|
||||||
if ($_ = CommunityContent::getCommentPreviews(['unrated' => true], $nFound))
|
if ($_ = CommunityContent::getCommentPreviews(['unrated' => true]))
|
||||||
{
|
$this->lvTabs[] = ['commentpreview', ['data' => $_]];
|
||||||
$tabData = array(
|
|
||||||
'data' => $_,
|
|
||||||
'onBeforeCreate' => '$Listview.funcBox.beforeUserComments',
|
|
||||||
'_totalCount' => $nFound
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($nFound > CFG_SQL_LIMIT_DEFAULT)
|
|
||||||
{
|
|
||||||
$tabData['name'] = '$LANG.tab_latestcomments';
|
|
||||||
$tabData['note'] = '$$WH.sprintf(LANG.lvnote_usercomments, '.$nFound.')';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->lvTabs[] = ['commentpreview', $tabData];
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->lvTabs[] = ['commentpreview', ['data' => []]];
|
$this->lvTabs[] = ['commentpreview', ['data' => []]];
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user