@@ -720,9 +720,9 @@ function book_build_active_trail($book_link) {
}
/**
* Implementation of hook_nodeapi_load().
* Implementation of hook_node_load().
*/
functionbook_nodeapi_load($nodes,$types){
functionbook_node_load($nodes,$types){
$result=db_query("SELECT * FROM {book} b INNER JOIN {menu_links} ml ON b.mlid = ml.mlid WHERE b.nid IN (:nids)",array(':nids'=>array_keys($nodes)),array('fetch'=>PDO::FETCH_ASSOC));
foreach($resultas$record){
$nodes[$record['nid']]->book=$record;
...
...
@@ -733,9 +733,9 @@ function book_nodeapi_load($nodes, $types) {
@@ -646,9 +646,9 @@ function comment_nodeapi_insert($node) {
}
/**
* Implementation of hook_nodeapi_delete().
* Implementation of hook_node_delete().
*/
functioncomment_nodeapi_delete($node){
functioncomment_node_delete($node){
db_delete('comment')
->condition('nid',$node->nid)
->execute();
...
...
@@ -658,9 +658,9 @@ function comment_nodeapi_delete($node) {
}
/**
* Implementation of hook_nodeapi_update_index().
* Implementation of hook_node_update_index().
*/
functioncomment_nodeapi_update_index($node){
functioncomment_node_update_index($node){
$text='';
$comments=db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status',array(':nid'=>$node->nid,':status'=>COMMENT_PUBLISHED));
foreach($commentsas$comment){
...
...
@@ -678,17 +678,17 @@ function comment_update_index() {
}
/**
* Implementation of hook_nodeapi_search_result().
* Implementation of hook_node_search_result().
*/
functioncomment_nodeapi_search_result($node){
functioncomment_node_search_result($node){
$comments=db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid',array('nid'=>$node->nid))->fetchField();
@@ -324,7 +324,7 @@ function hook_nodeapi_search_result($node) {
* @return
* None.
*/
functionhook_nodeapi_presave($node){
functionhook_node_presave($node){
if($node->nid&&$node->moderate){
// Reset votes when node is updated:
$node->score=0;
...
...
@@ -341,7 +341,7 @@ function hook_nodeapi_presave($node) {
* @return
* None.
*/
functionhook_nodeapi_update($node){
functionhook_node_update($node){
db_query("UPDATE {mytable} SET extra = '%s' WHERE nid = %d",$node->extra,$node->nid);
}
...
...
@@ -349,14 +349,14 @@ function hook_nodeapi_update($node) {
* The node is being indexed.
*
* If you want additional information to be indexed which is not already
* visible through nodeapi "view", then you should return it here.
* visible through node "view", then you should return it here.
*
* @param $node
* The node the action is being performed on.
* @return
* Array of additional information to be indexed.
*/
functionhook_nodeapi_update_index($node){
functionhook_node_update_index($node){
$text='';
$comments=db_query('SELECT subject, comment, format FROM {comment} WHERE nid = :nid AND status = :status',array(':nid'=>$node->nid,':status'=>COMMENT_PUBLISHED));
foreach($commentsas$comment){
...
...
@@ -378,7 +378,7 @@ function hook_nodeapi_update_index($node) {
* @return
* None.
*/
functionhook_nodeapi_validate($node,$form){
functionhook_node_validate($node,$form){
if(isset($node->end)&&isset($node->start)){
if($node->start>$node->end){
form_set_error('time',t('An event may not end before it starts.'));
...
...
@@ -400,7 +400,7 @@ function hook_nodeapi_validate($node, $form) {
* @return
* None.
*/
functionhook_nodeapi_view($node,$teaser){
functionhook_node_view($node,$teaser){
$node->content['my_additional_field']=array(
'#value'=>$additional_field,
'#weight'=>10,
...
...
@@ -558,7 +558,7 @@ function hook_access($op, $node, $account) {
* None.
*
* To take action when nodes of any type are deleted (not just nodes of
* the type defined by this module), use hook_nodeapi() instead.
* the type defined by this module), use hook_node() instead.
*
* For a detailed usage example, see node_example.module.
*/
...
...
@@ -665,7 +665,7 @@ function hook_form(&$node, $form_state) {
* None.
*
* To take action when nodes of any type are inserted (not just nodes of
* the type(s) defined by this module), use hook_nodeapi() instead.
* the type(s) defined by this module), use hook_node() instead.
*
* For a detailed usage example, see node_example.module.
*/
...
...
@@ -709,7 +709,7 @@ function hook_load($nodes) {
* None.
*
* To take action when nodes of any type are updated (not just nodes of
* the type(s) defined by this module), use hook_nodea