Commit 6d68dd8c authored by Dries's avatar Dries

- Patch #337947 by codycraven, cwgordon7, axyjo, Jacine, grndlvl, seutje,...

- 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.
parent 76103579
......@@ -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;
}
......@@ -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;
......
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment