Commit 002fee7a authored by Gerhard Killesreiter's avatar Gerhard Killesreiter

#56105, remove title validation, already enforced by #required, patch by Moshe

parent ec945c28
......@@ -195,13 +195,6 @@ function blog_page_last() {
return $output;
}
/**
* Implementation of hook_validate().
*/
function blog_validate($node) {
node_validate_title($node);
}
/**
* Implementation of hook_form().
*/
......
......@@ -195,13 +195,6 @@ function blog_page_last() {
return $output;
}
/**
* Implementation of hook_validate().
*/
function blog_validate($node) {
node_validate_title($node);
}
/**
* Implementation of hook_form().
*/
......
......@@ -236,13 +236,6 @@ function book_submit(&$node) {
}
}
/**
* Implementation of hook_validate().
*/
function book_validate($node) {
node_validate_title($node);
}
/**
* Implementation of hook_form().
*/
......
......@@ -236,13 +236,6 @@ function book_submit(&$node) {
}
}
/**
* Implementation of hook_validate().
*/
function book_validate($node) {
node_validate_title($node);
}
/**
* Implementation of hook_form().
*/
......
......@@ -326,8 +326,6 @@ function forum_submit(&$node) {
* vocabulary is selected, not a "container" term.
*/
function forum_validate($node) {
node_validate_title($node,t('You have to specify a subject.'));
if ($node->taxonomy) {
// Extract the node's proper topic ID.
$vocabulary = variable_get('forum_nav_vocabulary', '');
......
......@@ -326,8 +326,6 @@ function forum_submit(&$node) {
* vocabulary is selected, not a "container" term.
*/
function forum_validate($node) {
node_validate_title($node,t('You have to specify a subject.'));
if ($node->taxonomy) {
// Extract the node's proper topic ID.
$vocabulary = variable_get('forum_nav_vocabulary', '');
......
......@@ -1647,18 +1647,6 @@ function node_validate($node) {
node_invoke_nodeapi($node, 'validate');
}
/**
* Validate the title of a node
*/
function node_validate_title($node, $message = NULL) {
// Validate the title field.
if (isset($node->title)) {
if (trim($node->title) == '') {
form_set_error('title', isset($message) ? $message : t('You have to specify a title.'));
}
}
}
function node_form_validate($form_id, $edit) {
node_validate($edit);
}
......
......@@ -1647,18 +1647,6 @@ function node_validate($node) {
node_invoke_nodeapi($node, 'validate');
}
/**
* Validate the title of a node
*/
function node_validate_title($node, $message = NULL) {
// Validate the title field.
if (isset($node->title)) {
if (trim($node->title) == '') {
form_set_error('title', isset($message) ? $message : t('You have to specify a title.'));
}
}
}
function node_form_validate($form_id, $edit) {
node_validate($edit);
}
......
......@@ -79,13 +79,6 @@ function page_menu($may_cache) {
return $items;
}
/**
* Implementation of hook_validate().
*/
function page_validate($node) {
node_validate_title($node);
}
/**
* Implementation of hook_form().
*/
......
......@@ -79,13 +79,6 @@ function page_menu($may_cache) {
return $items;
}
/**
* Implementation of hook_validate().
*/
function page_validate($node) {
node_validate_title($node);
}
/**
* Implementation of hook_form().
*/
......
......@@ -74,13 +74,6 @@ function story_menu($may_cache) {
return $items;
}
/**
* Implementation of hook_validate().
*/
function story_validate($node) {
node_validate_title($node);
}
/**
* Implementation of hook_form().
*/
......
......@@ -74,13 +74,6 @@ function story_menu($may_cache) {
return $items;
}
/**
* Implementation of hook_validate().
*/
function story_validate($node) {
node_validate_title($node);
}
/**
* Implementation of hook_form().
*/
......
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