Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -79,7 +79,9 @@ class _Application extends \IPS\Application
|
||||
|
||||
foreach ( \IPS\downloads\File::getItemsWithPermission( array(), NULL, 10, 'read', \IPS\Content\Hideable::FILTER_AUTOMATIC, 0, $member ) as $file )
|
||||
{
|
||||
$document->addItem( $file->name, $file->url(), $file->desc, \IPS\DateTime::ts( $file->updated ), $file->id );
|
||||
$content = $file->desc;
|
||||
\IPS\Output::i()->parseFileObjectUrls( $content );
|
||||
$document->addItem( $file->name, $file->url(), $content, \IPS\DateTime::ts( $file->updated ), $file->id );
|
||||
}
|
||||
|
||||
/* @note application/rss+xml is not a registered IANA mime-type so we need to stick with text/xml for RSS */
|
||||
|
||||
@@ -40,7 +40,7 @@ class _files extends \IPS\Content\Api\ItemController
|
||||
* @apiparam int hidden If 1, only files which are hidden are returned, if 0 only not hidden
|
||||
* @apiparam int pinned If 1, only files which are pinned are returned, if 0 only not pinned
|
||||
* @apiparam int featured If 1, only files which are featured are returned, if 0 only not featured
|
||||
* @apiparam string sortBy What to sort by. Can be 'date' for creation date, 'title', 'updated', 'popular' or leave unspecified for ID
|
||||
* @apiparam string sortBy What to sort by. Can be 'date' for creation date, 'title', 'updated', 'popular', 'downloads' or leave unspecified for ID
|
||||
* @apiparam string sortDir Sort direction. Can be 'asc' or 'desc' - defaults to 'asc'
|
||||
* @apiparam int page Page number
|
||||
* @apiparam int perPage Number of results per page - defaults to 25
|
||||
@@ -59,6 +59,14 @@ class _files extends \IPS\Content\Api\ItemController
|
||||
$sortBy = 'file_rating ' . $sortDirection . ', file_reviews';
|
||||
$where = array( array( 'file_rating>?', 0 ) );
|
||||
}
|
||||
elseif( \IPS\Request::i()->sortBy == 'downloads' )
|
||||
{
|
||||
$sortBy = 'file_downloads';
|
||||
if( !isset( \IPS\Request::i()->sortDir ) )
|
||||
{
|
||||
\IPS\Request::i()->sortDir = 'desc';
|
||||
}
|
||||
}
|
||||
|
||||
/* Return */
|
||||
return $this->_list( $where, 'categories', FALSE, $sortBy );
|
||||
@@ -763,6 +771,7 @@ class _files extends \IPS\Content\Api\ItemController
|
||||
|
||||
/* Save */
|
||||
$file->updated = time();
|
||||
$file->published = time();
|
||||
$file->save();
|
||||
|
||||
/* Send notifications */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="downloads">
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/downloads" javascript_name="ips.downloads.browse.js" javascript_type="controller" javascript_version="107712" javascript_position="1000050">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/downloads" javascript_name="ips.downloads.browse.js" javascript_type="controller" javascript_version="107827" javascript_position="1000200">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -59,7 +59,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/pending" javascript_name="ips.pending.buttons.js" javascript_type="controller" javascript_version="107712" javascript_position="1000100">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/pending" javascript_name="ips.pending.buttons.js" javascript_type="controller" javascript_version="107827" javascript_position="1000250">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.settings.js" javascript_type="controller" javascript_version="107712" javascript_position="1000050">/**
|
||||
<file javascript_app="downloads" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.settings.js" javascript_type="controller" javascript_version="107827" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.linkedScreenshots.js" javascript_type="controller" javascript_version="107712" javascript_position="1000150">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.linkedScreenshots.js" javascript_type="controller" javascript_version="107827" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -212,7 +212,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="107712" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="107827" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -655,7 +655,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="107712" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="107827" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -673,7 +673,7 @@
|
||||
this.setup();
|
||||
|
||||
// Primary event that watches for URL changes
|
||||
History.Adapter.bind( window, 'statechange', _.bind( this.stateChange, this ) );
|
||||
this.on( window, 'historychange:downloads.front.view.changeLog', this.stateChange );
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -684,9 +684,9 @@
|
||||
*/
|
||||
setup: function () {
|
||||
// Update page URL
|
||||
History.replaceState( {
|
||||
ips.utils.history.replaceState( {
|
||||
controller: 'changelog'
|
||||
}, document.title, window.location.href );
|
||||
}, 'downloads.front.view.changeLog', window.location.href );
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -702,33 +702,32 @@
|
||||
var url = data.menuElem.find('[data-ipsMenuValue="' + data.selectedItemID + '"] > a').attr('href');
|
||||
|
||||
// Update page URL
|
||||
History.pushState( {
|
||||
ips.utils.history.pushState( {
|
||||
controller: 'changelog',
|
||||
version: data.selectedItemID
|
||||
}, document.title, url );
|
||||
}, 'downloads.front.view.changeLog', url );
|
||||
|
||||
this._loadVersion( url, data.menuElem.find('[data-ipsMenuValue="' + data.selectedItemID + '"]').attr('data-changelogTitle') );
|
||||
},
|
||||
|
||||
/**
|
||||
* Event handler for History.js
|
||||
* When the state changes, we locate that menu item based on the version, and then pull
|
||||
* the version string and URL and load it
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
stateChange: function () {
|
||||
var state = History.getState();
|
||||
const state = ips.utils.history.getState('downloads.front.view.changeLog')
|
||||
|
||||
// Other things on the page can change the URL, so make sure this is a changelog url
|
||||
if( state.data.controller != 'changelog' ){
|
||||
if (!state || !Object.keys(state).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var item;
|
||||
let item;
|
||||
|
||||
if( state.data.version ){
|
||||
item = $('#elChangelog_menu').find('[data-ipsMenuValue="' + state.data.version + '"]');
|
||||
if (state.version) {
|
||||
item = $('#elChangelog_menu').find('[data-ipsMenuValue="' + state.version + '"]');
|
||||
} else {
|
||||
item = $('#elChangelog_menu').find('[data-ipsMenuValue]').first();
|
||||
}
|
||||
@@ -778,7 +777,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="107712" javascript_position="1000200">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="107827" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -906,7 +905,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.subscribe.js" javascript_type="controller" javascript_version="107712" javascript_position="1000200">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.subscribe.js" javascript_type="controller" javascript_version="107827" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -969,7 +968,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="107712" javascript_position="1000250"><![CDATA[/* VIEW TEMPLATES */
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="107827" javascript_position="1000050"><![CDATA[/* VIEW TEMPLATES */
|
||||
ips.templates.set('downloads.submit.screenshot', " \
|
||||
<div class='ipsUploader__row ipsUploader__row--withBorder ipsUploader__row--image ipsAttach ipsContained {{#done}}ipsAttach_done{{/done}}' id='{{id}}' data-role='file' data-fileid='{{id}}' data-filesize='{{sizeRaw}}' data-fullsizeurl='{{imagesrc}}' data-thumbnailurl='{{thumbnail}}' data-fileType='image'>\
|
||||
<div class='ipsUploader__rowPreview ipsType_center' data-role='preview'>\
|
||||
@@ -1046,7 +1045,6 @@ Debug.js
|
||||
app.js</order>
|
||||
<order app="global" path="/dev/js//library//jquery">jquery.js
|
||||
jquery-migrate.js
|
||||
jquery.history.js
|
||||
jquery.transform.js</order>
|
||||
<order app="global" path="/dev/js//library//linkify">linkify.min.js
|
||||
linkify-jquery.min.js</order>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="downloads" version="107712">
|
||||
<app key="downloads" version="107827">
|
||||
<word key="__app_downloads" js="0">Downloads</word>
|
||||
<word key="frontnavigation_downloads" js="0">Downloads</word>
|
||||
<word key="__indefart_downloads_file_comment" js="0">a comment on a file</word>
|
||||
@@ -36,6 +36,12 @@
|
||||
<word key="modlog__action_purchasestatus" js="0"><![CDATA[Toggled purchase status for a file: <a href='%s'>%s</a>]]></word>
|
||||
<word key="modlog__action_newversion_reject" js="0"><![CDATA[Rejected a new version for a file: <a href='%s'>%s</a>]]></word>
|
||||
<word key="modlog__action_newversion_approved" js="0"><![CDATA[Approved a new version for a file: <a href='%s'>%s</a>]]></word>
|
||||
<word key="modlog__action_restorebackup_stats" js="0">Restored a previous version of a file</word>
|
||||
<word key="modlog__action_visibilitybackup_stats" js="0">Toggled visibility of a previous version of a file</word>
|
||||
<word key="modlog__action_deletebackup_stats" js="0">Deleted a previous version of a file</word>
|
||||
<word key="modlog__action_purchasestatus_stats" js="0">Toggled purchase status of a file</word>
|
||||
<word key="modlog__action_newversion_reject_stats" js="0">Rejected a new version of a file</word>
|
||||
<word key="modlog__action_newversion_approved_stats" js="0">Approved a new version of a file</word>
|
||||
<word key="mark_category_read" js="0">Mark category read</word>
|
||||
<word key="mark_category_read_title" js="0">Mark this category as read</word>
|
||||
<word key="editor__downloads_Categories" js="0">Download Categories</word>
|
||||
@@ -178,6 +184,10 @@
|
||||
<word key="idm_cfield_sidebar" js="0">In the sidebar</word>
|
||||
<word key="downloads_field_paid" js="0">Purchase Required?</word>
|
||||
<word key="downloads_field_paid_desc" js="0">If enabled, this field's contents will only be shown to members's who have purchased the file. This setting has no effect on free files.</word>
|
||||
<word key="perm_cfield_perm__view" js="0">View Field Content</word>
|
||||
<word key="perm_cfield_perm__edit" js="0">Edit Field Content</word>
|
||||
<word key="perm_cfield_perm__add" js="0">Add Content to Field</word>
|
||||
<word key="perm_cfield_perm__label" js="0">Groups</word>
|
||||
<word key="menu__downloads_downloads_settings" js="0">Settings</word>
|
||||
<word key="acplogs__downloads_settings" js="0">Updated downloads settings</word>
|
||||
<word key="group__downloads_Downloads" js="0">Downloads</word>
|
||||
|
||||
@@ -904,7 +904,7 @@
|
||||
{$item->truncated(TRUE)|raw}
|
||||
</div>
|
||||
|
||||
{template="embedItemStats" group="embed" app="core" params="$item"}
|
||||
{template="embedItemStats" group="embed" app="core" params="$item, $item->container()->bitoptions['comments']"}
|
||||
</div>
|
||||
</div>]]></template>
|
||||
<template template_group="global" template_name="embedFileComment" template_data="$comment, $item, $url" template_location="front" template_app="downloads"><![CDATA[
|
||||
@@ -1926,7 +1926,8 @@
|
||||
{{$data = $files->data();}}
|
||||
<li class='ipsDataItem'>
|
||||
<div class='ipsDataItem_main'>
|
||||
<h4 class='ipsDataItem_title ipsContained_container'><span class='ipsType_break ipsContained'>{{if $data['record_realname']}}{$data['record_realname']}{{else}}{{$pathBits = explode( '/', \IPS\Http\Url::external( $data['record_location'] )->data[ \IPS\Http\Url::COMPONENT_PATH ] );}}{expression="\count( $pathBits ) ? array_pop( $pathBits ) : $data['record_location']"}{{endif}}</span></h4>
|
||||
<h4 class='ipsDataItem_title ipsContained_container'><span class='ipsType_break ipsContained'>{{if $data['record_realname']}}{$data['record_realname']}{{else}}{{$pathBits = array_filter( explode( '/', \IPS\Http\Url::external( $data['record_location'] )->data[ \IPS\Http\Url::COMPONENT_PATH ] ) );}}
|
||||
{expression="\count( $pathBits ) ? array_pop( $pathBits ) : $data['record_location']"}{{endif}}</span></h4>
|
||||
{{if $data['record_size']}}<p class='ipsType_reset ipsDataItem_meta'>{filesize="$data['record_size']"}</p>{{endif}}
|
||||
</div>
|
||||
{{if $waitingOn == $k}}
|
||||
@@ -2875,8 +2876,9 @@
|
||||
{{if $comment->canReportOrRevoke() === TRUE}}
|
||||
<li><a href='{$comment->url('report')}' {{if member.member_id or \IPS\Helpers\Form\Captcha::supportsModal()}}data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}"{{endif}} data-action='reportComment' title='{lang="report_content"}'>{lang="report"}</a></li>
|
||||
{{endif}}
|
||||
|
||||
{{if ! \IPS\Output::i()->reduceLinks()}}
|
||||
<li><a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findReview', 'review' => $comment->id ) )}' data-ipsMenu data-ipsMenu-closeOnClick='false' id='elShareComment_{$comment->id}'>{lang="share_this_comment"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
{{if $comment->hidden() !== 1 && \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
|
||||
{template="reputation" group="global" app="core" params="$comment"}
|
||||
|
||||
@@ -573,5 +573,69 @@
|
||||
"107704": "4.7.12",
|
||||
"107710": "4.7.13 Beta 1",
|
||||
"107711": "4.7.13 Beta 2",
|
||||
"107712": "4.7.13"
|
||||
"107712": "4.7.13",
|
||||
"107713": "4.7.13",
|
||||
"107714": "4.7.13",
|
||||
"107715": "4.7.13",
|
||||
"107720": "4.7.14 Beta 1",
|
||||
"107721": "4.7.14 Beta 2",
|
||||
"107722": "4.7.14",
|
||||
"107723": "4.7.14",
|
||||
"107724": "4.7.14",
|
||||
"107730": "4.7.15 Beta 1",
|
||||
"107731": "4.7.15 Beta 2",
|
||||
"107732": "4.7.15",
|
||||
"107733": "4.7.15",
|
||||
"107734": "4.7.15",
|
||||
"107740": "4.7.16 Beta 1",
|
||||
"107741": "4.7.16 Beta 2",
|
||||
"107742": "4.7.16 Beta 3",
|
||||
"107743": "4.7.16 Beta 4",
|
||||
"107744": "4.7.16 Beta 5",
|
||||
"107745": "4.7.16",
|
||||
"107746": "4.7.16",
|
||||
"107747": "4.7.16",
|
||||
"107748": "4.7.16",
|
||||
"107749": "4.7.16",
|
||||
"107750": "4.7.16",
|
||||
"107751": "4.7.16",
|
||||
"107760": "4.7.17 Beta 1",
|
||||
"107761": "4.7.17 Beta 2",
|
||||
"107762": "4.7.17 Beta 3",
|
||||
"107763": "4.7.17",
|
||||
"107764": "4.7.17",
|
||||
"107765": "4.7.17",
|
||||
"107770": "4.7.18 Beta 1",
|
||||
"107771": "4.7.18 Beta 2",
|
||||
"107772": "4.7.18 Beta 3",
|
||||
"107773": "4.7.18",
|
||||
"107774": "4.7.18",
|
||||
"107775": "4.7.18",
|
||||
"107780": "4.7.19 Beta 1",
|
||||
"107781": "4.7.19 Beta 2",
|
||||
"107782": "4.7.19 Beta 3",
|
||||
"107783": "4.7.19 Beta 4",
|
||||
"107784": "4.7.19",
|
||||
"107785": "4.7.19",
|
||||
"107786": "4.7.19",
|
||||
"107787": "4.7.19",
|
||||
"107795": "4.7.20 Beta 1",
|
||||
"107796": "4.7.20 Beta 2",
|
||||
"107797": "4.7.20 Beta 3",
|
||||
"107798": "4.7.20 Beta 4",
|
||||
"107799": "4.7.20 Beta 5",
|
||||
"107800": "4.7.20",
|
||||
"107801": "4.7.20",
|
||||
"107802": "4.7.20",
|
||||
"107803": "4.7.20",
|
||||
"107810": "4.7.21 Beta 1",
|
||||
"107811": "4.7.21",
|
||||
"107815": "4.7.22 Beta 1",
|
||||
"107816": "4.7.22 Beta 2",
|
||||
"107817": "4.7.22",
|
||||
"107818": "4.7.22",
|
||||
"107819": "4.7.22",
|
||||
"107820": "4.7.22",
|
||||
"107826": "4.7.23 Beta 1",
|
||||
"107827": "4.7.23"
|
||||
}
|
||||
@@ -42,13 +42,13 @@ class _Downloads extends \IPS\core\MemberACPProfile\Restriction
|
||||
public function save( $values )
|
||||
{
|
||||
$return = array();
|
||||
|
||||
|
||||
if ( $this->member->idm_block_submissions == $values['idm_block_submissions'] )
|
||||
{
|
||||
$return['idm_block_submissions'] = array( 'old' => $this->member->members_bitoptions['idm_block_submissions'], 'new' => !$values['idm_block_submissions'] );
|
||||
$this->member->idm_block_submissions = !$values['idm_block_submissions'];
|
||||
$return['idm_block_submissions'] = array( 'old' => $this->member->idm_block_submissions, 'new' => !$values['idm_block_submissions'] );
|
||||
$this->member->idm_block_submissions = !$values['idm_block_submissions'];
|
||||
}
|
||||
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ try
|
||||
|
||||
\IPS\Output::i()->sendHeader( "Content-Security-Policy: default-src 'none'; sandbox" );
|
||||
\IPS\Output::i()->sendHeader( "X-Content-Security-Policy: default-src 'none'; sandbox" );
|
||||
\IPS\Output::i()->sendHeader( "Cross-Origin-Opener-Policy: same-origin" );
|
||||
|
||||
$file->printFile();
|
||||
exit;
|
||||
|
||||
@@ -146,6 +146,7 @@ class _pending extends \IPS\Content\Controller
|
||||
\IPS\Output::i()->sendHeader( "Content-type: " . \IPS\File::getMimeType( $file->originalFilename ) . ";charset=UTF-8" );
|
||||
\IPS\Output::i()->sendHeader( "Content-Security-Policy: default-src 'none'; sandbox" );
|
||||
\IPS\Output::i()->sendHeader( "X-Content-Security-Policy: default-src 'none'; sandbox" );
|
||||
\IPS\Output::i()->sendHeader( "Cross-Origin-Opener-Policy: same-origin" );
|
||||
\IPS\Output::i()->sendHeader( 'Content-Disposition: ' . \IPS\Output::getContentDisposition( 'attachment', $file->originalFilename ) );
|
||||
\IPS\Output::i()->sendHeader( "Content-Length: " . $file->filesize() );
|
||||
|
||||
|
||||
@@ -111,6 +111,12 @@ class _view extends \IPS\Content\Controller
|
||||
|
||||
foreach ( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( 'pfd.*', array( 'downloads_cfields', 'pfd' ), NULL, 'pfd.cf_position' ), 'IPS\downloads\Field' ) as $field )
|
||||
{
|
||||
/* Check if the user can view this field */
|
||||
if( !$field->can( 'view' ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( array_key_exists( 'field_' . $field->id, $this->file->customFields() ) )
|
||||
{
|
||||
if ( $fields[ 'field_' . $field->id ] !== null AND $fields[ 'field_' . $field->id ] !== '' )
|
||||
@@ -911,7 +917,8 @@ class _view extends \IPS\Content\Controller
|
||||
|
||||
/* Require approval */
|
||||
$requireApproval = FALSE;
|
||||
if( $category->bitoptions['moderation'] and $category->bitoptions['moderation_edits'] and !$this->file->canUnhide() )
|
||||
$member = \IPS\Member::loggedIn();
|
||||
if( !$member->group['g_avoid_q'] and $category->bitoptions['moderation'] and $category->bitoptions['moderation_edits'] and !$this->file->canUnhide() )
|
||||
{
|
||||
$requireApproval = TRUE;
|
||||
}
|
||||
@@ -1208,6 +1215,7 @@ class _view extends \IPS\Content\Controller
|
||||
{
|
||||
try
|
||||
{
|
||||
/* @note SELECT_FROM_WRITE_SERVER added in c96a0b88e7386e01a6eed39427f2312bc746874f */
|
||||
$existing = \IPS\Db::i()->select( '*', 'downloads_files_records', array( "record_location=? AND record_file_id=?", (string) $file, $this->file->id ), NULL, NULL, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
|
||||
}
|
||||
catch( \UnderflowException $e ) {}
|
||||
@@ -1303,11 +1311,13 @@ class _view extends \IPS\Content\Controller
|
||||
/* These are specific to unapproved updates */
|
||||
if ( !$requireApproval )
|
||||
{
|
||||
/* @note SELECT_FROM_WRITE_SERVER added in c96a0b88e7386e01a6eed39427f2312bc746874f */
|
||||
$fileObj->size = \floatval( \IPS\Db::i()->select( 'SUM(record_size)', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=0', $this->file->id, 'upload' ), NULL, NULL, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first() );
|
||||
|
||||
/* Work out the new primary screenshot */
|
||||
try
|
||||
{
|
||||
/* @note SELECT_FROM_WRITE_SERVER added in c96a0b88e7386e01a6eed39427f2312bc746874f */
|
||||
$this->file->primary_screenshot = \IPS\Db::i()->select( 'record_id', 'downloads_files_records', array( 'record_file_id=? AND ( record_type=? OR record_type=? ) AND record_backup=0 AND record_hidden=0', $this->file->id, 'ssupload', 'sslink' ), 'record_default DESC, record_id ASC', NULL, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
|
||||
}
|
||||
catch ( \UnderflowException $e ) { }
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107713,
|
||||
"name": "4.7.13",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107714,
|
||||
"name": "4.7.13",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107715,
|
||||
"name": "4.7.13",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107720,
|
||||
"name": "4.7.14 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/view\/multipleFiles"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107721,
|
||||
"name": "4.7.14 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107722,
|
||||
"name": "4.7.14",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107723,
|
||||
"name": "4.7.14",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107724,
|
||||
"name": "4.7.14",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107730,
|
||||
"name": "4.7.15 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107731,
|
||||
"name": "4.7.15 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107732,
|
||||
"name": "4.7.15",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107733,
|
||||
"name": "4.7.15",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107734,
|
||||
"name": "4.7.15",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107740,
|
||||
"name": "4.7.16 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": true,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"downloads\/front\/controllers\/view\/ips.view.changeLog.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"global\/\/dev\/js\/\/library\/\/jquery"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"modlog__action_restorebackup_stats",
|
||||
"modlog__action_visibilitybackup_stats",
|
||||
"modlog__action_deletebackup_stats",
|
||||
"modlog__action_purchasestatus_stats",
|
||||
"modlog__action_newversion_reject_stats",
|
||||
"modlog__action_newversion_approved_stats"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/global\/embedFile"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107741,
|
||||
"name": "4.7.16 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107742,
|
||||
"name": "4.7.16 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107743,
|
||||
"name": "4.7.16 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107744,
|
||||
"name": "4.7.16 Beta 5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107745,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107746,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107747,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107748,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107749,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107750,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107751,
|
||||
"name": "4.7.16",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107760,
|
||||
"name": "4.7.17 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107761,
|
||||
"name": "4.7.17 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107762,
|
||||
"name": "4.7.17 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107763,
|
||||
"name": "4.7.17",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107764,
|
||||
"name": "4.7.17",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107765,
|
||||
"name": "4.7.17",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107770,
|
||||
"name": "4.7.18 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107771,
|
||||
"name": "4.7.18 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107772,
|
||||
"name": "4.7.18 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107773,
|
||||
"name": "4.7.18",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107774,
|
||||
"name": "4.7.18",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107775,
|
||||
"name": "4.7.18",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107780,
|
||||
"name": "4.7.19 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/widgets\/downloadsReviewFeed"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107781,
|
||||
"name": "4.7.19 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107782,
|
||||
"name": "4.7.19 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107783,
|
||||
"name": "4.7.19 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107784,
|
||||
"name": "4.7.19",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107785,
|
||||
"name": "4.7.19",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107786,
|
||||
"name": "4.7.19",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107787,
|
||||
"name": "4.7.19",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107795,
|
||||
"name": "4.7.20 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": true
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"perm_cfield_perm__view",
|
||||
"perm_cfield_perm__edit",
|
||||
"perm_cfield_perm__add",
|
||||
"perm_cfield_perm__label"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.7.20 Beta 1 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Downloads
|
||||
* @since 14 Nov 2024
|
||||
*/
|
||||
|
||||
namespace IPS\downloads\setup\upg_107795;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\downloads\Field;
|
||||
use IPS\Patterns\ActiveRecordIterator;
|
||||
use IPS\Db;
|
||||
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.7.20 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* This step sets default permissions on existing Downloads custom fields.
|
||||
* Previous versions will not have any permissions set and will cause fields to be inaccessible to all groups,
|
||||
* so we set permissions that make sense.
|
||||
*
|
||||
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
/* Set default permissions on custom fields */
|
||||
$fields = iterator_to_array(
|
||||
new ActiveRecordIterator(
|
||||
Db::i()->select( '*', 'downloads_cfields' ),
|
||||
Field::class
|
||||
)
|
||||
);
|
||||
|
||||
/* Set up recommended permissions */
|
||||
$perms = [];
|
||||
foreach ( Field::$permissionMap as $k => $v )
|
||||
{
|
||||
switch ( $k )
|
||||
{
|
||||
case 'view':
|
||||
case 'edit':
|
||||
case 'add':
|
||||
$perms["perm_{$v}"] = '*';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach( $fields as $field )
|
||||
{
|
||||
/* @var Field $field */
|
||||
try
|
||||
{
|
||||
$current = \IPS\Db::i()->select( '*', 'core_permission_index', array( 'app=? AND perm_type=? AND perm_type_id=?', 'downloads', 'fields', $field->_id ) )->first();
|
||||
|
||||
/* This shouldn't happen, but just in case */
|
||||
if( !empty( $current['perm_view'] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Db::i()->update( 'core_permission_index', $perms, [ 'perm_id=?', $current['perm_id'] ] );
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
/* Recommended permissions */
|
||||
$update = array_merge( $perms, [ 'app' => 'downloads', 'perm_type' => 'fields', 'perm_type_id' => $field->_id ] );
|
||||
Db::i()->insert( 'core_permission_index', $update );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107796,
|
||||
"name": "4.7.20 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107797,
|
||||
"name": "4.7.20 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107798,
|
||||
"name": "4.7.20 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107799,
|
||||
"name": "4.7.20 Beta 5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107800,
|
||||
"name": "4.7.20",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107801,
|
||||
"name": "4.7.20",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107802,
|
||||
"name": "4.7.20",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107803,
|
||||
"name": "4.7.20",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107810,
|
||||
"name": "4.7.21 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107811,
|
||||
"name": "4.7.21",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107815,
|
||||
"name": "4.7.22 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107816,
|
||||
"name": "4.7.22 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107817,
|
||||
"name": "4.7.22",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107818,
|
||||
"name": "4.7.22",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107819,
|
||||
"name": "4.7.22",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107820,
|
||||
"name": "4.7.22",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107826,
|
||||
"name": "4.7.23 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107827,
|
||||
"name": "4.7.23",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -12,6 +12,9 @@
|
||||
namespace IPS\downloads;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Content\Comment;
|
||||
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
@@ -733,6 +736,7 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
try
|
||||
{
|
||||
/* @note SELECT_FROM_WRITE_SERVER added in c96a0b88e7386e01a6eed39427f2312bc746874f */
|
||||
$file = \IPS\downloads\File::constructFromData( \IPS\Db::i()->select( '*', 'downloads_files', array( 'file_cat=? AND file_open=1', $this->id ), 'file_submitted DESC', 1, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first() );
|
||||
}
|
||||
catch ( \UnderflowException $e )
|
||||
@@ -746,17 +750,17 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$this->last_file_id = $file->id;
|
||||
$this->last_file_date = $file->submitted;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set last comment
|
||||
*
|
||||
* @param \IPS\Content\Comment|NULL $comment The latest comment or NULL to work it out
|
||||
* @return int
|
||||
* @note We actually want to set the last file info, not the last comment, so we ignore $comment
|
||||
* @param Comment|null $comment The latest comment or NULL to work it out
|
||||
* @param Item|null $updatedItem We sometimes run setLastComment() when an item has been edited, if so, that item will be here
|
||||
* @return void
|
||||
*/
|
||||
public function setLastComment( \IPS\Content\Comment $comment=NULL )
|
||||
public function _setLastComment( \IPS\Content\Comment $comment=NULL, \IPS\Content\Item $updatedItem=NULL )
|
||||
{
|
||||
$this->setLastFile();
|
||||
$this->setLastFile( $updatedItem );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
namespace IPS\downloads;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Lang;
|
||||
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
@@ -21,7 +24,7 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Field Node
|
||||
*/
|
||||
class _Field extends \IPS\CustomField
|
||||
class _Field extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
{
|
||||
/**
|
||||
* @brief [ActiveRecord] Multiton Store
|
||||
@@ -74,6 +77,30 @@ class _Field extends \IPS\CustomField
|
||||
* @brief [CustomField] Set to TRUE if uploads fields are capable of holding the submitted content for moderation
|
||||
*/
|
||||
public static $uploadsCanBeModerated = TRUE;
|
||||
|
||||
/**
|
||||
* @brief The map of permission columns
|
||||
*/
|
||||
public static $permissionMap = array(
|
||||
'view' => 'view',
|
||||
'edit' => 2,
|
||||
'add' => 3
|
||||
);
|
||||
|
||||
/**
|
||||
* @brief [Node] App for permission index
|
||||
*/
|
||||
public static $permApp = 'downloads';
|
||||
|
||||
/**
|
||||
* @brief [Node] Type for permission index
|
||||
*/
|
||||
public static $permType = 'fields';
|
||||
|
||||
/**
|
||||
* @brief [Node] Prefix string that is automatically prepended to permission matrix language strings
|
||||
*/
|
||||
public static $permissionLangPrefix = 'perm_cfield_';
|
||||
|
||||
/**
|
||||
* @brief [Node] ACP Restrictions
|
||||
@@ -110,6 +137,17 @@ class _Field extends \IPS\CustomField
|
||||
return $this->format;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* [Node] Does the currently logged in user have permission to edit permissions for this node?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canManagePermissions()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Node] Add/Edit Form
|
||||
*
|
||||
@@ -120,8 +158,9 @@ class _Field extends \IPS\CustomField
|
||||
{
|
||||
parent::form( $form );
|
||||
|
||||
|
||||
|
||||
unset( $form->elements['']['pf_search_type'] );
|
||||
unset( $form->elements['']['pf_search_type_on_off'] );
|
||||
\IPS\Member::loggedIn()->language()->words['field_displayoptions'] = \IPS\Member::loggedIn()->language()->addToStack('pfield_displayoptions');
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'downloads_field_location', $this->id ? $this->display_location : 'below', FALSE, array( 'options' => array( 'sidebar' => 'idm_cfield_sidebar', 'below' => 'idm_cfield_below', 'tab' => 'idm_cfield_tab' ) ), NULL, NULL, NULL, 'idm_field_location' ) );
|
||||
@@ -166,4 +205,28 @@ class _Field extends \IPS\CustomField
|
||||
|
||||
return parent::formatFormValues( $values );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get output for API
|
||||
*
|
||||
* @param \IPS\Member|NULL $authorizedMember The member making the API request or NULL for API Key / client_credentials
|
||||
* @param array $fieldValues Current values for a specific file
|
||||
* @return array
|
||||
* @apiresponse int id ID number
|
||||
* @apiresponse string name Name
|
||||
* @apiresponse string description Description
|
||||
* @apiresponse string value Raw field value from the database
|
||||
* @apiresponse string|int|array|boolean displayValue Parsed Field value with all field data
|
||||
*/
|
||||
public function apiOutput( \IPS\Member $authorizedMember = NULL, $fieldValues=array() )
|
||||
{
|
||||
$lang = $authorizedMember ? $authorizedMember->language() : Lang::load( Lang::defaultLanguage() );
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $lang->addToStack( 'downloads_field_' . $this->id ),
|
||||
'description' => $lang->addToStack( 'downloads_field_' . $this->id . '_desc' ),
|
||||
'value' => $fieldValues[ 'field_' . $this->id ] ?? null,
|
||||
'displayValue' => $this->apiValue( $fieldValues[ 'field_' . $this->id ] )
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,10 @@
|
||||
namespace IPS\downloads;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Db;
|
||||
use IPS\Patterns\ActiveRecordIterator;
|
||||
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
@@ -673,7 +677,7 @@ class _File extends \IPS\Content\Item implements
|
||||
/* Ignore future versions */
|
||||
$where[] = array( 'record_hidden=?', $pendingVersion );
|
||||
|
||||
$iterator = \IPS\Db::i()->select( 'record_id, record_location, record_thumb, record_no_watermark, record_default, record_type, record_realname, record_size', 'downloads_files_records', $where )->setKeyField( 'record_id' );
|
||||
$iterator = \IPS\Db::i()->select( 'record_id, record_location, record_thumb, record_no_watermark, record_default, record_type, record_realname, record_size', 'downloads_files_records', $where, 'record_time DESC' )->setKeyField( 'record_id' );
|
||||
$iterator = new \IPS\File\Iterator( $iterator, 'downloads_Screenshots', $valueField, FALSE, 'record_realname', $fileSizeField );
|
||||
$iterator = new \CachingIterator( $iterator, \CachingIterator::FULL_CACHE );
|
||||
|
||||
@@ -822,6 +826,7 @@ class _File extends \IPS\Content\Item implements
|
||||
{
|
||||
$return = array();
|
||||
$fields = $this->container()->cfields;
|
||||
$guest = new \IPS\Member;
|
||||
|
||||
if( $topic === TRUE AND $this->_fieldData === NULL )
|
||||
{
|
||||
@@ -1622,6 +1627,13 @@ class _File extends \IPS\Content\Item implements
|
||||
$customFieldValues = $item ? $item->customFields() : array();
|
||||
foreach ( $container->cfields as $k => $field )
|
||||
{
|
||||
/* Does the user have permission to enter data into this field? */
|
||||
$perm = $item ? 'edit' : 'add';
|
||||
if( !$field->can( $perm ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$_id = $field->id;
|
||||
$field->id = "{$bulkKey}{$field->id}";
|
||||
if ( $field->type === 'Editor' )
|
||||
@@ -1682,6 +1694,11 @@ class _File extends \IPS\Content\Item implements
|
||||
}
|
||||
foreach ( $this->container()->cfields as $field )
|
||||
{
|
||||
if( !array_key_exists( "downloads_field_{$field->id}", $values ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$helper = $field->buildHelper( NULL, NULL, $new ? NULL : $this );
|
||||
if ( $helper instanceof \IPS\Helpers\Form\Upload )
|
||||
{
|
||||
@@ -1755,6 +1772,11 @@ class _File extends \IPS\Content\Item implements
|
||||
$cfields = array();
|
||||
foreach ( $this->container()->cfields as $field )
|
||||
{
|
||||
if( !array_key_exists( "downloads_field_{$field->id}", $values ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$helper = $field->buildHelper( NULL, NULL, $new ? NULL : $this );
|
||||
if ( $helper instanceof \IPS\Helpers\Form\Upload )
|
||||
{
|
||||
@@ -2512,9 +2534,30 @@ class _File extends \IPS\Content\Item implements
|
||||
* @apiresponse int purchases Number of purchases
|
||||
* @apiresponse array renewalTerm File renewal term
|
||||
* @apiresponse bool hasPendingVersion Whether file has a new version pending. Will be NULL for client requests where the authorized member cannot upload new versions.
|
||||
* @apiresponse [\IPS\downloads\Field] customFields Custom field values for this file
|
||||
*/
|
||||
public function apiOutput( \IPS\Member $authorizedMember = NULL, $backup=NULL )
|
||||
{
|
||||
/* Figure out custom fields if any */
|
||||
$fields = array();
|
||||
try
|
||||
{
|
||||
$fieldValues = Db::i()->select( '*', 'downloads_ccontent', [ 'file_id=?', $this->id ] )->first();
|
||||
|
||||
foreach( new ActiveRecordIterator(
|
||||
Db::i()->select( '*', 'downloads_cfields', null, 'cf_position' ),
|
||||
Field::class
|
||||
) as $field )
|
||||
{
|
||||
if( !$authorizedMember or $field->canView( $authorizedMember ) )
|
||||
{
|
||||
$fields[ $field->id ] = $field->apiOutput( $authorizedMember, $fieldValues );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( \UnderflowException $e ) { }
|
||||
|
||||
|
||||
$return = array(
|
||||
'id' => $this->id,
|
||||
'title' => $backup ? $backup['b_filetitle'] : $this->name,
|
||||
@@ -2554,7 +2597,8 @@ class _File extends \IPS\Content\Item implements
|
||||
'rating' => $this->averageReviewRating(),
|
||||
'purchases' => $this->purchaseCount(),
|
||||
'renewalTerm' => $this->isPaid() ? $this->renewalTerm() : NULL,
|
||||
'hasPendingVersion' => ( !$authorizedMember OR $this->canEdit( $authorizedMember ) ) ? $this->hasPendingVersion() : NULL
|
||||
'hasPendingVersion' => ( !$authorizedMember OR $this->canEdit( $authorizedMember ) ) ? $this->hasPendingVersion() : NULL,
|
||||
'customFields' => $fields
|
||||
);
|
||||
|
||||
return $return;
|
||||
|
||||
@@ -325,6 +325,7 @@ class _PendingVersion extends \IPS\Content\Item implements \IPS\Content\Hideable
|
||||
public function delete()
|
||||
{
|
||||
$ids = [];
|
||||
/* @note SELECT_FROM_WRITE_SERVER added in pull #6913 "We update record_hidden=0 then delete record_hidden=1 pretty quickly afterwards before the change had propagated to the reader." */
|
||||
foreach( \IPS\Db::i()->select( '*', 'downloads_files_records', [ 'record_file_id=? AND record_hidden=1', $this->file_id ], NULL, NULL, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER ) as $record )
|
||||
{
|
||||
switch( $record['record_type'] )
|
||||
@@ -402,11 +403,13 @@ class _PendingVersion extends \IPS\Content\Item implements \IPS\Content\Hideable
|
||||
catch( \Exception $e ){}
|
||||
}
|
||||
|
||||
/* @note SELECT_FROM_WRITE_SERVER race condition */
|
||||
$file->size = \floatval( \IPS\Db::i()->select( 'SUM(record_size)', 'downloads_files_records', array( 'record_file_id=? AND record_type=? AND record_backup=0', $file->id, 'upload' ), NULL, NULL, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first() );
|
||||
|
||||
/* Work out the new primary screenshot */
|
||||
try
|
||||
{
|
||||
/* @note SELECT_FROM_WRITE_SERVER race condition */
|
||||
$file->primary_screenshot = \IPS\Db::i()->select( 'record_id', 'downloads_files_records', array( 'record_file_id=? AND ( record_type=? OR record_type=? ) AND record_backup=0 AND record_hidden=0', $file->id, 'ssupload', 'sslink' ), 'record_default DESC, record_id ASC', NULL, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
|
||||
}
|
||||
catch ( \UnderflowException $e ) { }
|
||||
|
||||
Reference in new issue
Block a user