getPostTypes(); foreach ($post_types as $k => $v) { $type_combo[__($k)] = (string) $k; } $type = !empty($_POST['type']) ? $_POST['type'] : null; if (!$type && $q) { // Cope with search form $type = !empty($_GET['type']) ? $_GET['type'] : null; } if (!in_array($type, $type_combo)) { $type = null; } $params = array(); $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); $params['no_content'] = true; $params['order'] = 'post_dt DESC'; if ($q) { $params['search'] = $q; } if ($type) { $params['post_type'] = $type; } dcPage::openPopup(__('Add a link to an entry'), dcPage::jsLoad('js/_posts_list.js'). dcPage::jsLoad('js/jsToolBar/popup_posts.js')); echo '