Function __global->_get_specify_url

Definitions

sources/uploads.php

  • Filters specified URLs to make sure we're really allowed to access them.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$member_id MEMBER No No required parameter N/A N/A Member ID to check permissions with
$specify_name ID_TEXT No No required parameter N/A N/A The name of the POST parameter storing the URL (if '', then no POST parameter). Parameter value may be blank.
$upload_folder ID_TEXT No No required parameter N/A N/A The folder name where we will put this upload
$enforce_type integer No No 15 N/A N/A The type of upload it is (bitmask, from CMS_UPLOAD_* constants)
$accept_errors boolean No No False N/A N/A Whether to accept upload errors

Returns

  • A pair: the URL and the filename
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Filters specified URLs to make sure we're really allowed to access them.
 *
 * @param  MEMBER $member_id Member ID to check permissions with
 * @param  ID_TEXT $specify_name The name of the POST parameter storing the URL (if '', then no POST parameter). Parameter value may be blank.
 * @param  ID_TEXT $upload_folder The folder name where we will put this upload
 * @param  integer $enforce_type The type of upload it is (bitmask, from CMS_UPLOAD_* constants)
 * @param  boolean $accept_errors Whether to accept upload errors
 * @return array A pair: the URL and the filename
 */

function _get_specify_url(int $member_id, string $specify_name, string $upload_folder, int $enforce_type = 15, bool $accept_errors = false) : array