summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-10-24 09:15:04 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-10-24 09:15:04 +0000
commitc5fb69fb08fa443397a3bb7ea245eb31f79891aa (patch)
tree8e2ae7e6f25e77fcd393a8a40e0a421932e8e9f9
parentbb9bae4d979bf04f9e99c2a2ea36e6961464defe (diff)
downloadbrdo-c5fb69fb08fa443397a3bb7ea245eb31f79891aa.tar.gz
brdo-c5fb69fb08fa443397a3bb7ea245eb31f79891aa.tar.bz2
#156144 by lyricnz: do not show 'select all' checbox when there are no rows in the node admin table
-rw-r--r--modules/node/node.admin.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/node/node.admin.inc b/modules/node/node.admin.inc
index a533ee0e8..3edb61208 100644
--- a/modules/node/node.admin.inc
+++ b/modules/node/node.admin.inc
@@ -406,8 +406,11 @@ function node_admin_nodes() {
* Theme node administration overview.
*/
function theme_node_admin_nodes($form) {
- // Overview table:
- $header = array(theme('table_select_header_cell'), t('Title'), t('Type'), t('Author'), t('Status'));
+ // If there are rows in this form, then $form['title'] contains a list of
+ // the title form elements.
+ $has_posts = isset($form['title']) && is_array($form['title']);
+ $select_header = $has_posts ? theme('table_select_header_cell') : '';
+ $header = array($select_header, t('Title'), t('Type'), t('Author'), t('Status'));
if (isset($form['language'])) {
$header[] = t('Language');
}
@@ -415,7 +418,7 @@ function theme_node_admin_nodes($form) {
$output = '';
$output .= drupal_render($form['options']);
- if (isset($form['title']) && is_array($form['title'])) {
+ if ($has_posts) {
foreach (element_children($form['title']) as $key) {
$row = array();
$row[] = drupal_render($form['nodes'][$key]);