Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

remove_node_keyword()

Description

Removes node keyword for indexing purposes

Parameters

ColumnTypeDefaultDescription
$node integer ID of the node (from node table) the keyword should be linked to
$keyword string Keyword to index
$position integer The position of the keyword in the string that was indexed
$normalized boolean false If this keyword is normalized by the time we add it, set as true

Return

void

Location

include/node_functions.php lines 1091 to 1113

Definition

 
function remove_node_keyword($node$keyword$position$normalized false)
    {
    global 
$noadd;

    if(!
$normalized)
        {
        
$keyword          normalize_keyword($keyword);
        }

    
$keyword_ref resolve_keyword($keywordtrue);

    
$parameters=array("i",$node,"i",$keyword_ref);
    
$position_sql '';
    if(
'' != trim($position))
        {
        
$position_sql " AND position = ?";
        
$parameters[]="i";$parameters[]=$position;
        }

    
ps_query("DELETE FROM node_keyword WHERE node = ? AND keyword = ? $position_sql",$parameters);
    
    
ps_query("UPDATE keyword SET hit_count = hit_count - 1 WHERE ref = ?",array("i",$keyword_ref));
    }

This article was last updated 11th December 2024 20:35 Europe/London time based on the source file dated 6th December 2024 12:00 Europe/London time.