// Create new collection $allow_changes=(getval("allow_changes","")!=""?1:0); $sharedcollection=create_collection($userref,i18n_get_translated($resource["field".$view_title_field]) . " Share " . nicedate(date("Y-m-d H:i:s")),$allow_changes); add_resource_to_collection($ref,$sharedcollection); if($sharing_related) { foreach($relatedshares as $relatedshare) { add_resource_to_collection($relatedshare,$sharedcollection); } } $errors=email_collection($sharedcollection,i18n_get_collection_name($sharedcollection),$userfullname,$users,$message,false,$access,$expires,$user_email,$from_name,$cc,false,"","",$list_recipients,$add_internal_access); // Hide from drop down by default show_hide_collection($sharedcollection, false, $userref); if ($errors=="") { // Log this // fix for bomb on multiple collections, daily stat object ref must be a single number. $crefs=explode(",",$ref); foreach ($crefs as $cref){ daily_stat("E-mailed collection",$cref); } if (!hook("replacecollectionemailredirect")){ redirect($baseurl_short."pages/done.php?text=collection_email"); } } } else
<?php # AJAX ratings save include "../../include/db.php"; include "../../include/general.php"; include "../../include/authenticate.php"; include "../../include/resource_functions.php"; include "../../include/collections_functions.php"; if (getvalescaped("action", "") == "showcollection") { show_hide_collection(getvalescaped("collection", "", true), true, $userref); exit("UNHIDDEN"); } if (getvalescaped("action", "") == "hidecollection") { show_hide_collection(getvalescaped("collection", "", true), false, $userref); exit("HIDDEN"); } exit("no action specified");