Commit aa2de74f authored by Steven Wittens's avatar Steven Wittens
Browse files

- #27624, #27614, #27627: dead code

parent 452f236f
...@@ -450,7 +450,6 @@ function bootstrap_invoke_all($op) { ...@@ -450,7 +450,6 @@ function bootstrap_invoke_all($op) {
* TRUE if the item is loaded or has already been loaded. * TRUE if the item is loaded or has already been loaded.
*/ */
function drupal_load($type, $name) { function drupal_load($type, $name) {
// print $name. '<br />';
static $files = array(); static $files = array();
if (isset($files[$type][$name])) { if (isset($files[$type][$name])) {
......
...@@ -1676,7 +1676,6 @@ function _comment_update_node_statistics($nid) { ...@@ -1676,7 +1676,6 @@ function _comment_update_node_statistics($nid) {
// comments exist // comments exist
if ($count > 0) { if ($count > 0) {
$node = node_load($nid);
$last_reply = db_fetch_object(db_query_range('SELECT cid, name, timestamp, uid FROM {comments} WHERE nid = %d AND status = %d ORDER BY cid DESC', $nid, COMMENT_PUBLISHED, 0, 1)); $last_reply = db_fetch_object(db_query_range('SELECT cid, name, timestamp, uid FROM {comments} WHERE nid = %d AND status = %d ORDER BY cid DESC', $nid, COMMENT_PUBLISHED, 0, 1));
db_query("UPDATE {node_comment_statistics} SET comment_count = %d, last_comment_timestamp = %d, last_comment_name = '%s', last_comment_uid = %d WHERE nid = %d", $count, $last_reply->timestamp, $last_reply->uid ? NULL : $last_reply->name, $last_reply->uid, $nid); db_query("UPDATE {node_comment_statistics} SET comment_count = %d, last_comment_timestamp = %d, last_comment_name = '%s', last_comment_uid = %d WHERE nid = %d", $count, $last_reply->timestamp, $last_reply->uid ? NULL : $last_reply->name, $last_reply->uid, $nid);
} }
......
...@@ -1676,7 +1676,6 @@ function _comment_update_node_statistics($nid) { ...@@ -1676,7 +1676,6 @@ function _comment_update_node_statistics($nid) {
// comments exist // comments exist
if ($count > 0) { if ($count > 0) {
$node = node_load($nid);
$last_reply = db_fetch_object(db_query_range('SELECT cid, name, timestamp, uid FROM {comments} WHERE nid = %d AND status = %d ORDER BY cid DESC', $nid, COMMENT_PUBLISHED, 0, 1)); $last_reply = db_fetch_object(db_query_range('SELECT cid, name, timestamp, uid FROM {comments} WHERE nid = %d AND status = %d ORDER BY cid DESC', $nid, COMMENT_PUBLISHED, 0, 1));
db_query("UPDATE {node_comment_statistics} SET comment_count = %d, last_comment_timestamp = %d, last_comment_name = '%s', last_comment_uid = %d WHERE nid = %d", $count, $last_reply->timestamp, $last_reply->uid ? NULL : $last_reply->name, $last_reply->uid, $nid); db_query("UPDATE {node_comment_statistics} SET comment_count = %d, last_comment_timestamp = %d, last_comment_name = '%s', last_comment_uid = %d WHERE nid = %d", $count, $last_reply->timestamp, $last_reply->uid ? NULL : $last_reply->name, $last_reply->uid, $nid);
} }
......
...@@ -648,9 +648,6 @@ function search_form($action = '', $keys = '', $type = null, $prompt = null) { ...@@ -648,9 +648,6 @@ function search_form($action = '', $keys = '', $type = null, $prompt = null) {
if (!$action) { if (!$action) {
$action = url('search/'. $type); $action = url('search/'. $type);
} }
if (!$type) {
$type = 'node';
}
if (is_null($prompt)) { if (is_null($prompt)) {
$prompt = t('Enter your keywords'); $prompt = t('Enter your keywords');
} }
......
...@@ -648,9 +648,6 @@ function search_form($action = '', $keys = '', $type = null, $prompt = null) { ...@@ -648,9 +648,6 @@ function search_form($action = '', $keys = '', $type = null, $prompt = null) {
if (!$action) { if (!$action) {
$action = url('search/'. $type); $action = url('search/'. $type);
} }
if (!$type) {
$type = 'node';
}
if (is_null($prompt)) { if (is_null($prompt)) {
$prompt = t('Enter your keywords'); $prompt = t('Enter your keywords');
} }
......
Supports Markdown
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