Function __global->edit_download
Definitions
sources/downloads2.php
- Edit a download.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the download to edit |
| $category_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the category the download is to be in |
| $name | SHORT_TEXT | No | No | required parameter | N/A | N/A | The name of the download |
| $url | URLPATH | No | No | required parameter | N/A | N/A | The URL to the download |
| $description | LONG_TEXT | No | No | required parameter | N/A | N/A | The description of the download |
| $author | ID_TEXT | No | No | required parameter | N/A | N/A | The author of the download (not necessarily same as the submitter) |
| $additional_details | LONG_TEXT | No | No | required parameter | N/A | N/A | The supplementary description for the download |
| $out_mode_id | ?AUTO_LINK | No | No | required parameter | N/A | N/A | The out-mode-id (the ID of a download that this download is an old version of). Often people wonder why this is specified with the old version, and not the opposite with the new version - it is because statistically, we perceive more chance of downloads merging than splitting (null: none) |
| $default_pic | integer | No | No | required parameter | N/A | N/A | The ordered number of the gallery image to use as the download representative image |
| $validated | BINARY | No | No | required parameter | N/A | N/A | Whether the download has been validated |
| $allow_rating | BINARY | No | No | required parameter | N/A | N/A | Whether the download may be rated |
| $allow_comments | SHORT_INTEGER | No | No | required parameter | N/A | N/A | Whether comments are allowed (0=no, 1=yes, 2=review style) |
| $allow_trackbacks | BINARY | No | No | required parameter | N/A | N/A | Whether the download may be trackbacked |
| $notes | LONG_TEXT | No | No | required parameter | N/A | N/A | Hidden notes pertaining to the download |
| $original_filename | SHORT_TEXT | No | No | required parameter | N/A | N/A | The downloads original filename (the URL may be obfuscated) |
| $file_size | integer | No | No | required parameter | N/A | N/A | The file size of the download (we can't really detect this in real-time for remote URLs) |
| $cost | integer | No | No | required parameter | N/A | N/A | The cost of the download that members will have to pay to get it |
| $submitter_gets_points | BINARY | No | No | required parameter | N/A | N/A | Whether the submitter gets the points for the download (they are selling it) (otherwise they are just thrown out, which is an alternative model - one of enforcing community point building) |
| $licence | ?AUTO_LINK | No | No | required parameter | N/A | N/A | The licence to use (null: none) |
| $meta_keywords | SHORT_TEXT | No | No | required parameter | N/A | N/A | Meta keywords |
| $meta_description | LONG_TEXT | No | No | required parameter | N/A | N/A | Meta description |
| $edit_time | ?TIME | No | No | Null | N/A | N/A | Edit time (null: either means current time, or if $null_is_literal, means reset to to null) |
| $add_time | ?TIME | No | No | Null | N/A | N/A | Add time (null: do not change) |
| $views | ?integer | No | No | Null | N/A | N/A | Number of views (null: do not change) |
| $submitter | ?MEMBER | No | No | Null | N/A | N/A | Submitter (null: do not change) |
Preview
Code (PHP)
/**
* Edit a download.
*
* @param AUTO_LINK $id The ID of the download to edit
* @param AUTO_LINK $category_id The ID of the category the download is to be in
* @param SHORT_TEXT $name The name of the download
* @param URLPATH $url The URL to the download
* @param LONG_TEXT $description The description of the download
* @param ID_TEXT $author The author of the download (not necessarily same as the submitter)
* @param LONG_TEXT $additional_details The supplementary description for the download
* @param ?AUTO_LINK $out_mode_id The out-mode-id (the ID of a download that this download is an old version of). Often people wonder why this is specified with the old version, and not the opposite with the new version - it is because statistically, we perceive more chance of downloads merging than splitting (null: none)
* @param integer $default_pic The ordered number of the gallery image to use as the download representative image
* @param BINARY $validated Whether the download has been validated
* @param BINARY $allow_rating Whether the download may be rated
* @param SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style)
* @param BINARY $allow_trackbacks Whether the download may be trackbacked
* @param LONG_TEXT $notes Hidden notes pertaining to the download
* @param SHORT_TEXT $original_filename The downloads original filename (the URL may be obfuscated)
* @param integer $file_size The file size of the download (we can't really detect this in real-time for remote URLs)
* @param integer $cost The cost of the download that members will have to pay to get it
* @param BINARY $submitter_gets_points Whether the submitter gets the points for the download (they are selling it) (otherwise they are just thrown out, which is an alternative model - one of enforcing community point building)
* @param ?AUTO_LINK $licence The licence to use (null: none)
* @param SHORT_TEXT $meta_keywords Meta keywords
* @param LONG_TEXT $meta_description Meta description
* @param ?TIME $edit_time Edit time (null: either means current time, or if $null_is_literal, means reset to to null)
* @param ?TIME $add_time Add time (null: do not change)
* @param ?integer $views Number of views (null: do not change)
* @param ?MEMBER $submitter Submitter (null: do not change)
*/
function edit_download(int $id, int $category_id, string $name, string $url, string $description, string $author, string $additional_details, ?int $out_mode_id, int $default_pic, int $validated, int $allow_rating, int $allow_comments, int $allow_trackbacks, string $notes, string $original_filename, int $file_size, int $cost, int $submitter_gets_points, ?int $licence, string $meta_keywords, string $meta_description, ?int $edit_time = null, ?int $add_time = null, ?int $views = null, ?int $submitter = null)
* Edit a download.
*
* @param AUTO_LINK $id The ID of the download to edit
* @param AUTO_LINK $category_id The ID of the category the download is to be in
* @param SHORT_TEXT $name The name of the download
* @param URLPATH $url The URL to the download
* @param LONG_TEXT $description The description of the download
* @param ID_TEXT $author The author of the download (not necessarily same as the submitter)
* @param LONG_TEXT $additional_details The supplementary description for the download
* @param ?AUTO_LINK $out_mode_id The out-mode-id (the ID of a download that this download is an old version of). Often people wonder why this is specified with the old version, and not the opposite with the new version - it is because statistically, we perceive more chance of downloads merging than splitting (null: none)
* @param integer $default_pic The ordered number of the gallery image to use as the download representative image
* @param BINARY $validated Whether the download has been validated
* @param BINARY $allow_rating Whether the download may be rated
* @param SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style)
* @param BINARY $allow_trackbacks Whether the download may be trackbacked
* @param LONG_TEXT $notes Hidden notes pertaining to the download
* @param SHORT_TEXT $original_filename The downloads original filename (the URL may be obfuscated)
* @param integer $file_size The file size of the download (we can't really detect this in real-time for remote URLs)
* @param integer $cost The cost of the download that members will have to pay to get it
* @param BINARY $submitter_gets_points Whether the submitter gets the points for the download (they are selling it) (otherwise they are just thrown out, which is an alternative model - one of enforcing community point building)
* @param ?AUTO_LINK $licence The licence to use (null: none)
* @param SHORT_TEXT $meta_keywords Meta keywords
* @param LONG_TEXT $meta_description Meta description
* @param ?TIME $edit_time Edit time (null: either means current time, or if $null_is_literal, means reset to to null)
* @param ?TIME $add_time Add time (null: do not change)
* @param ?integer $views Number of views (null: do not change)
* @param ?MEMBER $submitter Submitter (null: do not change)
*/
function edit_download(int $id, int $category_id, string $name, string $url, string $description, string $author, string $additional_details, ?int $out_mode_id, int $default_pic, int $validated, int $allow_rating, int $allow_comments, int $allow_trackbacks, string $notes, string $original_filename, int $file_size, int $cost, int $submitter_gets_points, ?int $licence, string $meta_keywords, string $meta_description, ?int $edit_time = null, ?int $add_time = null, ?int $views = null, ?int $submitter = null)

