Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

get_mycollection_name()

Description

Fetches the next name for a new Default Collection for the given user (Default Collection 1, 2 etc.)

Parameters

ColumnTypeDefaultDescription
$userref integer

Return

void

Location

include/collections_functions.php lines 2408 to 2431

Definition

 
function get_mycollection_name($userref)
    {
    global 
$lang;
    for (
$n=1;$n<500;$n++)
        {
        
# Construct a name for this Default Collection. The name is translated when displayed!
        
if ($n==1)
            {
            
$name "Default Collection"# Do not translate this string!
            
}
        else
            {
            
$name "Default Collection " $n# Do not translate this string!
            
}
        
$ref=sql_value("select ref value from collection where user='" escape_check($userref) . "' and name='$name'",0);
        if (
$ref==0)
            {
            
# No match!
            
return $name;
            }
        }
    
# Tried nearly 500 names(!) so just return a standard name 
    
return "Default Collection";
    }

This article was last updated 2nd December 2020 00:05 Europe/London time based on the source file dated 1st December 2020 11:10 Europe/London time.