summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-02-13 21:19:16 +0000
committerDries Buytaert <dries@buytaert.net>2010-02-13 21:19:16 +0000
commit6d68dd8c2ab654adfa885e859c73633905904071 (patch)
tree50f61e6be98f78da09dab608b6e65270095d2a56
parent7610357974572da9fcff5a213527b6fbaa811b9e (diff)
downloadbrdo-6d68dd8c2ab654adfa885e859c73633905904071.tar.gz
brdo-6d68dd8c2ab654adfa885e859c73633905904071.tar.bz2
- Patch #337947 by codycraven, cwgordon7, axyjo, Jacine, grndlvl, seutje, ksenzee, Jaza, chx, sun, JacobSingh, yoroy, peximo: fixed whitespace issue for 'recent content block' in dashboard.
-rw-r--r--modules/dashboard/dashboard.css6
-rw-r--r--modules/node/node.module10
-rw-r--r--modules/user/user.module4
3 files changed, 11 insertions, 9 deletions
diff --git a/modules/dashboard/dashboard.css b/modules/dashboard/dashboard.css
index 32f3fc0c7..8b26f0e62 100644
--- a/modules/dashboard/dashboard.css
+++ b/modules/dashboard/dashboard.css
@@ -153,8 +153,6 @@
#dashboard #block-node-recent tr {
border: none;
}
-
-#dashboard .list-all {
- text-align: right;
- margin: 0 10px 0 0;
+#dashboard #block-node-recent .content {
+ padding: 0;
}
diff --git a/modules/node/node.module b/modules/node/node.module
index 3c556914b..7e1c4272f 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2161,14 +2161,18 @@ function theme_node_recent_block($variables) {
foreach ($variables['nodes'] as $node) {
$row = array();
$row[] = theme('node_recent_content', array('node' => $node));
- $row[] = node_access('update', $node) ? l(t('edit'), 'node/' . $node->nid . '/edit', $l_options) : '';
- $row[] = node_access('delete', $node) ? l(t('delete'), 'node/' . $node->nid . '/delete', $l_options) : '';
+ if (node_access('update', $node)) {
+ $row[] = l(t('edit'), 'node/' . $node->nid . '/edit', $l_options);
+ }
+ if (node_access('delete', $node)) {
+ $row[] = l(t('delete'), 'node/' . $node->nid . '/delete', $l_options);
+ }
$rows[] = $row;
}
if ($rows) {
$output = theme('table', array('rows' => $rows));
- $output .= '<div class="list-all">' . l(t('Show all content'), 'admin/content') . '</div>';
+ $output .= '<div class="more-link">' . l(t('Show all content'), 'admin/content') . '</div>';
}
return $output;
diff --git a/modules/user/user.module b/modules/user/user.module
index 6f7f1c997..9417f57a8 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -809,8 +809,8 @@ function user_file_download($uri) {
*/
function user_file_references($file) {
// Determine if the file is used by this module.
- $count = db_query('SELECT COUNT(*) FROM {users} WHERE picture = :fid', array(':fid' => $file->fid))->fetchField();
- if ($count) {
+ $file_used = (bool) db_query_range('SELECT 1 FROM {users} WHERE picture = :fid', 0, 1, array(':fid' => $file->fid))->fetchField();
+ if ($file_used) {
// Return the name of the module and how many references it has to the file.
return array('user' => $count);
}