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

rebuild_specific_field_search_from_node()

Description

Utility function which helps rebuilding a specific field search string
from a node element

Parameters

ColumnTypeDefaultDescription
$node array A node element as returned by get_node() or get_nodes()

Return

string

Location

include/search_functions.php lines 2040 to 2052

Definition

 
function rebuild_specific_field_search_from_node(array $node)
    {
    if(
== count($node))
        {
        return 
'';
        }

    
$field_shortname ps_value("SELECT name AS `value` FROM resource_type_field WHERE ref = ?", array("i",$node['resource_type_field']), "field{$node['resource_type_field']}""schema");

    
// Note: at the moment there is no need to return a specific field search by multiple options
    // Example: country:keyword1;keyword2
    
return (strpos($node['name']," ")===false)?$field_shortname ":" i18n_get_translated($node['name']):"\"" $field_shortname ":" i18n_get_translated($node['name']) . "\"";
    }

This article was last updated 17th November 2024 15:05 Europe/London time based on the source file dated 8th November 2024 11:45 Europe/London time.