function album_get_object_lang($cur_cat_id, $field) { global $lang, $album_data, $album_user_id; $res = ''; $AH_this = $album_data['keys'][$cur_cat_id]; switch ($field) { case 'name': // check wheter we are working on a personal category or not and if it is the root if (album_is_personal_gallery($cur_cat_id) == true && album_get_personal_root_id($album_user_id) == $cur_cat_id) { return sprintf($lang['Personal_Gallery_Of_User'], $album_data['data'][$AH_this]['username']); } if ($cur_cat_id == ALBUM_ROOT_CATEGORY) { return $lang['Public_Categories']; } $field = 'cat_title'; break; case 'desc': $field = 'cat_desc'; break; } $res = $album_data['data'][$AH_this][$field]; if (isset($lang[$res])) { $res = $lang[$res]; } return $res; }
if ($pic_count != $thumb_count) { message_die(GENERAL_MESSAGE, $lang['File_thumbnail_count_mismatch']); } } } if ($pic_count == 0) { message_die(GENERAL_MESSAGE, $lang['No_pictures_selected_for_upload']); } // check if we are uploading ONLY one picture, if so, then check for picture title /* if ((sizeof($_FILES['pic_file']['name']) == 1 || $pic_count == 1) && empty($pic_title)) { message_die(GENERAL_ERROR, $lang['Missed_pic_title']); } */ $album_user_id = album_is_personal_gallery($cat_id); // -------------------------------- // Check username for guest posting // -------------------------------- if (!$user->data['session_logged_in']) { if ($pic_username != '') { $result = validate_username($pic_username); if ($result['error']) { message_die(GENERAL_MESSAGE, $result['error_msg']); } } } /* //Structure of the $_FILES ($_FILES) variable //This information it left here for other mod authors to use