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

external_upload_notify()

Description

Notify the creator of an external upload share that resources have been uploaded

Parameters

ColumnTypeDefaultDescription
$collection int Ref of external shared collection
$k string External upload access key
$tempcollection int Ref of temporay upload collection

Return

void

Location

include/collections_functions.php lines 6708 to 6740

Definition

 
function external_upload_notify($collection$k$tempcollection)
    {
    global 
$applicationname,$baseurl,$lang;

    
$upload_share get_external_shares(array("share_collection"=>$collection,"share_type"=>1"access_key"=>$k));
    if(!isset(
$upload_share[0]["user"]))
        {
        
debug("external_upload_notify() - unable to find external share details: " func_get_args());
        }
    
$user               $upload_share[0]["user"];
    
$templatevars       = array();
    
$url                $baseurl "/?c=" . (int)$collection;
    
$templatevars['url']= $url
            
    
$message=$lang["notify_upload_share_new"] . "\n\n"$lang["clicklinkviewcollection"] . "\n\n" $url;
    
$notificationmessage=$lang["notify_upload_share_new"];
        
    
// Does the user want an email or notification?
    
get_config_option($user,'email_user_notifications'$send_email);    
    if(
$send_email)
        {
        
$notify_email=ps_value("select email value from user where ref=?",array("i",$user),"");
        if(
$notify_email!='')
            {
            
send_mail($notify_email,$applicationname ": " $lang["notify_upload_share_new_subject"],$message,"","","emailnotifyuploadsharenew",$templatevars);
            }
        }        
    else
        {
        global 
$userref;
        
message_add($user,$notificationmessage,$url,0);
        }
    }

This article was last updated 4th December 2024 08:35 Europe/London time based on the source file dated 27th November 2024 15:30 Europe/London time.