Version 5.0.0 beta 5
This commit is contained in:
1 parent
2f24f9de48
commit
57d9db6ce2
218 files changed
+5331
-7416
No files matched your search
@@ -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="5000030" javascript_position="1000200">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/downloads" javascript_name="ips.downloads.browse.js" javascript_type="controller" javascript_version="5000031" 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="5000030" javascript_position="1000250">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/pending" javascript_name="ips.pending.buttons.js" javascript_type="controller" javascript_version="5000031" 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="5000030" 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="5000031" 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="5000030" javascript_position="1000100">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.linkedScreenshots.js" javascript_type="controller" javascript_version="5000031" 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="5000030" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -657,7 +657,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="5000030" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -779,7 +779,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="5000030" javascript_position="1000150">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -907,7 +907,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="5000030" javascript_position="1000150">/**
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.subscribe.js" javascript_type="controller" javascript_version="5000031" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -970,7 +970,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="5000030" javascript_position="1000050"><![CDATA[/* VIEW TEMPLATES */
|
||||
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="5000031" javascript_position="1000050"><![CDATA[/* VIEW TEMPLATES */
|
||||
ips.templates.set('downloads.submit.screenshot', " \
|
||||
<div class='ipsUploader__row ipsUploader__row--image ipsAttach {{#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' data-role='preview'>\
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="downloads" version="5000030">
|
||||
<app key="downloads" version="5000031">
|
||||
<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>
|
||||
|
||||
@@ -1733,7 +1733,7 @@
|
||||
<button class="ipsButton ipsButton--inherit ipsResponsive_hidePhone" disabled type='button'><i class="fa-solid fa-circle-info"></i><span>{lang="download_no_permission"}</span></button>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<a href='{{if settings.idm_antileech AND !$file->requiresDownloadConfirmation()}}{$file->url('download')->csrf()}{{else}}{$file->url('download')}{{endif}}' class='ipsButton ipsButton--primary ipsButton--large i-width_100p' {{if $file->requiresDownloadConfirmation()}}data-ipsDialog{{endif}} data-datalayer-postfetch >{lang="download_now"}</a>
|
||||
<a href='{{if settings.idm_antileech AND !$file->requiresDownloadConfirmation()}}{$file->url('download')->csrf()}{{else}}{$file->url('download')}{{endif}}' class='ipsButton ipsButton--primary ipsButton--large i-width_100p' {{if $file->requiresDownloadConfirmation()}}data-ipsDialog{{endif}} data-datalayer-postfetch ><i class="fa-solid fa-download"></i><span>{lang="download_now"}</span></a>
|
||||
{{endif}}
|
||||
</li>
|
||||
]]></template>
|
||||
@@ -2237,23 +2237,17 @@
|
||||
|
||||
<div class='i-flex_11'>
|
||||
{{if \count( $tabs )}}
|
||||
<div class='ipsTabs ipsJS_show' id='tabs_file' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_content_file'>
|
||||
<ul role='tablist'>
|
||||
<li>
|
||||
<a href='#ipsTabs_tabs_file_file_tab_desc_panel' id='file_tab_desc' class="ipsTabs__tab" role="tab" aria-selected="true">{lang="file_desc"}</a>
|
||||
</li>
|
||||
<i-tabs class='ipsTabs' id='ipsTabs_file' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_file_content'>
|
||||
<div role='tablist'>
|
||||
<button type="button" id='ipsTabs_file_desc' class="ipsTabs__tab" role="tab" aria-controls="ipsTabs_file_desc_panel" aria-selected="true">{lang="file_desc"}</button>
|
||||
{{foreach $tabs as $name}}
|
||||
<li>
|
||||
<a href='#ipsTabs_tabs_file_file_tab_{$name}_panel' id='file_tab_{$name}' class="ipsTabs__tab" role="tab" aria-selected="false">
|
||||
{lang="$name"}
|
||||
</a>
|
||||
</li>
|
||||
<button type="button" id='ipsTabs_file_{$name}' class="ipsTabs__tab" role="tab" aria-controls="ipsTabs_file_{$name}_panel" aria-selected="false">{lang="$name"}</button>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
<div id='ipsTabs_content_file' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
<div id='ipsTabs_tabs_file_file_tab_desc_panel' class="ipsTabs__panel" aria-labelledby="file_tab_desc" aria-hidden="false">
|
||||
</i-tabs>
|
||||
<div id='ipsTabs_file_content' class='ipsTabs__panels ipsTabs__panels--padded'>
|
||||
<div id='ipsTabs_file_desc_panel' class="ipsTabs__panel" role="tabpanel" aria-labelledby="ipsTabs_file_desc">
|
||||
{{endif}}
|
||||
<section class='ipsEntry i-padding_3'>
|
||||
<div class='ipsEntry__post'>
|
||||
@@ -2301,7 +2295,7 @@
|
||||
</div>
|
||||
{{foreach $cfields as $field}}
|
||||
{{if $field['location'] == 'tab'}}
|
||||
<div id='ipsTabs_tabs_file_file_tab_downloads_{$field['key']}_panel' class="ipsTabs__panel" aria-labelledby="file_tab_{$field['key']}" aria-hidden="false">
|
||||
<div id='ipsTabs_file_{$field['key']}_panel' class="ipsTabs__panel" role="tabpanel" aria-labelledby="ipsTabs_file_{$field['key']}" hidden>
|
||||
<div class='ipsRichText' data-controller='core.front.core.lightboxedImages'>
|
||||
{$field['value']|raw}
|
||||
</div>
|
||||
@@ -2363,7 +2357,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if $file->topic()}}
|
||||
<li><a href='{$file->topic()->url()}' title='{lang="dl_get_support_title"}' class='ipsButton ipsButton--inherit i-width_100p'>{lang="dl_get_support"}</a></li>
|
||||
<li><a href='{$file->topic()->url()}' title='{lang="dl_get_support_title"}' class='ipsButton ipsButton--large ipsButton--text i-width_100p'><i class="fa-regular fa-life-ring"></i><span>{lang="dl_get_support"}</span></a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
<h2 class='ipsTitle ipsTitle--h4 ipsTitle--margin'>{lang="file_information"}</h2>
|
||||
@@ -2423,11 +2417,13 @@
|
||||
{{endif}}
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
|
||||
{{if $file->canViewDownloaders() and $file->downloads}}
|
||||
<div class='i-margin-top_3'>
|
||||
<a href='{$file->url('log')}' title='{lang="view_downloader_list"}' class='ipsButton ipsButton--inherit i-width_100p' data-ipsDialog data-ipsDialog-size="wide" data-ipsDialog-title="{lang="downloaders"}"><i class="fa-solid fa-users"></i><span>{lang="who_downloaded"}</span></a>
|
||||
</div>
|
||||
<ul class='ipsButtons i-margin-top_3'>
|
||||
<li><a href='{$file->url('log')}' title='{lang="view_downloader_list"}' class='ipsButton ipsButton--inherit i-width_100p' data-ipsDialog data-ipsDialog-size="wide" data-ipsDialog-title="{lang="downloaders"}"><i class="fa-regular fa-circle-user"></i><span>{lang="who_downloaded"}</span></a></li>
|
||||
</ul>
|
||||
{{endif}}
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
@@ -2659,21 +2655,21 @@
|
||||
]]></template>
|
||||
<template template_group="widgets" template_name="downloadStats" template_data="$stats, $latestFile, $layout='table', $isCarousel=false" template_location="front" template_app="downloads"><![CDATA[<h3 class='ipsWidget__header'>{lang="block_downloadStats"}</h3>
|
||||
<div class='ipsWidget__content'>
|
||||
<ul class='ipsList ipsList--stats ipsList--stacked ipsList--border ipsList--fill'>
|
||||
<ul class='ipsList ipsList--stats ipsList--stats ipsList--stacked ipsList--border ipsList--fill'>
|
||||
<li>
|
||||
<span class='i-font-size_3 i-font-weight_600 i-color_hard'>{number="$stats['totalFiles']"}</span><br>
|
||||
<span class='i-color_soft i-font-weight_500'>{lang="total_files_front"}</span>
|
||||
<span class='ipsList__value'>{number="$stats['totalFiles']"}</span><br>
|
||||
<span class='ipsList__label'>{lang="total_files_front"}</span>
|
||||
</li>
|
||||
{{if $stats['totalComments']}}
|
||||
<li>
|
||||
<span class='i-font-size_3 i-font-weight_600 i-color_hard'>{number="$stats['totalComments']"}</span><br>
|
||||
<span class='i-color_soft i-font-weight_500'>{lang="total_comments"}</span>
|
||||
<span class='ipsList__value'>{number="$stats['totalComments']"}</span><br>
|
||||
<span class='ipsList__label'>{lang="total_comments"}</span>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if $stats['totalReviews']}}
|
||||
<li>
|
||||
<span class='i-font-size_3 i-font-weight_600 i-color_hard'>{number="$stats['totalReviews']"}</span><br>
|
||||
<span class='i-color_soft i-font-weight_500'>{lang="total_reviews"}</span>
|
||||
<span class='ipsList__value'>{number="$stats['totalReviews']"}</span><br>
|
||||
<span class='ipsList__label'>{lang="total_reviews"}</span>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if $latestFile}}
|
||||
@@ -2784,26 +2780,18 @@
|
||||
</div>
|
||||
</li>]]></template>
|
||||
<template template_group="widgets" template_name="topDownloads" template_data="$week, $month, $year, $all, $layout='table', $isCarousel=false" template_location="front" template_app="downloads"><![CDATA[<h3 class='ipsWidget__header'>{lang="block_topDownloads"}</h3>
|
||||
<div class='ipsTabs ipsTabs_small ipsTabs--stretch' id='elDownloadsTopDownloads' data-ipsTabBar data-ipsTabBar-contentArea='#elDownloadsTopDownloads_content'>
|
||||
<ul role="tablist">
|
||||
<li>
|
||||
<a href='#ipsTabs_elDownloadsTopDownloads_elDownloads_topDownloadsWeek_panel' id='elDownloads_topDownloadsWeek' class='ipsTabs__tab ipsTabs__tab--active' role="tab" aria-selected='true'>{lang="top_week"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='#ipsTabs_elDownloadsTopDownloads_elDownloads_topDownloadsMonth_panel' id='elDownloads_topDownloadsMonth' class='ipsTabs__tab' role="tab" aria-selected='false'>{lang="top_month"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='#ipsTabs_elDownloadsTopDownloads_elDownloads_topDownloadsYear_panel' id='elDownloads_topDownloadsYear' class='ipsTabs__tab' role="tab" aria-selected='false'>{lang="top_year"}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='#ipsTabs_elDownloadsTopDownloads_elDownloads_topDownloadsAll_panel' id='elDownloads_topDownloadsAll' class='ipsTabs__tab' role="tab" aria-selected='false'>{lang="top_alltime"}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{{$tabID = mt_rand();}}
|
||||
<i-tabs class='ipsTabs ipsTabs--small ipsTabs--stretch' id='ipsTabs_topDownloads{$tabID}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_topDownloads{$tabID}_content'>
|
||||
<div role="tablist">
|
||||
<button type="button" id='ipsTabs_topDownloads{$tabID}_Week' class='ipsTabs__tab' role="tab" aria-controls='ipsTabs_topDownloads{$tabID}_Week_panel' aria-selected='true'>{lang="top_week"}</button>
|
||||
<button type="button" id='ipsTabs_topDownloads{$tabID}_Month' class='ipsTabs__tab' role="tab" aria-controls='ipsTabs_topDownloads{$tabID}_Month_panel' aria-selected='false'>{lang="top_month"}</button>
|
||||
<button type="button" id='ipsTabs_topDownloads{$tabID}_Year' class='ipsTabs__tab' role="tab" aria-controls='ipsTabs_topDownloads{$tabID}_Year_panel' aria-selected='false'>{lang="top_year"}</button>
|
||||
<button type="button" id='ipsTabs_topDownloads{$tabID}_All' class='ipsTabs__tab' role="tab" aria-controls='ipsTabs_topDownloads{$tabID}_All_panel' aria-selected='false'>{lang="top_alltime"}</button>
|
||||
</div>
|
||||
{template="tabScrollers" app="core" group="global" location="global"}
|
||||
</div>
|
||||
|
||||
<section id='elDownloadsTopDownloads_content' class='ipsTabs__panels'>
|
||||
<div id="ipsTabs_elDownloadsTopDownloads_elDownloads_topDownloadsWeek_panel" class='ipsTabs__panel'>
|
||||
</i-tabs>
|
||||
<section id='ipsTabs_topDownloads{$tabID}_content' class='ipsTabs__panels'>
|
||||
<div id="ipsTabs_topDownloads{$tabID}_Week_panel" class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_topDownloads{$tabID}_Week">
|
||||
{{if \count( $week )}}
|
||||
<i-data>
|
||||
<ol class='ipsData ipsData--table ipsData--top-downloads-week'>
|
||||
@@ -2816,7 +2804,7 @@
|
||||
<p class='ipsEmptyMessage'>{lang="no_downloaded_files__week"}</p>
|
||||
{{endif}}
|
||||
</div>
|
||||
<div id="ipsTabs_elDownloadsTopDownloads_elDownloads_topDownloadsMonth_panel" class='ipsTabs__panel'>
|
||||
<div id="ipsTabs_topDownloads{$tabID}_Month_panel" class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_topDownloads{$tabID}_Month" hidden>
|
||||
{{if \count( $month )}}
|
||||
<i-data>
|
||||
<ol class='ipsData ipsData--table ipsData--top-downloads-month'>
|
||||
@@ -2829,7 +2817,7 @@
|
||||
<p class='ipsEmptyMessage'>{lang="no_downloaded_files__month"}</p>
|
||||
{{endif}}
|
||||
</div>
|
||||
<div id="ipsTabs_elDownloadsTopDownloads_elDownloads_topDownloadsYear_panel" class='ipsTabs__panel'>
|
||||
<div id="ipsTabs_topDownloads{$tabID}_Year_panel" class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_topDownloads{$tabID}_Year" hidden>
|
||||
{{if \count( $year )}}
|
||||
<i-data>
|
||||
<ol class='ipsData ipsData--table ipsData--top-downloads-year'>
|
||||
@@ -2842,7 +2830,7 @@
|
||||
<p class='ipsEmptyMessage'>{lang="no_downloaded_files__year"}</p>
|
||||
{{endif}}
|
||||
</div>
|
||||
<div id="ipsTabs_elDownloadsTopDownloads_elDownloads_topDownloadsAll_panel" class='ipsTabs__panel'>
|
||||
<div id="ipsTabs_topDownloads{$tabID}_All_panel" class='ipsTabs__panel' role="tabpanel" aria-labelledby="ipsTabs_topDownloads{$tabID}_All" hidden>
|
||||
{{if \count( $all )}}
|
||||
<i-data>
|
||||
<ol class='ipsData ipsData--table ipsData--top-downloads-all'>
|
||||
|
||||
@@ -278,5 +278,6 @@
|
||||
"5000027": "5.0.0 Beta 2",
|
||||
"5000028": "5.0.0 Beta 2",
|
||||
"5000029": "5.0.0 Beta 3",
|
||||
"5000030": "5.0.0 Beta 4"
|
||||
"5000030": "5.0.0 Beta 4",
|
||||
"5000031": "5.0.0 Beta 5"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000031,
|
||||
"name": "5.0.0 Beta 5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeeditor": true,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/view\/downloadButton",
|
||||
"front\/view\/view",
|
||||
"front\/widgets\/downloadStats",
|
||||
"front\/widgets\/topDownloads"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"categories": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"settings": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"layout_downloads_categories"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -1140,6 +1140,9 @@ Filter
|
||||
Db::i()->update( 'nexus_purchases', array( 'ps_pay_to' => $newAuthor->member_id ), array( 'ps_app=? AND ps_type=? AND ps_item_id=?', 'downloads', 'file', $this->id ) );
|
||||
}
|
||||
|
||||
/* Update any pending versions */
|
||||
Db::i()->update( 'downloads_files_pending', array( 'pending_member_id' => $newAuthor->member_id ), array( 'pending_file_id=?', $this->id ) );
|
||||
|
||||
parent::changeAuthor( $newAuthor, $log );
|
||||
}
|
||||
|
||||
@@ -2651,7 +2654,11 @@ Filter
|
||||
if( $screenshot = $this->primary_screenshot_thumb )
|
||||
{
|
||||
/* Now we need to copy the primary screenshot as an attachment to the first post */
|
||||
$topic = $this->topic();
|
||||
$topic = $this->topic( false );
|
||||
if( $topic === null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Delete any existing attachments */
|
||||
$delete = [];
|
||||
@@ -2673,27 +2680,32 @@ Filter
|
||||
Db::i()->delete( 'core_attachments', Db::i()->in( 'attach_id', $delete ) );
|
||||
}
|
||||
|
||||
/* Copy the screenshot and generate an attachment */
|
||||
$settings = json_decode( Settings::i()->upload_settings, true );
|
||||
$storageConfiguration = $settings['filestorage__core_Attachment'];
|
||||
$copy = $screenshot->copy( $storageConfiguration );
|
||||
|
||||
|
||||
$attachment = $copy->makeAttachment( md5( uniqid() ), $topic->author() );
|
||||
|
||||
Db::i()->insert( 'core_attachments_map', [
|
||||
'attachment_id' => $attachment['attach_id'],
|
||||
'location_key' => 'forums_Forums',
|
||||
'id1' => $topic->tid,
|
||||
'id2' => $topic->topic_firstpost
|
||||
] );
|
||||
|
||||
/* Now append to the post content */
|
||||
$content = $topic->firstComment()->content();
|
||||
$dimensions = $copy->getImageDimensions();
|
||||
|
||||
$attachment = Theme::i()->getTemplate( 'editor', 'core', 'global' )->attachedImage( (string) $copy, (string) $copy, $this->name, $attachment['attach_id'], $dimensions[0], $dimensions[1], $this->name );
|
||||
$content .= $attachment;
|
||||
try
|
||||
{
|
||||
/* Copy the screenshot and generate an attachment */
|
||||
/* @var SystemFile $screenshot */
|
||||
$settings = json_decode( Settings::i()->upload_settings, true );
|
||||
$storageConfiguration = $settings['filestorage__core_Attachment'];
|
||||
$copy = $screenshot->copy( $storageConfiguration );
|
||||
|
||||
$attachment = $copy->makeAttachment( md5( uniqid() ), $topic->author() );
|
||||
|
||||
Db::i()->insert( 'core_attachments_map', [
|
||||
'attachment_id' => $attachment['attach_id'],
|
||||
'location_key' => 'forums_Forums',
|
||||
'id1' => $topic->tid,
|
||||
'id2' => $topic->topic_firstpost
|
||||
] );
|
||||
|
||||
/* Now append to the post content */
|
||||
$dimensions = $copy->getImageDimensions();
|
||||
|
||||
$attachment = Theme::i()->getTemplate( 'editor', 'core', 'global' )->attachedImage( (string) $copy, (string) $copy, $this->name, $attachment['attach_id'], $dimensions[0], $dimensions[1], $this->name );
|
||||
$content .= $attachment;
|
||||
}
|
||||
catch( RuntimeException ){}
|
||||
|
||||
$topic->firstComment()->post = $content;
|
||||
$topic->firstComment()->save();
|
||||
|
||||
Reference in new issue
Block a user