Ejemplo n.º 1
0
 function getAvailableContentStatuses($pUserMinimum = -100, $pUserMaximum = 100)
 {
     global $gBitSystem;
     if ($gBitSystem->isFeatureActive('nlpg_moderation')) {
         return LibertyContent::getAvailableContentStatuses(-100, 0);
     }
     return parent::getAvailableContentStatuses();
 }
Ejemplo n.º 2
0
}
// get_content_list_inc doesn't use $_REQUEST parameters as it might not be the only list in the page that needs sorting and limiting
if (empty($contentListHash)) {
    $contentListHash = array('content_type_guid' => $contentSelect = empty($_REQUEST['content_type_guid']) ? NULL : $contentTypeGuids, 'offset' => !empty($offset_content) ? $offset_content : NULL, 'max_records' => !empty($max_content) ? $max_content : (!empty($_REQUEST['max_records']) ? $_REQUEST['max_records'] : 100), 'sort_mode' => !empty($content_sort_mode) ? $content_sort_mode : 'title_asc', 'find' => !empty($_REQUEST["find"]) ? $_REQUEST["find"] : NULL, 'page' => !empty($_REQUEST["list_page"]) ? $_REQUEST["list_page"] : NULL, 'user_id' => @BitBase::verifyId($_REQUEST['user_id']) ? $_REQUEST['user_id'] : NULL, 'from_date' => !empty($_REQUEST["from_date"]) ? $_REQUEST["from_date"] : NULL, 'until_date' => !empty($_REQUEST["until_date"]) ? $_REQUEST["until_date"] : NULL, 'thumbnail_size' => !empty($_REQUEST["thumbnail_size"]) ? $_REQUEST["thumbnail_size"] : NULL);
    if (!empty($_REQUEST['output']) && ($_REQUEST['output'] == 'json' || $_REQUEST['output'] == 'ajax')) {
        foreach ($_REQUEST as $key => $value) {
            if (!is_array($value)) {
                if (strstr($value, ',')) {
                    $_REQUEST[$key] = explode(",", $value);
                }
            }
        }
    }
    $contentListHash = array_merge($_REQUEST, $contentListHash);
}
// Finally we're ready to get some content
$contentList = $gContent->getContentList($contentListHash);
if (empty($contentTypes)) {
    $contentTypes = array('' => tra('All Content'));
    foreach ($gLibertySystem->mContentTypes as $cType) {
        $contentTypes[$cType['content_type_guid']] = $gLibertySystem->getContentTypeName($cType['content_type_guid'], TRUE);
    }
    asort($contentTypes);
}
global $gBitSystem, $gBitUser;
if ($gBitSystem->isFeatureActive('liberty_display_status') && $gBitUser->hasPermission('p_liberty_view_all_status')) {
    $contentStatuses = $gContent->getAvailableContentStatuses();
    $contentStatuses[''] = 'All Statuses';
    $contentStatuses['not_available'] = 'All but Available';
    $gBitSmarty->assign('content_statuses', $contentStatuses);
}