Commit c6b1eaa2 authored by Dries's avatar Dries

- Patch #9775 by TDobes: consistency operation.  Changed to "edit foo," "delete foo," and "view foo" links into simply "edit," "delete," and "view".
parent 54d45d6e
...@@ -691,7 +691,7 @@ function aggregator_view() { ...@@ -691,7 +691,7 @@ function aggregator_view() {
$header = array(t('title'), t('items'), t('last update'), t('next update'), array('data' => t('operations'), 'colspan' => 3)); $header = array(t('title'), t('items'), t('last update'), t('next update'), array('data' => t('operations'), 'colspan' => 3));
$rows = array(); $rows = array();
while ($feed = db_fetch_object($result)) { while ($feed = db_fetch_object($result)) {
$rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '%count items'), ($feed->checked ? t('%time ago', array('%time' => format_interval(time() - $feed->checked))) : t('never')), ($feed->checked ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - time()))) : t('never')), l(t('edit feed'), "admin/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/aggregator/remove/$feed->fid"), l(t('update items'), "admin/aggregator/update/$feed->fid")); $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '%count items'), ($feed->checked ? t('%time ago', array('%time' => format_interval(time() - $feed->checked))) : t('never')), ($feed->checked ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - time()))) : t('never')), l(t('edit'), "admin/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/aggregator/remove/$feed->fid"), l(t('update items'), "admin/aggregator/update/$feed->fid"));
} }
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
...@@ -702,7 +702,7 @@ function aggregator_view() { ...@@ -702,7 +702,7 @@ function aggregator_view() {
$header = array(t('title'), t('items'), t('operations')); $header = array(t('title'), t('items'), t('operations'));
$rows = array(); $rows = array();
while ($category = db_fetch_object($result)) { while ($category = db_fetch_object($result)) {
$rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '%count items'), l(t('edit category'), "admin/aggregator/edit/category/$category->cid")); $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '%count items'), l(t('edit'), "admin/aggregator/edit/category/$category->cid"));
} }
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
......
...@@ -691,7 +691,7 @@ function aggregator_view() { ...@@ -691,7 +691,7 @@ function aggregator_view() {
$header = array(t('title'), t('items'), t('last update'), t('next update'), array('data' => t('operations'), 'colspan' => 3)); $header = array(t('title'), t('items'), t('last update'), t('next update'), array('data' => t('operations'), 'colspan' => 3));
$rows = array(); $rows = array();
while ($feed = db_fetch_object($result)) { while ($feed = db_fetch_object($result)) {
$rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '%count items'), ($feed->checked ? t('%time ago', array('%time' => format_interval(time() - $feed->checked))) : t('never')), ($feed->checked ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - time()))) : t('never')), l(t('edit feed'), "admin/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/aggregator/remove/$feed->fid"), l(t('update items'), "admin/aggregator/update/$feed->fid")); $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '%count items'), ($feed->checked ? t('%time ago', array('%time' => format_interval(time() - $feed->checked))) : t('never')), ($feed->checked ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - time()))) : t('never')), l(t('edit'), "admin/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/aggregator/remove/$feed->fid"), l(t('update items'), "admin/aggregator/update/$feed->fid"));
} }
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
...@@ -702,7 +702,7 @@ function aggregator_view() { ...@@ -702,7 +702,7 @@ function aggregator_view() {
$header = array(t('title'), t('items'), t('operations')); $header = array(t('title'), t('items'), t('operations'));
$rows = array(); $rows = array();
while ($category = db_fetch_object($result)) { while ($category = db_fetch_object($result)) {
$rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '%count items'), l(t('edit category'), "admin/aggregator/edit/category/$category->cid")); $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '%count items'), l(t('edit'), "admin/aggregator/edit/category/$category->cid"));
} }
$output .= theme('table', $header, $rows); $output .= theme('table', $header, $rows);
......
...@@ -183,8 +183,8 @@ function block_admin_display() { ...@@ -183,8 +183,8 @@ function block_admin_display() {
foreach ($blocks as $block) { foreach ($blocks as $block) {
if ($block['module'] == 'block') { if ($block['module'] == 'block') {
$edit = l(t('edit block'), 'admin/block/edit/'. $block['delta']); $edit = l(t('edit'), 'admin/block/edit/'. $block['delta']);
$delete = l(t('delete block'), 'admin/block/delete/'. $block['delta']); $delete = l(t('delete'), 'admin/block/delete/'. $block['delta']);
} }
else { else {
$edit = ''; $edit = '';
......
...@@ -183,8 +183,8 @@ function block_admin_display() { ...@@ -183,8 +183,8 @@ function block_admin_display() {
foreach ($blocks as $block) { foreach ($blocks as $block) {
if ($block['module'] == 'block') { if ($block['module'] == 'block') {
$edit = l(t('edit block'), 'admin/block/edit/'. $block['delta']); $edit = l(t('edit'), 'admin/block/edit/'. $block['delta']);
$delete = l(t('delete block'), 'admin/block/delete/'. $block['delta']); $delete = l(t('delete'), 'admin/block/delete/'. $block['delta']);
} }
else { else {
$edit = ''; $edit = '';
......
...@@ -143,7 +143,7 @@ function blogapi_new_post($req_params) { ...@@ -143,7 +143,7 @@ function blogapi_new_post($req_params) {
$nid = node_save($node); $nid = node_save($node);
if ($nid) { if ($nid) {
watchdog('special', t('%node-type: added "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/$nid")); watchdog('special', t('%node-type: added "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$nid"));
return new xmlrpcresp(new xmlrpcval($nid, 'string')); return new xmlrpcresp(new xmlrpcval($nid, 'string'));
} }
...@@ -203,7 +203,7 @@ function blogapi_edit_post($req_params) { ...@@ -203,7 +203,7 @@ function blogapi_edit_post($req_params) {
} }
$nid = node_save($node); $nid = node_save($node);
if ($nid) { if ($nid) {
watchdog('special', t('%node-type: updated "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/$nid")); watchdog('special', t('%node-type: updated "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$nid"));
return new xmlrpcresp(new xmlrpcval(true, 'boolean')); return new xmlrpcresp(new xmlrpcval(true, 'boolean'));
} }
......
...@@ -143,7 +143,7 @@ function blogapi_new_post($req_params) { ...@@ -143,7 +143,7 @@ function blogapi_new_post($req_params) {
$nid = node_save($node); $nid = node_save($node);
if ($nid) { if ($nid) {
watchdog('special', t('%node-type: added "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/$nid")); watchdog('special', t('%node-type: added "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$nid"));
return new xmlrpcresp(new xmlrpcval($nid, 'string')); return new xmlrpcresp(new xmlrpcval($nid, 'string'));
} }
...@@ -203,7 +203,7 @@ function blogapi_edit_post($req_params) { ...@@ -203,7 +203,7 @@ function blogapi_edit_post($req_params) {
} }
$nid = node_save($node); $nid = node_save($node);
if ($nid) { if ($nid) {
watchdog('special', t('%node-type: updated "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/$nid")); watchdog('special', t('%node-type: updated "%node-title" using blog API', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$nid"));
return new xmlrpcresp(new xmlrpcval(true, 'boolean')); return new xmlrpcresp(new xmlrpcval(true, 'boolean'));
} }
......
...@@ -58,9 +58,6 @@ function book_link($type, $node = 0, $main = 0) { ...@@ -58,9 +58,6 @@ function book_link($type, $node = 0, $main = 0) {
} }
if ($type == 'node' && $node->type == 'book') { if ($type == 'node' && $node->type == 'book') {
if (book_access('update', $node)) {
$links[] = l(t('edit this page'), 'node/'. $node->nid .'/edit', array('title' => t('Suggest an update for this book page.')));
}
if (!$main) { if (!$main) {
$links[] = l(t('printer-friendly version'), 'book/print/'. $node->nid, array('title' => t('Show a printer-friendly version of this book page and its sub-pages.'))); $links[] = l(t('printer-friendly version'), 'book/print/'. $node->nid, array('title' => t('Show a printer-friendly version of this book page and its sub-pages.')));
} }
...@@ -690,7 +687,7 @@ function book_print_recurse($parent = '', $depth = 1) { ...@@ -690,7 +687,7 @@ function book_print_recurse($parent = '', $depth = 1) {
} }
function book_admin_view_line($node, $depth = 0) { function book_admin_view_line($node, $depth = 0) {
return array('<div style="padding-left: '. (25 * $depth) .'px;">'. form_textfield(NULL, $node->nid .'][title', $node->title, 64, 255) .'</div>', form_weight(NULL, $node->nid .'][weight', $node->weight), l(t('view node'), 'node/'. $node->nid), l(t('edit node'), 'node/'. $node->nid .'/edit'), l(t('delete node'), 'admin/node/delete/'. $node->nid)); return array('<div style="padding-left: '. (25 * $depth) .'px;">'. form_textfield(NULL, $node->nid .'][title', $node->title, 64, 255) .'</div>', form_weight(NULL, $node->nid .'][weight', $node->weight), l(t('view'), 'node/'. $node->nid), l(t('edit'), 'node/'. $node->nid .'/edit'), l(t('delete'), 'admin/node/delete/'. $node->nid));
} }
function book_admin_view_book($nid, $depth = 1) { function book_admin_view_book($nid, $depth = 1) {
......
...@@ -58,9 +58,6 @@ function book_link($type, $node = 0, $main = 0) { ...@@ -58,9 +58,6 @@ function book_link($type, $node = 0, $main = 0) {
} }
if ($type == 'node' && $node->type == 'book') { if ($type == 'node' && $node->type == 'book') {
if (book_access('update', $node)) {
$links[] = l(t('edit this page'), 'node/'. $node->nid .'/edit', array('title' => t('Suggest an update for this book page.')));
}
if (!$main) { if (!$main) {
$links[] = l(t('printer-friendly version'), 'book/print/'. $node->nid, array('title' => t('Show a printer-friendly version of this book page and its sub-pages.'))); $links[] = l(t('printer-friendly version'), 'book/print/'. $node->nid, array('title' => t('Show a printer-friendly version of this book page and its sub-pages.')));
} }
...@@ -690,7 +687,7 @@ function book_print_recurse($parent = '', $depth = 1) { ...@@ -690,7 +687,7 @@ function book_print_recurse($parent = '', $depth = 1) {
} }
function book_admin_view_line($node, $depth = 0) { function book_admin_view_line($node, $depth = 0) {
return array('<div style="padding-left: '. (25 * $depth) .'px;">'. form_textfield(NULL, $node->nid .'][title', $node->title, 64, 255) .'</div>', form_weight(NULL, $node->nid .'][weight', $node->weight), l(t('view node'), 'node/'. $node->nid), l(t('edit node'), 'node/'. $node->nid .'/edit'), l(t('delete node'), 'admin/node/delete/'. $node->nid)); return array('<div style="padding-left: '. (25 * $depth) .'px;">'. form_textfield(NULL, $node->nid .'][title', $node->title, 64, 255) .'</div>', form_weight(NULL, $node->nid .'][weight', $node->weight), l(t('view'), 'node/'. $node->nid), l(t('edit'), 'node/'. $node->nid .'/edit'), l(t('delete'), 'admin/node/delete/'. $node->nid));
} }
function book_admin_view_book($nid, $depth = 1) { function book_admin_view_book($nid, $depth = 1) {
......
...@@ -61,9 +61,9 @@ function comment_help($section = "admin/help#comment") { ...@@ -61,9 +61,9 @@ function comment_help($section = "admin/help#comment") {
<p>Finally, you may want to enter some <em>initial comment scores</em>. In <a href=\"%comment-initial\">administer &raquo; comments &raquo; configure &raquo; moderation roles</a> you can assign a beginning rating for all comments posted by a particular permission role. If you do not assign any initial scores, Drupal will assign a rating of <strong>0</strong> as the default.</p>", array('%comment-config' => url('admin/comment/configure'), '%user-permissions' => url('admin/user/configure/permission'), '%tracker' => url('tracker'), '%download-notify' => 'http://drupal.org/project/releases', '%comment-votes' => url('admin/comment/configure/votes'), '%comment-matrix' => url('admin/comment/configure/matrix'), '%comment-thresholds' => url('admin/comment/configure/thresholds'), '%slashdot' => ' http://slashdot.org', '%comment-initial' => url('admin/comment/configure/roles'))); <p>Finally, you may want to enter some <em>initial comment scores</em>. In <a href=\"%comment-initial\">administer &raquo; comments &raquo; configure &raquo; moderation roles</a> you can assign a beginning rating for all comments posted by a particular permission role. If you do not assign any initial scores, Drupal will assign a rating of <strong>0</strong> as the default.</p>", array('%comment-config' => url('admin/comment/configure'), '%user-permissions' => url('admin/user/configure/permission'), '%tracker' => url('tracker'), '%download-notify' => 'http://drupal.org/project/releases', '%comment-votes' => url('admin/comment/configure/votes'), '%comment-matrix' => url('admin/comment/configure/matrix'), '%comment-thresholds' => url('admin/comment/configure/thresholds'), '%slashdot' => ' http://slashdot.org', '%comment-initial' => url('admin/comment/configure/roles')));
case 'admin/comment': case 'admin/comment':
case 'admin/comment/new': case 'admin/comment/new':
return t("Below is a list of the latest comments posted your site. Click on a subject to see the comment, the author's name to edit the author's user information , \"edit comment\" to modify the text, and \"delete comment\" to remove their submission."); return t("Below is a list of the latest comments posted your site. Click on a subject to see the comment, the author's name to edit the author's user information , \"edit\" to modify the text, and \"delete\" to remove their submission.");
case 'admin/comment/approval': case 'admin/comment/approval':
return t("Below is a list of the comments posted to your site that need approval. To approve a comment, click on \"edit comment\" and then change its \"moderation status\" to Approved. Click on a subject to see the comment, the author's name to edit the author's user information, \"edit comment\" to modify the text, and \"delete comment\" to remove their submission."); return t("Below is a list of the comments posted to your site that need approval. To approve a comment, click on \"edit\" and then change its \"moderation status\" to Approved. Click on a subject to see the comment, the author's name to edit the author's user information, \"edit\" to modify the text, and \"delete\" to remove their submission.");
case 'admin/comment/configure': case 'admin/comment/configure':
case 'admin/comment/configure/settings': case 'admin/comment/configure/settings':
return t("Comments can be attached to any node, and their settings are below. The display comes in two types: a \"flat list\" where everything is flush to the left side, and comments come in chronological order, and a \"threaded list\" where replies to other comments are placed immediately below and slightly indented, forming an outline. They also come in two styles: \"expanded\", where you see both the title and the contents, and \"collapsed\" where you only see the title. Preview comment forces a user to look at their comment by clicking on a \"Preview\" button before they can actually add the comment."); return t("Comments can be attached to any node, and their settings are below. The display comes in two types: a \"flat list\" where everything is flush to the left side, and comments come in chronological order, and a \"threaded list\" where replies to other comments are placed immediately below and slightly indented, forming an outline. They also come in two styles: \"expanded\", where you see both the title and the contents, and \"collapsed\" where you only see the title. Preview comment forces a user to look at their comment by clicking on a \"Preview\" button before they can actually add the comment.");
...@@ -268,7 +268,7 @@ function comment_node_link($node) { ...@@ -268,7 +268,7 @@ function comment_node_link($node) {
while ($comment = db_fetch_object($result)) { while ($comment = db_fetch_object($result)) {
$comment->name = $comment->registered_name ? $comment->registered_name : $comment->name; $comment->name = $comment->registered_name ? $comment->registered_name : $comment->name;
$rows[] = array(l($comment->subject, "node/$node->nid", NULL, NULL, "comment-$comment->cid"), format_name($comment), l(t('view comment'), "node/$node->nid", NULL, NULL, $comment->cid), l(t('edit comment'), "admin/comment/edit/$comment->cid"), l(t('delete comment'), "admin/comment/delete/$comment->cid")); $rows[] = array(l($comment->subject, "node/$node->nid", NULL, NULL, "comment-$comment->cid"), format_name($comment), l(t('view'), "node/$node->nid", NULL, NULL, $comment->cid), l(t('edit'), "admin/comment/edit/$comment->cid"), l(t('delete'), "admin/comment/delete/$comment->cid"));
} }
if ($rows) { if ($rows) {
...@@ -555,7 +555,7 @@ function comment_post($edit) { ...@@ -555,7 +555,7 @@ function comment_post($edit) {
module_invoke_all('comment', 'update', $edit); module_invoke_all('comment', 'update', $edit);
// Add entry to the watchdog log. // Add entry to the watchdog log.
watchdog('special', t('comment: updated "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view comment'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid'])); watchdog('special', t('comment: updated "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
} }
else { else {
// Add the comment to database. // Add the comment to database.
...@@ -664,7 +664,7 @@ function comment_post($edit) { ...@@ -664,7 +664,7 @@ function comment_post($edit) {
module_invoke_all('comment', 'insert', $edit); module_invoke_all('comment', 'insert', $edit);
// Add an entry to the watchdog log. // Add an entry to the watchdog log.
watchdog('special', t('comment: added "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view comment'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid'])); watchdog('special', t('comment: added "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
} }
// Clear the cache so an anonymous user can see his comment being added. // Clear the cache so an anonymous user can see his comment being added.
...@@ -701,15 +701,15 @@ function comment_links($comment, $return = 1) { ...@@ -701,15 +701,15 @@ function comment_links($comment, $return = 1) {
if (node_comment_mode($comment->nid) == 2) { if (node_comment_mode($comment->nid) == 2) {
if (user_access('administer comments') && user_access('access administration pages')) { if (user_access('administer comments') && user_access('access administration pages')) {
$links[] = l(t('delete comment'), "admin/comment/delete/$comment->cid"); $links[] = l(t('delete'), "admin/comment/delete/$comment->cid");
$links[] = l(t('edit comment'), "admin/comment/edit/$comment->cid"); $links[] = l(t('edit'), "admin/comment/edit/$comment->cid");
$links[] = l(t('reply to this comment'), "comment/reply/$comment->nid/$comment->cid"); $links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");
} }
else if (user_access('post comments')) { else if (user_access('post comments')) {
if (comment_access('edit', $comment)) { if (comment_access('edit', $comment)) {
$links[] = l(t('edit your comment'), "comment/edit/$comment->cid"); $links[] = l(t('edit'), "comment/edit/$comment->cid");
} }
$links[] = l(t('reply to this comment'), "comment/reply/$comment->nid/$comment->cid"); $links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");
} }
else { else {
$links[] = theme('comment_post_forbidden'); $links[] = theme('comment_post_forbidden');
...@@ -1028,8 +1028,8 @@ function comment_admin_overview($type = 'new') { ...@@ -1028,8 +1028,8 @@ function comment_admin_overview($type = 'new') {
format_name($comment), format_name($comment),
($comment->status == 0 ? t('published') : t('not published')), ($comment->status == 0 ? t('published') : t('not published')),
format_date($comment->timestamp, 'small'), format_date($comment->timestamp, 'small'),
l(t('edit comment'), "admin/comment/edit/$comment->cid"), l(t('edit'), "admin/comment/edit/$comment->cid"),
l(t('delete comment'), "admin/comment/delete/$comment->cid") l(t('delete'), "admin/comment/delete/$comment->cid")
); );
} }
......
...@@ -61,9 +61,9 @@ function comment_help($section = "admin/help#comment") { ...@@ -61,9 +61,9 @@ function comment_help($section = "admin/help#comment") {
<p>Finally, you may want to enter some <em>initial comment scores</em>. In <a href=\"%comment-initial\">administer &raquo; comments &raquo; configure &raquo; moderation roles</a> you can assign a beginning rating for all comments posted by a particular permission role. If you do not assign any initial scores, Drupal will assign a rating of <strong>0</strong> as the default.</p>", array('%comment-config' => url('admin/comment/configure'), '%user-permissions' => url('admin/user/configure/permission'), '%tracker' => url('tracker'), '%download-notify' => 'http://drupal.org/project/releases', '%comment-votes' => url('admin/comment/configure/votes'), '%comment-matrix' => url('admin/comment/configure/matrix'), '%comment-thresholds' => url('admin/comment/configure/thresholds'), '%slashdot' => ' http://slashdot.org', '%comment-initial' => url('admin/comment/configure/roles'))); <p>Finally, you may want to enter some <em>initial comment scores</em>. In <a href=\"%comment-initial\">administer &raquo; comments &raquo; configure &raquo; moderation roles</a> you can assign a beginning rating for all comments posted by a particular permission role. If you do not assign any initial scores, Drupal will assign a rating of <strong>0</strong> as the default.</p>", array('%comment-config' => url('admin/comment/configure'), '%user-permissions' => url('admin/user/configure/permission'), '%tracker' => url('tracker'), '%download-notify' => 'http://drupal.org/project/releases', '%comment-votes' => url('admin/comment/configure/votes'), '%comment-matrix' => url('admin/comment/configure/matrix'), '%comment-thresholds' => url('admin/comment/configure/thresholds'), '%slashdot' => ' http://slashdot.org', '%comment-initial' => url('admin/comment/configure/roles')));
case 'admin/comment': case 'admin/comment':
case 'admin/comment/new': case 'admin/comment/new':
return t("Below is a list of the latest comments posted your site. Click on a subject to see the comment, the author's name to edit the author's user information , \"edit comment\" to modify the text, and \"delete comment\" to remove their submission."); return t("Below is a list of the latest comments posted your site. Click on a subject to see the comment, the author's name to edit the author's user information , \"edit\" to modify the text, and \"delete\" to remove their submission.");
case 'admin/comment/approval': case 'admin/comment/approval':
return t("Below is a list of the comments posted to your site that need approval. To approve a comment, click on \"edit comment\" and then change its \"moderation status\" to Approved. Click on a subject to see the comment, the author's name to edit the author's user information, \"edit comment\" to modify the text, and \"delete comment\" to remove their submission."); return t("Below is a list of the comments posted to your site that need approval. To approve a comment, click on \"edit\" and then change its \"moderation status\" to Approved. Click on a subject to see the comment, the author's name to edit the author's user information, \"edit\" to modify the text, and \"delete\" to remove their submission.");
case 'admin/comment/configure': case 'admin/comment/configure':
case 'admin/comment/configure/settings': case 'admin/comment/configure/settings':
return t("Comments can be attached to any node, and their settings are below. The display comes in two types: a \"flat list\" where everything is flush to the left side, and comments come in chronological order, and a \"threaded list\" where replies to other comments are placed immediately below and slightly indented, forming an outline. They also come in two styles: \"expanded\", where you see both the title and the contents, and \"collapsed\" where you only see the title. Preview comment forces a user to look at their comment by clicking on a \"Preview\" button before they can actually add the comment."); return t("Comments can be attached to any node, and their settings are below. The display comes in two types: a \"flat list\" where everything is flush to the left side, and comments come in chronological order, and a \"threaded list\" where replies to other comments are placed immediately below and slightly indented, forming an outline. They also come in two styles: \"expanded\", where you see both the title and the contents, and \"collapsed\" where you only see the title. Preview comment forces a user to look at their comment by clicking on a \"Preview\" button before they can actually add the comment.");
...@@ -268,7 +268,7 @@ function comment_node_link($node) { ...@@ -268,7 +268,7 @@ function comment_node_link($node) {
while ($comment = db_fetch_object($result)) { while ($comment = db_fetch_object($result)) {
$comment->name = $comment->registered_name ? $comment->registered_name : $comment->name; $comment->name = $comment->registered_name ? $comment->registered_name : $comment->name;
$rows[] = array(l($comment->subject, "node/$node->nid", NULL, NULL, "comment-$comment->cid"), format_name($comment), l(t('view comment'), "node/$node->nid", NULL, NULL, $comment->cid), l(t('edit comment'), "admin/comment/edit/$comment->cid"), l(t('delete comment'), "admin/comment/delete/$comment->cid")); $rows[] = array(l($comment->subject, "node/$node->nid", NULL, NULL, "comment-$comment->cid"), format_name($comment), l(t('view'), "node/$node->nid", NULL, NULL, $comment->cid), l(t('edit'), "admin/comment/edit/$comment->cid"), l(t('delete'), "admin/comment/delete/$comment->cid"));
} }
if ($rows) { if ($rows) {
...@@ -555,7 +555,7 @@ function comment_post($edit) { ...@@ -555,7 +555,7 @@ function comment_post($edit) {
module_invoke_all('comment', 'update', $edit); module_invoke_all('comment', 'update', $edit);
// Add entry to the watchdog log. // Add entry to the watchdog log.
watchdog('special', t('comment: updated "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view comment'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid'])); watchdog('special', t('comment: updated "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
} }
else { else {
// Add the comment to database. // Add the comment to database.
...@@ -664,7 +664,7 @@ function comment_post($edit) { ...@@ -664,7 +664,7 @@ function comment_post($edit) {
module_invoke_all('comment', 'insert', $edit); module_invoke_all('comment', 'insert', $edit);
// Add an entry to the watchdog log. // Add an entry to the watchdog log.
watchdog('special', t('comment: added "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view comment'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid'])); watchdog('special', t('comment: added "%comment-subject"', array('%comment-subject' => $edit['subject'])), l(t('view'), 'node/'. $edit['nid'], NULL, NULL, 'comment-'. $edit['cid']));
} }
// Clear the cache so an anonymous user can see his comment being added. // Clear the cache so an anonymous user can see his comment being added.
...@@ -701,15 +701,15 @@ function comment_links($comment, $return = 1) { ...@@ -701,15 +701,15 @@ function comment_links($comment, $return = 1) {
if (node_comment_mode($comment->nid) == 2) { if (node_comment_mode($comment->nid) == 2) {
if (user_access('administer comments') && user_access('access administration pages')) { if (user_access('administer comments') && user_access('access administration pages')) {
$links[] = l(t('delete comment'), "admin/comment/delete/$comment->cid"); $links[] = l(t('delete'), "admin/comment/delete/$comment->cid");
$links[] = l(t('edit comment'), "admin/comment/edit/$comment->cid"); $links[] = l(t('edit'), "admin/comment/edit/$comment->cid");
$links[] = l(t('reply to this comment'), "comment/reply/$comment->nid/$comment->cid"); $links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");
} }
else if (user_access('post comments')) { else if (user_access('post comments')) {
if (comment_access('edit', $comment)) { if (comment_access('edit', $comment)) {
$links[] = l(t('edit your comment'), "comment/edit/$comment->cid"); $links[] = l(t('edit'), "comment/edit/$comment->cid");
} }
$links[] = l(t('reply to this comment'), "comment/reply/$comment->nid/$comment->cid"); $links[] = l(t('reply'), "comment/reply/$comment->nid/$comment->cid");
} }
else { else {
$links[] = theme('comment_post_forbidden'); $links[] = theme('comment_post_forbidden');
...@@ -1028,8 +1028,8 @@ function comment_admin_overview($type = 'new') { ...@@ -1028,8 +1028,8 @@ function comment_admin_overview($type = 'new') {
format_name($comment), format_name($comment),
($comment->status == 0 ? t('published') : t('not published')), ($comment->status == 0 ? t('published') : t('not published')),
format_date($comment->timestamp, 'small'), format_date($comment->timestamp, 'small'),
l(t('edit comment'), "admin/comment/edit/$comment->cid"), l(t('edit'), "admin/comment/edit/$comment->cid"),
l(t('delete comment'), "admin/comment/delete/$comment->cid") l(t('delete'), "admin/comment/delete/$comment->cid")
); );
} }
......
...@@ -1339,7 +1339,7 @@ function node_submit($node) { ...@@ -1339,7 +1339,7 @@ function node_submit($node) {
// perform this operation: // perform this operation:
if (node_access('update', $node)) { if (node_access('update', $node)) {
$node->nid = node_save($node); $node->nid = node_save($node);
watchdog('special', t('%node-type: updated "%node-title"', array('%node-type' => t($node->type), '%node-title' => $node->title)), l(t('view post'), 'node/'. $node->nid)); watchdog('special', t('%node-type: updated "%node-title"', array('%node-type' => t($node->type), '%node-title' => $node->title)), l(t('view'), 'node/'. $node->nid));
$msg = t('the %name was updated.', array ('%name' => node_invoke($node, 'node_name'))); $msg = t('the %name was updated.', array ('%name' => node_invoke($node, 'node_name')));
} }
} }
...@@ -1348,7 +1348,7 @@ function node_submit($node) { ...@@ -1348,7 +1348,7 @@ function node_submit($node) {
// perform this operation: // perform this operation:
if (node_access('create', $node)) { if (node_access('create', $node)) {
$node->nid = node_save($node); $node->nid = node_save($node);
watchdog('special', t('%node-type: added "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/$node->nid")); watchdog('special', t('%node-type: added "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$node->nid"));
$msg = t('your %name was created.', array ('%name' => node_invoke($node, 'node_name'))); $msg = t('your %name was created.', array ('%name' => node_invoke($node, 'node_name')));
} }
} }
......
...@@ -1339,7 +1339,7 @@ function node_submit($node) { ...@@ -1339,7 +1339,7 @@ function node_submit($node) {
// perform this operation: // perform this operation:
if (node_access('update', $node)) { if (node_access('update', $node)) {
$node->nid = node_save($node); $node->nid = node_save($node);
watchdog('special', t('%node-type: updated "%node-title"', array('%node-type' => t($node->type), '%node-title' => $node->title)), l(t('view post'), 'node/'. $node->nid)); watchdog('special', t('%node-type: updated "%node-title"', array('%node-type' => t($node->type), '%node-title' => $node->title)), l(t('view'), 'node/'. $node->nid));
$msg = t('the %name was updated.', array ('%name' => node_invoke($node, 'node_name'))); $msg = t('the %name was updated.', array ('%name' => node_invoke($node, 'node_name')));
} }
} }
...@@ -1348,7 +1348,7 @@ function node_submit($node) { ...@@ -1348,7 +1348,7 @@ function node_submit($node) {
// perform this operation: // perform this operation:
if (node_access('create', $node)) { if (node_access('create', $node)) {
$node->nid = node_save($node); $node->nid = node_save($node);
watchdog('special', t('%node-type: added "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view post'), "node/$node->nid")); watchdog('special', t('%node-type: added "%node-title"', array('%node-type' => t("$node->type"), '%node-title' => $node->title)), l(t('view'), "node/$node->nid"));
$msg = t('your %name was created.', array ('%name' => node_invoke($node, 'node_name'))); $msg = t('your %name was created.', array ('%name' => node_invoke($node, 'node_name')));
} }
} }
......
...@@ -784,7 +784,7 @@ function user_login($edit = array(), $msg = '') { ...@@ -784,7 +784,7 @@ function user_login($edit = array(), $msg = '') {
$account = user_load(array('name' => "$name@$server")); $account = user_load(array('name' => "$name@$server"));
if (!$account->uid) { // Register this new user. if (!$account->uid) { // Register this new user.
$user = user_save('', array('name' => "$name@$server", 'pass' => user_password(), 'init' => "$name@$server", 'status' => 1, "authname_$module" => "$name@$server", 'roles' => array(_user_authenticated_id()))); $user = user_save('', array('name' => "$name@$server", 'pass' => user_password(), 'init' => "$name@$server", 'status' => 1, "authname_$module" => "$name@$server", 'roles' => array(_user_authenticated_id())));
watchdog('user', "new user: $name@$server ($module ID)", l(t('edit user'), "user/$user->uid/edit")); watchdog('user', "new user: $name@$server ($module ID)", l(t('edit'), "user/$user->uid/edit"));
break; break;
} }
} }
...@@ -949,7 +949,7 @@ function user_register($edit = array()) { ...@@ -949,7 +949,7 @@ function user_register($edit = array()) {
// TODO: Is this necessary? Won't session_write() replicate this? // TODO: Is this necessary? Won't session_write() replicate this?
unset($edit['session']); unset($edit['session']);
$account = user_save('', array('name' => $edit['name'], 'pass' => $pass, 'init' => $edit['mail'], 'mail' => $edit['mail'], 'roles' => array(_user_authenticated_id()), 'status' => (variable_get('user_register', 1) == 1 ? 1 : 0))); $account = user_save('', array('name' => $edit['name'], 'pass' => $pass, 'init' => $edit['mail'], 'mail' => $edit['mail'], 'roles' => array(_user_authenticated_id()), 'status' => (variable_get('user_register', 1) == 1 ? 1 : 0)));
watchdog('user', 'new user: "'. $edit['name'] .'" &lt;'. $edit['mail'] .'&gt;', l(t('edit user'), "user/$account->uid/edit")); watchdog('user', 'new user: "'. $edit['name'] .'" &lt;'. $edit['mail'] .'&gt;', l(t('edit'), "user/$account->uid/edit"));
$variables = array('%username' => $edit['name'], '%site' => variable_get('site_name', 'drupal'), '%password' => $pass, '%uri' => $base_url, '%uri_brief' => substr($base_url, strlen('http://')), '%mailto' => $edit['mail'], '%date' => format_date(time()), '%login_uri' => url('user/login', NULL, NULL, TRUE), '%edit_uri' => url('user/edit', NULL, NULL, TRUE)); $variables = array('%username' => $edit['name'], '%site' => variable_get('site_name', 'drupal'), '%password' => $pass, '%uri' => $base_url, '%uri_brief' => substr($base_url, strlen('http://')), '%mailto' => $edit['mail'], '%date' => format_date(time()), '%login_uri' => url('user/login', NULL, NULL, TRUE), '%edit_uri' => url('user/edit', NULL, NULL, TRUE));
...@@ -1323,12 +1323,12 @@ function user_admin_access($edit = array()) { ...@@ -1323,12 +1323,12 @@ function user_admin_access($edit = array()) {
$header = array(t('type'), t('mask'), t('operations')); $header = array(t('type'), t('mask'), t('operations'));
$result = db_query("SELECT * FROM {access} WHERE type = '%s' AND status = 1 ORDER BY mask", $type); $result = db_query("SELECT * FROM {access} WHERE type = '%s' AND status = 1 ORDER BY mask", $type);
while ($rule = db_fetch_object($result)) { while ($rule = db_fetch_object($result)) {
$rows[] = array(t('Allow'), $rule->mask, array('data' => l(t('delete rule'), "admin/user/configure/access/$type/$rule->aid"), 'align' => 'center')); $rows[] = array(t('Allow'), $rule->mask, array('data' => l(t('delete'), "admin/user/configure/access/$type/$rule->aid"), 'align' => 'center'));
} }
$result = db_query("SELECT * FROM {access} WHERE type = '%s' AND status = 0 ORDER BY mask", $type); $result = db_query("SELECT * FROM {access} WHERE type = '%s' AND status = 0 ORDER BY mask", $type);
while ($rule = db_fetch_object($result)) { while ($rule = db_fetch_object($result)) {
$rows[] = array(t('Deny'), $rule->mask, l(t('delete rule'), "admin/user/configure/access/$type/$rule->aid")); $rows[] = array(t('Deny'), $rule->mask, l(t('delete'), "admin/user/configure/access/$type/$rule->aid"));
} }
$options = array('1' => t('Allow'), '0' => t('Deny')); $options = array('1' => t('Allow'), '0' => t('Deny'));
...@@ -1459,7 +1459,7 @@ function user_admin_role($edit = array()) { ...@@ -1459,7 +1459,7 @@ function user_admin_role($edit = array()) {
$header = array(t('name'), t('operations')); $header = array(t('name'), t('operations'));
while ($role = db_fetch_object($result)) { while ($role = db_fetch_object($result)) {
if ($role->name != 'anonymous user' && $role->name != 'authenticated user') { if ($role->name != 'anonymous user' && $role->name != 'authenticated user') {
$rows[] = array($role->name, array('data' => l(t('edit role'), "admin/user/configure/role/$role->rid"), 'align' => 'center')); $rows[] = array($role->name, array('data' => l(t('edit'), "admin/user/configure/role/$role->rid"), 'align' => 'center'));
} }
else { else {
$rows[] = array($role->name, array('data' => '<span class="disabled">'. t('locked') .'</span>', 'align' => 'center')); $rows[] = array($role->name, array('data' => '<span class="disabled">'. t('locked') .'</span>', 'align' => 'center'));
...@@ -1496,7 +1496,7 @@ function user_admin_account() { ...@@ -1496,7 +1496,7 @@ function user_admin_account() {
$roles[] = $role->name; $roles[] = $role->name;
} }
$rows[] = array($account->uid, format_name($account), $status[$account->status], implode(',<br />', $roles), format_date($account->changed, 'small'), l(t('edit account'), "user/$account->uid/edit")); $rows[] = array($account->uid, format_name($account), $status[$account->status], implode(',<br />', $roles), format_date($account->changed, 'small'), l(t('edit'), "user/$account->uid/edit"));
} }
$pager = theme('pager', NULL, 50, 0, tablesort_pager()); $pager = theme('pager', NULL, 50, 0, tablesort_pager());
...@@ -1576,14 +1576,14 @@ function user_help($section) { ...@@ -1576,14 +1576,14 @@ function user_help($section) {
case 'admin/user/configure/access': case 'admin/user/configure/access':
return t('Access rules allow Drupal administrators to choose usernames and e-mail address that are prevented from using drupal. To enter the mask for e-mail addresses click on <a href="%e-mail">e-mail rules</a>, for the username mask click on <a href="%username">name rules</a>.', array('%e-mail' => url('admin/user/configure/access/mail'), '%username' => url('admin/user/configure/access/name'))); return t('Access rules allow Drupal administrators to choose usernames and e-mail address that are prevented from using drupal. To enter the mask for e-mail addresses click on <a href="%e-mail">e-mail rules</a>, for the username mask click on <a href="%username">name rules</a>.', array('%e-mail' => url('admin/user/configure/access/mail'), '%username' => url('admin/user/configure/access/name')));
case 'admin/user/configure/access/mail': case 'admin/user/configure/access/mail':
return t('Setup and test the e-mail access rules. The access function checks if you match a deny and not an allow. If you match <strong>only</strong> a deny then it is denied. Any other case, such as both a deny and an allow pattern matching, allows the pattern.<br />Notes: <ul><li>To delete a rule click on "delete rule".</li><li>The order of the rules does not matter.</li></ul>'); return t('Setup and test the e-mail access rules. The access function checks if you match a deny and not an allow. If you match <strong>only</strong> a deny then it is denied. Any other case, such as both a deny and an allow pattern matching, allows the pattern.');
case 'admin/user/configure/access/name': case 'admin/user/configure/access/name':
return t('Setup and test the username access rules. The access function checks if you match a deny and not an allow. If you do then it is denied. Any other case, such as a deny pattern and an allow pattern, allows the pattern.<br />Notes: <ul><li>To delete a rule click on "delete rule".</li><li>The order of the rules does not matter.</li></ul>'); return t('Setup and test the username access rules. The access function checks if you match a deny and not an allow. If you do then it is denied. Any other case, such as a deny pattern and an allow pattern, allows the pattern.');
case 'admin/user/configure/permission':