Calling module
Code: Select all
<?php $user_sort="rating";
$user_sortdirection="DESC";?> (these are the second 2 parameters, the first 2 are set elsewhere)
<?php while (next_image(false, $firstPageImages, $user_sort, $user_sortdirection)): ?>
Called function
Code: Select all
function next_image($all=false, $firstPageCount=NULL, $sorttype=null, $sortdirection=NULL, $overridePassword=false)
{
global $_zp_images, $_zp_current_image, $_zp_current_album, $_zp_page, $_zp_current_image_restore, $_zp_conf_vars, $_zp_current_search, $_zp_gallery;
echo "sorttype=".$sorttype; (This outputs null, not my passed value of "rating")
Does the $sorttype=null in the called function override my passed non-null value? This function gets called from other modules which will not be passing in a paramater value so I'm hesitant to remove the "=null" in the parameter list.