Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -73,7 +73,9 @@ spl_autoload_register( function( $class )
|
||||
'last_review_by' => 'record_last_review_by',
|
||||
'last_review_name' => 'record_last_review_name',
|
||||
'updated' => 'record_last_comment',
|
||||
'meta_data' => 'record_meta_data'
|
||||
'meta_data' => 'record_meta_data',
|
||||
'author_name' => 'record_author_name',
|
||||
'is_anon' => 'record_is_anon',
|
||||
);
|
||||
public static \$pagePath;
|
||||
}
|
||||
@@ -122,11 +124,22 @@ EOF;
|
||||
if ( mb_substr( $class, 0, 18 ) === 'IPS\cms\Categories' and \is_numeric( mb_substr( $class, 18, 1 ) ) )
|
||||
{
|
||||
$databaseId = \intval( mb_substr( $class, 18 ) );
|
||||
|
||||
|
||||
$databases = \IPS\cms\Databases::databases();
|
||||
|
||||
if ( ! isset( $databases[ $databaseId ] ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$dbObject = $databases[ $databaseId ];
|
||||
|
||||
$data = <<<EOF
|
||||
namespace IPS\cms;
|
||||
class Categories{$databaseId} extends Categories
|
||||
{
|
||||
{
|
||||
use \IPS\Node\Statistics;
|
||||
|
||||
protected static \$multitons = array();
|
||||
protected static \$multitonMap = array();
|
||||
public static \$customDatabaseId = $databaseId;
|
||||
@@ -134,6 +147,11 @@ EOF;
|
||||
protected static \$containerIds = NULL;
|
||||
public static \$modPerm = 'cms{$databaseId}';
|
||||
public static \$permType = 'categories_{$databaseId}';
|
||||
|
||||
public static function fullyQualifiedType()
|
||||
{
|
||||
return '{$dbObject->_title} ' . \IPS\Member::loggedIn()->language()->addToStack( static::\$nodeTitle . '_sg' );
|
||||
}
|
||||
}
|
||||
EOF;
|
||||
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
"app_directory": "cms",
|
||||
"app_protected": 0,
|
||||
"app_website": null,
|
||||
"app_update_check": null
|
||||
"app_update_check": null,
|
||||
"app_hide_tab": 0
|
||||
}
|
||||
@@ -46,4 +46,5 @@
|
||||
<hook key="Topic"><![CDATA[{"type":"C","class":"\\IPS\\forums\\Topic"}]]></hook>
|
||||
<hook key="FriendlyUrl"><![CDATA[{"type":"C","class":"\\IPS\\Http\\Url\\Friendly"}]]></hook>
|
||||
<hook key="Output"><![CDATA[{"type":"C","class":"\\IPS\\Output"}]]></hook>
|
||||
<hook key="apiForum"><![CDATA[{"type":"C","class":"\\IPS\\forums\\api\\forums"}]]></hook>
|
||||
</build>
|
||||
@@ -10,17 +10,11 @@
|
||||
{{if $record->prefix()}}
|
||||
<span>{template="prefix" group="global" app="core" params="$record->prefix( TRUE ), $record->prefix()"}</span>
|
||||
{{endif}}
|
||||
<span class='ipsType_break ipsContained'>
|
||||
<a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}" class='ipsTruncate ipsTruncate_line'>
|
||||
{{if $record->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="cms_unread_record"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{$record->_title}
|
||||
</a>
|
||||
</span>
|
||||
{{if $record->mapped('pinned') || $record->mapped('featured') || $record->hidden() === -1 || $record->hidden() === 1}}
|
||||
{{if $record->isFutureDate() || $record->mapped('pinned') || $record->mapped('featured') || $record->hidden() === -1 || $record->hidden() === 1}}
|
||||
<span>
|
||||
{{if $record->hidden() === -1}}
|
||||
{{if $record->isFutureDate()}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$record->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span>
|
||||
{{elseif $record->hidden() === -1}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$record->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span>
|
||||
{{elseif $record->hidden() === 1}}
|
||||
<span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span>
|
||||
@@ -33,9 +27,16 @@
|
||||
{{endif}}
|
||||
</span>
|
||||
{{endif}}
|
||||
|
||||
<span class='ipsType_break ipsContained'>
|
||||
{{if $record->unread()}}
|
||||
<a href='{$record->url('getNewComment')}'><span class='ipsItemStatus' data-ipsTooltip title="{lang="cms_unread_record"}"><i class="fa fa-circle"></i></span></a>
|
||||
{{endif}}
|
||||
<a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}">{wordbreak="$record->_title"}</a>
|
||||
</span>
|
||||
</h2>
|
||||
<p class='ipsType_light ipsType_reset cmsInformation'>
|
||||
{lang="cms_byline" htmlsprintf="$record->author()->link(), $record->container()->url(), $record->container()->_title"}{datetime="$record->record_publish_date"}
|
||||
{lang="cms_byline" htmlsprintf="$record->author()->link( NULL, NULL, $record->isAnonymous() ), $record->container()->url(), $record->container()->_title"}{datetime="$record->record_publish_date"}
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
@@ -48,7 +49,7 @@
|
||||
{{endforeach}}
|
||||
</div>
|
||||
{{endif}}
|
||||
<section class='ipsType_normal ipsType_richText ipsType_break ipsSpacer_both' data-ipsTruncate data-ipsTruncate-size='7 lines' data-ipsTruncate-type='remove'>
|
||||
<section class='ipsType_normal ipsType_richText ipsType_break ipsSpacer_both ipsClearfix' data-ipsTruncate data-ipsTruncate-size='7 lines' data-ipsTruncate-type='remove'>
|
||||
{{if $record->record_image}}
|
||||
<div class="cCmsRecord_image">
|
||||
<img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
|
||||
@@ -135,8 +136,8 @@
|
||||
{{endif}}
|
||||
<h2 class='ipsType_pageTitle'>
|
||||
<div class='ipsType_break ipsContained'>
|
||||
<a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}" class='ipsTruncate ipsTruncate_line'>
|
||||
{$record->_title}
|
||||
<a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}">
|
||||
{wordbreak="$record->_title"}
|
||||
</a>
|
||||
</div>
|
||||
</h2>
|
||||
@@ -196,11 +197,11 @@
|
||||
<span>{template="prefix" group="global" app="core" params="$record->prefix( TRUE ), $record->prefix()"}</span>
|
||||
{{endif}}
|
||||
<span class='ipsType_break ipsContained'>
|
||||
<a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}" class='ipsTruncate ipsTruncate_line'>
|
||||
<a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}">
|
||||
{{if $record->unread()}}
|
||||
<span class='ipsItemStatus' data-ipsTooltip title="{lang="cms_unread_record"}"><i class="fa fa-circle"></i></span>
|
||||
{{endif}}
|
||||
{$record->_title}
|
||||
{wordbreak="$record->_title"}
|
||||
</a>
|
||||
</span>
|
||||
{{if $record->mapped('pinned') || $record->mapped('featured') || $record->hidden() === -1 || $record->hidden() === 1}}
|
||||
@@ -220,7 +221,7 @@
|
||||
{{endif}}
|
||||
</h2>
|
||||
<p class='ipsType_light ipsType_reset cmsInformation'>
|
||||
{lang="cms_byline" htmlsprintf="$record->author()->link(), $record->container()->url(), $record->container()->_title"}{datetime="$record->record_publish_date"}
|
||||
{lang="cms_byline" htmlsprintf="$record->author()->link( NULL, NULL, $record->isAnonymous() ), $record->container()->url(), $record->container()->_title"}{datetime="$record->record_publish_date"}
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
@@ -233,7 +234,7 @@
|
||||
{{endforeach}}
|
||||
</div>
|
||||
{{endif}}
|
||||
<section class='ipsType_normal ipsType_richText ipsType_break ipsSpacer_both' data-ipsTruncate data-ipsTruncate-size='7 lines' data-ipsTruncate-type='remove'>
|
||||
<section class='ipsType_normal ipsType_richText ipsType_break ipsSpacer_both ipsClearfix' data-ipsTruncate data-ipsTruncate-size='7 lines' data-ipsTruncate-type='remove'>
|
||||
{{if $record->record_image}}
|
||||
<div class="cCmsRecord_image">
|
||||
<img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
|
||||
@@ -320,8 +321,8 @@
|
||||
{{endif}}
|
||||
<h2 class='ipsType_pageTitle'>
|
||||
<span class='ipsType_break ipsContained'>
|
||||
<a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}" class='ipsTruncate ipsTruncate_line'>
|
||||
{$record->_title}
|
||||
<a href="{$record->url( "getPrefComment" )}" title="{lang="read_more_about" sprintf="$record->_title"}">
|
||||
{wordbreak="$record->_title"}
|
||||
</a>
|
||||
</span>
|
||||
</h2>
|
||||
@@ -405,7 +406,7 @@
|
||||
</span>
|
||||
</h2>
|
||||
<p class='ipsType_light ipsType_reset'>
|
||||
{lang="cms_byline" htmlsprintf="$record->author()->link(), $record->container()->url(), $record->container()->_title"}{datetime="$record->record_publish_date"}
|
||||
{lang="cms_byline" htmlsprintf="$record->author()->link( NULL, NULL, $record->isAnonymous() ), $record->container()->url(), $record->container()->_title"}{datetime="$record->record_publish_date"}
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
@@ -608,7 +609,10 @@
|
||||
{template="userPhoto" app="core" group="global" params="$comment->author(), 'mini', $comment->warningRef()"}
|
||||
<div>
|
||||
<h3 class='ipsComment_author ipsType_blendLinks'>
|
||||
<strong class='ipsType_normal'>{template="userLink" app="core" group="global" params="$comment->author(), $comment->warningRef()"}</strong>
|
||||
<strong class='ipsType_normal'>{template="userLink" app="core" group="global" params="$comment->author(), $comment->warningRef(), NULL, $comment->isAnonymous()"}</strong>
|
||||
{{if $comment instanceof \IPS\Content\Anonymous and $comment->isAnonymous() and \IPS\Member::loggedIn()->modPermission('can_view_anonymous_posters')}}
|
||||
<a data-ipsHover data-ipsHover-width="370" data-ipsHover-onClick href="{$comment->url( 'reveal' )->csrf()}"><span class="cAuthorPane_badge cAuthorPane_badge_small cAuthorPane_badge--anon" data-ipsTooltip title="{lang="post_anonymously_reveal"}"></span></a>
|
||||
{{endif}}
|
||||
{template="reputationBadge" group="global" app="core" params="$comment->author()"}
|
||||
</h3>
|
||||
<p class='ipsComment_meta ipsType_light ipsType_medium'>
|
||||
@@ -648,15 +652,12 @@
|
||||
{{if $comment->hidden() !== 1 && ( $comment->canReportOrRevoke() === TRUE || $comment->canEdit() || \count( $comment->sharelinks() ) || $comment->canPromoteToSocialMedia() || $comment->canDelete() || $comment->canSplit() || ( $comment instanceof \IPS\Content\Hideable AND ( ( !$comment->hidden() and $comment->canHide() ) || ( $comment->hidden() and $comment->canUnhide() ) ) ) || ( $comment->hidden() == -2 and \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') ) || \count( $item->commentMultimodActions() ) )}}
|
||||
<ul class='ipsList_reset ipsComment_tools'>
|
||||
<li>
|
||||
<a href='#elControls_{$comment->$idField}_menu' id='elControls_{$comment->$idField}' class='ipsComment_ellipsis' data-ipsMenu data-ipsMenu-appendTo='#comment-{$comment->$idField}_wrap'><i class='fa fa-ellipsis-h'></i></a>
|
||||
<ul id='elControls_{$comment->$idField}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
<a href='#elControlsComments_{$comment->$idField}_menu' id='elControlsComments_{$comment->$idField}' class='ipsComment_ellipsis' data-ipsMenu data-ipsMenu-appendTo='#comment-{$comment->$idField}_wrap'><i class='fa fa-ellipsis-h'></i></a>
|
||||
<ul id='elControlsComments_{$comment->$idField}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
{{if $comment->canReportOrRevoke() === TRUE}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}" data-action='reportComment' title='{lang="report_content"}'>{lang="report_reply"}</a></li>
|
||||
<li class='ipsMenu_item'><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_reply"}</a></li>
|
||||
{{endif}}
|
||||
|
||||
{{if \count( $comment->sharelinks() )}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->$idField ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-content='#elShareComment_{$comment->$idField}_menu' id='elShareComment_{$comment->$idField}' data-ipsDialog-title="{lang="share_this_comment"}" data-role='shareComment'>{lang="share_this_comment"}</a></li>
|
||||
{{endif}}
|
||||
|
||||
{{if $comment->canReportOrRevoke() === TRUE || \count( $comment->sharelinks() )}}
|
||||
{{if $comment->canEdit() || $comment->canPromoteToSocialMedia() || $comment->canDelete() || $comment->canSplit() || ( $comment instanceof \IPS\Content\Hideable AND ( ( !$comment->hidden() and $comment->canHide() ) || ( $comment->hidden() and $comment->canUnhide() ) ) ) || ( $comment->hidden() == -2 and \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
|
||||
@@ -679,7 +680,7 @@
|
||||
{{else}}
|
||||
{{if $comment instanceof \IPS\Content\Hideable}}
|
||||
{{if !$comment->hidden() and $comment->canHide()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('hide')}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
{{elseif $comment->hidden() and $comment->canUnhide()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('unhide')->csrf()}'>{lang="unhide"}</a></li>
|
||||
{{endif}}
|
||||
@@ -694,7 +695,7 @@
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('unfeature')->csrf()->setPage('page',\IPS\Request::i()->page)}'>{lang="unrecommend_content"}</a></li>
|
||||
{{endif}}
|
||||
{{if !$comment->isFeatured() AND $item->canFeatureComment()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('feature')->csrf()->setPage('page',\IPS\Request::i()->page)}' data-ipsDialog data-ipsDialog-title='{lang="recommend_comment"}' data-ipsDialog-remoteSubmit data-ipsDialog-size='narrow'>{lang="recommend_content"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('feature')->setPage('page',\IPS\Request::i()->page)}' data-ipsDialog data-ipsDialog-title='{lang="recommend_comment"}' data-ipsDialog-remoteSubmit data-ipsDialog-size='narrow'>{lang="recommend_content"}</a></li>
|
||||
{{endif}}
|
||||
{{if $comment->canPromoteToSocialMedia()}}
|
||||
<li class='ipsMenu_item'>{template="promoteLink" app="core" group="global" params="$comment"}</li>
|
||||
@@ -738,8 +739,8 @@
|
||||
{{endif}}
|
||||
{{if $comment->canEdit() || $comment->canSplit() || $comment->canHide()}}
|
||||
<li>
|
||||
<a href='#elControls_{$comment->$idField}_menu' id='elControls_{$comment->$idField}' data-ipsMenu data-ipsMenu-appendTo='#comment-{$comment->$idField}_wrap'>{lang="moderator_tools"} <i class='fa fa-caret-down'></i></a>
|
||||
<ul id='elControls_{$comment->$idField}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
<a href='#elControlsCommentsSub_{$comment->$idField}_menu' id='elControlsCommentsSub_{$comment->$idField}' data-ipsMenu data-ipsMenu-appendTo='#comment-{$comment->$idField}_wrap'>{lang="moderator_tools"} <i class='fa fa-caret-down'></i></a>
|
||||
<ul id='elControlsCommentsSub_{$comment->$idField}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
{{if $comment->canEdit()}}
|
||||
{{if $comment->mapped('first') and $comment->item()->canEdit()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->item()->url()->setQueryString( 'do', 'edit' )}'>{lang="edit"}</a></li>
|
||||
@@ -780,15 +781,8 @@
|
||||
<a href='{url="app=core&module=modcp&controller=modcp&tab=ip_tools&ip=$comment->ip_address" seoTemplate="modcp_ip_tools"}' class='ipsButton ipsButton_light ipsButton_small ipsButton_fullWidth'>{lang="more_about_ip_address"} <i class='fa fa-angle-right'></i></a>
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
<div class='ipsPadding ipsHide cPostShareMenu' id='elShareComment_{$comment->$idField}_menu'>
|
||||
<h5 class='ipsType_normal ipsType_reset'>{lang="link_to_comment"}</h5>
|
||||
<input type='text' value='{$comment->item()->url()->setQueryString( array( 'do' => 'findComment', 'comment' => $comment->$idField ) )}' class='ipsField_fullWidth'>
|
||||
{{if !$comment->item()->container()->disable_sharelinks}}
|
||||
<h5 class='ipsType_normal ipsType_reset ipsSpacer_top'>{lang="share_externally"}</h5>
|
||||
{template="sharelinks" group="global" app="core" params="$comment"}
|
||||
{{endif}}
|
||||
</div>
|
||||
|
||||
{template="sharemenu" group="global" app="core" params="$comment"}
|
||||
</div>]]></template>
|
||||
<template template_key="database_display_commentContainer" template_title="commentContainer" template_desc="" template_location="database" template_group="display" template_params="$item, $comment, $votes=array(), $otherClasses=''" template_app="" template_type="template"><![CDATA[{{$idField = $comment::$databaseColumnId;}}
|
||||
{{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}}
|
||||
@@ -931,7 +925,10 @@
|
||||
{template="userPhoto" app="core" group="global" params="$record->author(), 'tiny', $record->warningRef()"}
|
||||
<div>
|
||||
<p class='ipsType_reset ipsType_large ipsType_blendLinks'>
|
||||
{lang="content_record_started_by" htmlsprintf="$record->author()->link()"}
|
||||
{lang="content_record_started_by" htmlsprintf="$record->author()->link( NULL, NULL, $record->isAnonymous() )"}
|
||||
{{if $record->isAnonymous() and \IPS\Member::loggedIn()->modPermission('can_view_anonymous_posters')}}
|
||||
<a data-ipsHover data-ipsHover-width="370" data-ipsHover-onClick href="{$record->url( 'reveal' )->csrf()}"><span class="cAuthorPane_badge cAuthorPane_badge_small cAuthorPane_badge--anon" data-ipsTooltip title="{lang="post_anonymously_reveal"}"></span></a>
|
||||
{{endif}}
|
||||
{{if $record->editLine()}}
|
||||
<span class='ipsType_light ipsType_medium ipsType_reset'>
|
||||
({lang="edited_lc"})
|
||||
@@ -977,7 +974,7 @@
|
||||
<img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
|
||||
</div>
|
||||
{{endif}}
|
||||
<section class="ipsType_richText ipsType_normal" data-controller='core.front.core.lightboxedImages'>{$record->_content|raw}</section>
|
||||
<section class="ipsType_richText ipsContained ipsType_normal" data-controller='core.front.core.lightboxedImages'>{$record->_content|raw}</section>
|
||||
|
||||
{{if $record->editLine()}}
|
||||
{$record->editLine()|raw}
|
||||
@@ -1019,7 +1016,7 @@
|
||||
<li class='ipsMenu_item'><a href='{$record->url('edit')}' title='{lang="edit"}'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
{{if $record->canReportOrRevoke() === TRUE}}
|
||||
<li class='ipsMenu_item'><a href='{$record->url('report')}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}">{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$record->url('report')}' {{if member.member_id or \IPS\Helpers\Form\Captcha::supportsModal()}}data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}"{{endif}} title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}">{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}</a></li>
|
||||
{{endif}}
|
||||
{{if ( $record->canEdit() || $record->canReportOrRevoke() === TRUE ) AND ( (\IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') AND $record->hidden() == -2 ) OR ( $record->isFutureDate() and $record::canFuturePublish( NULL, $record->container() ) ) OR $record->canFeature() OR $record->canUnfeature() OR $record->canPin() OR $record->canUnpin() OR $record->canHide() OR $record->canUnhide() OR $record->canLock() OR $record->canUnlock() OR $record->canMove() OR $record->canDelete() OR $record->canOnMessage( 'add' ) OR \IPS\Member::loggedIn()->modPermission('can_view_moderation_log') )}}
|
||||
<li class='ipsMenu_sep'><hr></li>
|
||||
@@ -1045,7 +1042,7 @@
|
||||
<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unpin' ) )}' title='{lang="unpin_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="unpin"}</a></li>
|
||||
{{endif}}
|
||||
{{if $record->canHide()}}
|
||||
<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'hide' ) )}' title='{lang="hide_title_record" sprintf="$record::database()->recordWord(1)"}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$record->url('moderate')->setQueryString( array( 'action' => 'hide' ) )}' title='{lang="hide_title_record" sprintf="$record::database()->recordWord(1)"}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
{{endif}}
|
||||
{{if $record->canUnhide()}}
|
||||
<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unhide' ) )}' title='{{if $record->hidden() === 1}}{lang="approve_title_record" sprintf="$record::database()->recordWord(1)"}{{else}}{lang="unhide_title_record" sprintf="$record::database()->recordWord(1)"}{{endif}}'>{{if $record->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li>
|
||||
@@ -1057,23 +1054,23 @@
|
||||
<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unlock' ) )}' title='{lang="unlock_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="unlock"}</a></li>
|
||||
{{endif}}
|
||||
{{if $record->canMove()}}
|
||||
<li class='ipsMenu_item'><a href='{$record->url('move')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="move"}" title='{lang="move_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="move"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$record->url('move')}' data-ipsDialog data-ipsDialog-title="{lang="move"}" title='{lang="move_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="move"}</a></li>
|
||||
{{endif}}
|
||||
{{if $record->canDelete()}}
|
||||
<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'delete' ) )}' data-confirm title='{lang="delete_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="delete"}</a></li>
|
||||
{{endif}}
|
||||
{{if $record->canOnMessage( 'add' )}}
|
||||
<li class='ipsMenu_item'><a href='{$record->url('messageForm')->csrf()}' data-ipsDialog data-ipsDialog-title='{lang="add_message"}'>{lang="add_message"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$record->url('messageForm')}' data-ipsDialog data-ipsDialog-title='{lang="add_message"}'>{lang="add_message"}</a></li>
|
||||
{{endif}}
|
||||
{{if \IPS\Member::loggedIn()->modPermission('can_view_moderation_log')}}
|
||||
<li class='ipsMenu_sep'><hr></li>
|
||||
<li class="ipsMenu_item"><a href='{$record->url()->csrf()->setQueryString( array( 'do' => 'modLog' ) )}' data-ipsDialog data-ipsDialog-title='{lang="moderation_history"}'>{lang="moderation_history"}</a></li>
|
||||
<li class="ipsMenu_item"><a href='{$record->url()->setQueryString( array( 'do' => 'modLog' ) )}' data-ipsDialog data-ipsDialog-title='{lang="moderation_history"}'>{lang="moderation_history"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</ul>
|
||||
</li>
|
||||
{{elseif $record->canReportOrRevoke() === TRUE}}
|
||||
<li><a href='{$record->url('report')}' class='ipsButton ipsButton_link ipsButton_verySmall ipsButton_fullWidth' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}">{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}</a></li>
|
||||
<li><a href='{$record->url('report')}' class='ipsButton ipsButton_link ipsButton_verySmall ipsButton_fullWidth' {{if member.member_id or \IPS\Helpers\Form\Captcha::supportsModal()}}data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}"{{endif}} title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}">{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}</a></li>
|
||||
{{endif}}
|
||||
|
||||
{{if $record->canManageRevisions()}}
|
||||
@@ -1185,11 +1182,11 @@
|
||||
<div class='ipsType_reset ipsType_light ipsType_blendLinks ipsComment_toolWrap'>
|
||||
<ul class='ipsList_reset ipsComment_tools'>
|
||||
<li>
|
||||
<a href='#elControls_{$review->id}_menu' class='ipsComment_ellipsis' id='elControls_{$review->id}' title='{lang="more_options"}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'><i class='fa fa-ellipsis-h'></i></a>
|
||||
<ul id='elControls_{$review->id}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
<a href='#elControlsReviews_{$review->id}_menu' class='ipsComment_ellipsis' id='elControlsReviews_{$review->id}' title='{lang="more_options"}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'><i class='fa fa-ellipsis-h'></i></a>
|
||||
<ul id='elControlsReviews_{$review->id}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
{{if $review->canReportOrRevoke() === TRUE}}
|
||||
<li class='ipsMenu_item'>
|
||||
<a href='{$review->url('report')}' data-ipsDialog data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-ipsDialog-flashMessage='{lang="report_submit_success"}' data-ipsDialog-title="{lang="report"}" data-action='reportComment' title='{lang="report"}'>{lang="report"}</a>
|
||||
<a href='{$review->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"}'>{lang="report"}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
<li class='ipsMenu_item'>
|
||||
@@ -1211,7 +1208,7 @@
|
||||
{{else}}
|
||||
{{if $review instanceof \IPS\Content\Hideable}}
|
||||
{{if !$review->hidden() and $review->canHide()}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$review->url('hide')}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
{{elseif $review->hidden() and $review->canUnhide()}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('unhide')->csrf()}'>{lang="unhide"}</a></li>
|
||||
{{endif}}
|
||||
@@ -1243,14 +1240,14 @@
|
||||
<div class='ipsFlex ipsFlex-ai:center ipsFlex-jc:between ipsMargin_bottom:half'>
|
||||
<h4 class='ipsType_sectionHead ipsType_medium ipsType_bold'>{lang="review_response_title"}</h4>
|
||||
|
||||
<a href='#elControls_{$review->id}_response_menu' class='ipsComment_ellipsis ipsType_light' id='elControls_{$review->id}_response' title='{lang="more_options"}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'><i class='fa fa-ellipsis-h'></i></a>
|
||||
<a href='#elControlsReviews_{$review->id}_response_menu' class='ipsComment_ellipsis ipsType_light' id='elControlsReviews_{$review->id}_response' title='{lang="more_options"}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'><i class='fa fa-ellipsis-h'></i></a>
|
||||
</div>
|
||||
<div data-role="reviewResponse" class="ipsType_richText ipsType_normal ipsContained" data-controller='core.front.core.lightboxedImages'>
|
||||
{$review->mapped('author_response')|raw}
|
||||
</div>
|
||||
|
||||
{{if $review->canEditResponse() OR $review->canDeleteResponse()}}
|
||||
<ul class='ipsMenu ipsMenu_narrow ipsHide' id='elControls_{$review->id}_response_menu'>
|
||||
<ul class='ipsMenu ipsMenu_narrow ipsHide' id='elControlsReviews_{$review->id}_response_menu'>
|
||||
{{if $review->canEditResponse()}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('editResponse')}' data-ipsDialog data-ipsDialog-title='{lang="review_author_respond"}'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
@@ -1269,12 +1266,12 @@
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</div>
|
||||
{{if ( member.member_id and ( !$review->mapped('votes_data') or !array_key_exists( member.member_id, json_decode( $review->mapped('votes_data'), TRUE ) ) ) ) || $review->canEdit() || $review->canDelete() || $review->canHide() || $review->canUnhide() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') ) || ( $review->hidden() !== 1 && \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Reactable' ) and settings.reputation_enabled and $review->hasReactionBar() )}}
|
||||
{{if ( member.member_id and ( !$review->mapped('votes_data') or !array_key_exists( member.member_id, json_decode( $review->mapped('votes_data'), TRUE ) ) ) ) || $review->canEdit() || $review->canDelete() || $review->canHide() || $review->canUnhide() || $review->canRespond() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') ) || ( $review->hidden() !== 1 && \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Reactable' ) and settings.reputation_enabled and $review->hasReactionBar() )}}
|
||||
<div class='ipsItemControls'>
|
||||
{{if $review->hidden() !== 1 && \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
|
||||
{template="reputation" group="global" app="core" params="$review"}
|
||||
{{endif}}
|
||||
{{if $review->canEdit() || $review->canDelete() || $review->canHide() || $review->canUnhide() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
|
||||
{{if $review->canEdit() || $review->canDelete() || $review->canHide() || $review->canUnhide() || $review->canRespond() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
|
||||
<ul class='ipsComment_controls ipsClearfix ipsItemControls_left' data-role="commentControls">
|
||||
{{if $review->hidden() === 1 && ( $review->canUnhide() || $review->canDelete() )}}
|
||||
{{if $review->canUnhide()}}
|
||||
@@ -1285,8 +1282,8 @@
|
||||
{{endif}}
|
||||
{{if $review->canEdit() || $review->canSplit() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
|
||||
<li>
|
||||
<a href='#elControls_{$review->id}_menu' id='elControls_{$review->id}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'>{lang="options"} <i class='fa fa-caret-down'></i></a>
|
||||
<ul id='elControls_{$review->id}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
<a href='#elControlsReviewsSub_{$review->id}_menu' id='elControlsReviewsSub_{$review->id}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'>{lang="options"} <i class='fa fa-caret-down'></i></a>
|
||||
<ul id='elControlsReviewsSub_{$review->id}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
{{if $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content')}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('restore')->csrf()}' data-confirm data-confirmSubMessage='{lang="restore_as_visible_desc"}'>{lang="restore_as_visible"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$review->url('restore')->csrf()->setQueryString( 'restoreAsHidden', 1 )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li>
|
||||
@@ -1320,11 +1317,8 @@
|
||||
{{endif}}
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
<div class='ipsPadding ipsHide cPostShareMenu' id='elShareReview_{$review->id}_menu'>
|
||||
<h5 class='ipsType_normal ipsType_reset'>{lang="link_to_comment"}</h5>
|
||||
<input type='text' value='{$review->item()->url()->setQueryString( array( 'do' => 'findReview', 'review' => $review->id ) )}' class='ipsField_fullWidth'>
|
||||
</div>
|
||||
|
||||
{template="sharemenu" group="global" app="core" params="$review"}
|
||||
</div>]]></template>
|
||||
<template template_key="database_display_reviewContainer" template_title="reviewContainer" template_desc="" template_location="database" template_group="display" template_params="$item, $review" template_app="" template_type="template"><![CDATA[{{if $review->isIgnored()}}
|
||||
<div class='ipsComment ipsComment_ignored ipsPad_half ipsType_light'>
|
||||
@@ -1865,11 +1859,9 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
{{if $table->pages > 1}}
|
||||
<div data-role="tablePagination">
|
||||
{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit"}
|
||||
</div>
|
||||
{{endif}}
|
||||
<div data-role="tablePagination" {{if $table->pages <= 1}}class='ipsHide'{{endif}}>
|
||||
{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit"}
|
||||
</div>
|
||||
</div>
|
||||
{{if $table->canModerate()}}
|
||||
<form action="{$table->baseUrl->csrf()}" method="post" data-role='moderationTools' data-ipsPageAction>
|
||||
@@ -1956,13 +1948,9 @@
|
||||
</form>
|
||||
{{endif}}
|
||||
|
||||
{{if $table->pages > 1}}
|
||||
<div class="ipsButtonBar ipsPad_half ipsClearfix ipsClear">
|
||||
<div data-role="tablePagination">
|
||||
{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit, TRUE, $table->getPaginationKey()"}
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}
|
||||
<div class="ipsButtonBar ipsPad_half ipsClearfix ipsClear {{if $table->pages <= 1}}ipsHide{{endif}}" data-role="tablePagination">
|
||||
{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit, TRUE, $table->getPaginationKey()"}
|
||||
</div>
|
||||
</div>]]></template>
|
||||
<template template_key="database_listing_filterMessage" template_title="filterMessage" template_desc="" template_location="database" template_group="listing" template_params="$activeFilters, $category" template_app="" template_type="template"><![CDATA[<div class='ipsMessage ipsMessage_general'>
|
||||
<a href='{$category->url()->csrf()->setQueryString( array( "do" => "clearFilters", 'd' => \IPS\cms\Databases\Dispatcher::i()->databaseId ) )}' class='ipsPos_right ipsButton ipsButton_veryLight ipsButton_verySmall'>{lang="cms_database_filtered_clear"}</a>
|
||||
@@ -1996,6 +1984,9 @@
|
||||
</div>
|
||||
{{endif}}
|
||||
<div class='ipsDataItem_main'>
|
||||
{{if $row->groupsPosted}}
|
||||
{template="groupPostedBadges" group="global" app="core" location="front" params="$row->groupsPosted, 'topic_posted_in_groups', 'ipsResponsive_hidePhone ipsMargin_left ipsPos_right'"}
|
||||
{{endif}}
|
||||
<h4 class='ipsDataItem_title ipsContained_container'>
|
||||
{{if $row->locked()}}
|
||||
<span><i class='fa fa-lock' data-ipsTooltip title='{lang="content_locked_record"}'></i></span>
|
||||
@@ -2041,7 +2032,7 @@
|
||||
</div>
|
||||
{{endif}}
|
||||
<div class='ipsDataItem_meta ipsType_reset ipsType_light ipsType_blendLinks'>
|
||||
<span>{lang="byline" htmlsprintf="$row->author()->link( $row->warningRef() )"}{datetime="$row->_publishDate"}</span>
|
||||
<span>{lang="byline" htmlsprintf="$row->author()->link( $row->warningRef(), NULL, $row->isAnonymous() )"}{datetime="$row->_publishDate"}</span>
|
||||
{{if \count( $row->tags() )}}
|
||||
|
||||
{template="tags" group="global" app="core" params="$row->tags(), true"}
|
||||
@@ -2049,6 +2040,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<ul class='ipsDataItem_stats'>
|
||||
{{if $row->groupsPosted}}
|
||||
<li class='ipsResponsive_showPhone ipsMargin:none'>
|
||||
{template="groupPostedBadges" group="global" app="core" location="front" params="$row->groupsPosted, 'topic_posted_in_groups'"}
|
||||
</li>
|
||||
{{endif}}
|
||||
{{foreach $row->stats(TRUE) as $k => $v}}
|
||||
<li {{if \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}>
|
||||
<span class='ipsDataItem_stats_number'>{number="$v"}</span>
|
||||
@@ -2082,9 +2078,13 @@
|
||||
<li>
|
||||
{{if $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_COMMENT}}
|
||||
{{if $row->mapped('num_comments')}}
|
||||
{lang="cms_row_commented_by" htmlsprintf="$row->lastCommenter()->link()"}
|
||||
{{if $row->mapped('last_comment_anon')}}
|
||||
{template="userLink" app="core" group="global" params="$row->author(), NULL, NULL, TRUE"}
|
||||
{{else}}
|
||||
{lang="cms_row_commented_by" htmlsprintf="$row->lastCommenter()->link()"}
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{lang="cms_row_added_by" htmlsprintf="$row->author()->link()"}
|
||||
{lang="cms_row_added_by" htmlsprintf="$row->author()->link( NULL, NULL, $row->isAnonymous() )"}
|
||||
{{endif}}
|
||||
{{elseif $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_EDIT}}
|
||||
{{if $row->record_edit_time > 0}}
|
||||
@@ -2155,10 +2155,10 @@
|
||||
<template template_key="page_page_builder_two_columns" template_title="two_columns" template_desc="" template_location="page" template_group="page_builder" template_params="$page, $widgets" template_app="" template_type="template"><![CDATA[<div>
|
||||
<div class='ipsGrid ipsGrid_collapsePhone'>
|
||||
<div class='ipsGrid_span6'>
|
||||
{template="widgetContainer" group="pages" app="cms" params="'col1', $widgets, 'horizontal'"}
|
||||
{template="widgetContainer" group="pages" app="cms" params="'col1', $widgets, 'vertical'"}
|
||||
</div>
|
||||
<div class='ipsGrid_span6'>
|
||||
{template="widgetContainer" group="pages" app="cms" params="'col2', $widgets, 'horizontal'"}
|
||||
{template="widgetContainer" group="pages" app="cms" params="'col2', $widgets, 'vertical'"}
|
||||
</div>
|
||||
</div>
|
||||
</div>]]></template>
|
||||
|
||||
@@ -751,6 +751,34 @@
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"record_author_name": {
|
||||
"name": "record_author_name",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
},
|
||||
"record_is_anon": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "0",
|
||||
"length": 1,
|
||||
"name": "record_is_anon",
|
||||
"type": "TINYINT",
|
||||
"unsigned": true,
|
||||
"values": [
|
||||
|
||||
],
|
||||
"zerofill": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
|
||||
@@ -50,5 +50,9 @@
|
||||
"Output": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\Output"
|
||||
},
|
||||
"apiForum": {
|
||||
"type": "C",
|
||||
"class": "\\IPS\\forums\\api\\forums"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="cms">
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="105100" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="106107" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -142,7 +142,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="105100" javascript_position="1000150">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="106107" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -187,7 +187,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="105100" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="106107" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -263,7 +263,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="105100" javascript_position="1000150"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="106107" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -398,7 +398,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="105100" javascript_position="1000200">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="106107" javascript_position="1000200">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -435,7 +435,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="105100" javascript_position="1000300"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="106107" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1075,7 +1075,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="105100" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="106107" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1121,7 +1121,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="105100" javascript_position="1000250"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="106107" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1243,7 +1243,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="105100" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="106107" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1355,7 +1355,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="105100" javascript_position="1000100">/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="106107" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1410,7 +1410,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="105100" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="106107" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1460,7 +1460,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="105100" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="106107" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1532,7 +1532,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="105100" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="106107" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2479,7 +2479,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="105100" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="106107" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2822,7 +2822,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="105100" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="106107" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2987,7 +2987,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="105100" javascript_position="1000050">/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="106107" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -3012,6 +3012,13 @@
|
||||
* @returns {void}
|
||||
*/
|
||||
submitChange: function (e) {
|
||||
|
||||
var key = this.scope.find('[name="_variables_fileid"]').val();
|
||||
$('[data-fileid="' + key + '"]')
|
||||
.attr('data-state', 'unsaved')
|
||||
.find('[data-action="closeTab"]')
|
||||
.html( ips.templates.render('templates.editor.unsaved') );
|
||||
|
||||
this.trigger( 'variablesUpdated.templates', {
|
||||
fileID: this.scope.find('[name="_variables_fileid"]').val(),
|
||||
value: this.scope.find('[data-role="variables"]').val(),
|
||||
@@ -3025,7 +3032,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.builder.area.js" javascript_type="mixins" javascript_version="105100" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.builder.area.js" javascript_type="mixins" javascript_version="106107" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -3075,6 +3082,7 @@
|
||||
} );
|
||||
|
||||
ips.getAjax()( ips.getSetting('baseURL') + 'index.php?app=cms&module=pages&controller=builder&do=saveOrder&orientation=' + this._orientation, {
|
||||
method: 'POST',
|
||||
data: {
|
||||
order: order,
|
||||
pageID: $('#elCmsPageWrap').attr('data-pageid'),
|
||||
@@ -3094,7 +3102,7 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.builder.block.js" javascript_type="mixins" javascript_version="105100" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.builder.block.js" javascript_type="mixins" javascript_version="106107" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -3202,7 +3210,34 @@
|
||||
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="105100" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="mixins" javascript_name="ips.cms.comment.js" javascript_type="mixins" javascript_version="106107" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
* ips.cms.comment.js - Front-end mixin for comments
|
||||
*
|
||||
* Author: Matt Mecham
|
||||
*/
|
||||
;( function($, _, undefined){
|
||||
"use strict";
|
||||
|
||||
ips.controller.mixin('comment', 'core.front.core.comment', true, function () {
|
||||
/**
|
||||
* Switch off table loading after results are fetched
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
this.after('saveEditCommentDone', function () {
|
||||
this.scope
|
||||
.find('[data-role="commentContent"]')
|
||||
.addClass('sm:ipsPadding_vertical:half')
|
||||
.addClass('ipsPadding_vertical')
|
||||
.addClass('ipsPadding_horizontal')
|
||||
.removeClass('ipsPadding_bottom')
|
||||
});
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="106107" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<ul class='ipsGrid' data-ipsGrid data-ipsGrid-minItemSize='100' data-ipsGrid-maxItemSize='200'>\
|
||||
{{{contents}}}\
|
||||
</ul>\
|
||||
@@ -3219,7 +3254,7 @@ ips.templates.set( 'templates.media.noSearchResults', "\
|
||||
{{#lang}}mediaNoResults{{/lang}}\
|
||||
</div>\
|
||||
");]]></file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="105100" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="106107" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
/* TEMPLATECEPTION */
|
||||
ips.templates.set('templates.editor.newTab', " \
|
||||
<li data-fileid='{{fileid}}' data-location='{{location}}'>\
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="cms" version="105100">
|
||||
<app key="cms" version="106107">
|
||||
<word key="__app_cms" js="0">Pages</word>
|
||||
<word key="menutab__cms" js="0">Pages</word>
|
||||
<word key="menutab__cms_icon" js="0">files-o</word>
|
||||
@@ -9,7 +9,9 @@
|
||||
<word key="__indefart_content_record_reviews_title" js="0">a review</word>
|
||||
<word key="__defart_content_db_lang_sl" js="0">%s</word>
|
||||
<word key="__defart_content_record_comments_title" js="0">comment</word>
|
||||
<word key="__defart_content_record_comments_title_plural" js="0">{!#[1:comment][?:comments]}</word>
|
||||
<word key="__defart_content_record_reviews_title" js="0">review</word>
|
||||
<word key="__defart_content_record_reviews_title_plural" js="0">{!#[1:review][?:reviews]}</word>
|
||||
<word key="rebuilding_cms_database_categories" js="0">Rebuilding %s categories</word>
|
||||
<word key="rebuilding_cms_database_reciprocal_map" js="0">Rebuilding %s reciprocal maps (field ID %s)</word>
|
||||
<word key="rebuilding_cms_database_records" js="0">Rebuilding %s records</word>
|
||||
@@ -64,7 +66,7 @@
|
||||
<word key="can_feature_comments_record" js="0">Can recommend comments on %s?</word>
|
||||
<word key="can_unfeature_comments_record" js="0">Can remove comments recommendations on %s?</word>
|
||||
<word key="can_add_item_message_record" js="0">Can add messages to %s?</word>
|
||||
<word key="can_edit_item_message_record" js="0">Can edit messages on %S?</word>
|
||||
<word key="can_edit_item_message_record" js="0">Can edit messages on %s?</word>
|
||||
<word key="can_delete_item_message_record" js="0">Can delete messages on %s?</word>
|
||||
<word key="can_copy_topic_database" js="0">Can copy topics to a database?</word>
|
||||
<word key="can_copy_topic_database_desc" js="0">If enabled, then the user can copy topics in forums they are allowed to moderate in, to databases they are allowed to create records in</word>
|
||||
@@ -258,6 +260,7 @@
|
||||
<word key="cms_block_list_key" js="0">{block="%s"}</word>
|
||||
<word key="cms_theme_template_custom" js="0">Custom Templates</word>
|
||||
<word key="cms_theme_template_default" js="0">Default Templates</word>
|
||||
<word key="delete_db_confirm_detail_msg" js="0">Any fields in other databases linking to this database will be deleted automatically.</word>
|
||||
<word key="page_database_display" js="0">Contains database: %s</word>
|
||||
<word key="content_edit_folder" js="0">Edit Folder</word>
|
||||
<word key="content_add_folder" js="0">Add Folder</word>
|
||||
@@ -435,10 +438,10 @@
|
||||
<word key="field_display_display_json_badge" js="0">Display View Format</word>
|
||||
<word key="field_display_custom" js="0">Custom</word>
|
||||
<word key="field_display_display_json_custom" js="0">Display Custom Format</word>
|
||||
<word key="field_display_display_json_custom_desc" js="0"><![CDATA[Use {$label} to show the field label, {$value} to show the display field value and {$formValue} to show the value from the form.<br />For example, your dropdown may use a key of 'open' with a value of 'Open Record'. In this example, {$formValue} would contain 'open' and {$value} would contain 'Open Record'. You may need to add the '|raw' modifier to preserve HTML, i.e. {$value|raw}, but this can introduce security issues if not used carefully. You may use Invision Community template logic such as {{if}}.<br>If using an Address field, you can show a map by using {map} and the address with {address}.<br>If using mulitple uploads, $value is an array of File Objects.]]></word>
|
||||
<word key="field_display_display_json_custom_desc" js="0"><![CDATA[Use {$label} to show the field label, {$value} to show the display field value and {$formValue} to show the value from the form.<br />For example, your dropdown may use a key of 'open' with a value of 'Open Record'. In this example, {$formValue} would contain 'open' and {$value} would contain 'Open Record'. You may need to add the '|raw' modifier to preserve HTML, i.e. {$value|raw}, but this can introduce security issues if not used carefully. You may use Invision Community template logic such as {{if}}.<br>If using an Address field, you can show a map by using {map} and the address with {address}.<br>If using multiple uploads, $value is an array of File Objects.]]></word>
|
||||
<word key="field_display_listing_json_badge" js="0">Listing View Format</word>
|
||||
<word key="field_display_listing_json_custom" js="0">Listing Custom Format</word>
|
||||
<word key="field_display_listing_json_custom_desc" js="0"><![CDATA[Use {$label} to show the field label, {$value} to show the display field value and {$formValue} to show the value from the form.<br />For example, your dropdown may use a key of 'open' with a value of 'Open Record'. In this example, {$formValue} would contain 'open' and {$value} would contain 'Open Record'. You may need to add the '|raw' modifier to preserve HTML, i.e. {$value|raw}, but this can introduce security issues if not used carefully. You may use Invision Community template logic such as {{if}}.<br>If using an Address field, you can show a map by using {map} and the address with {address}.<br>If using mulitple uploads, $value is an array of File Objects.]]></word>
|
||||
<word key="field_display_listing_json_custom_desc" js="0"><![CDATA[Use {$label} to show the field label, {$value} to show the display field value and {$formValue} to show the value from the form.<br />For example, your dropdown may use a key of 'open' with a value of 'Open Record'. In this example, {$formValue} would contain 'open' and {$value} would contain 'Open Record'. You may need to add the '|raw' modifier to preserve HTML, i.e. {$value|raw}, but this can introduce security issues if not used carefully. You may use Invision Community template logic such as {{if}}.<br>If using an Address field, you can show a map by using {map} and the address with {address}.<br>If using multiple uploads, $value is an array of File Objects.]]></word>
|
||||
<word key="field_display_listing_json_badge_right" js="0">Show to the right of the listing area</word>
|
||||
<word key="cms_field_error_bad_syntax" js="0">The HTML syntax for the custom format is incorrect.</word>
|
||||
<word key="field_key" js="0">Template Key</word>
|
||||
@@ -741,7 +744,7 @@
|
||||
<word key="database_record_approve" js="0">Moderate new records</word>
|
||||
<word key="database_record_image" js="0">Enable record image upload</word>
|
||||
<word key="database_record_image_desc" js="0">This adds an image upload field to the record form. The image is displayed within the record text area by default.</word>
|
||||
<word key="cms_no_db_page_no_forum_link" js="0">These settings will have no affect until this database is added to a page.</word>
|
||||
<word key="cms_no_db_page_no_forum_link" js="0">These settings will have no effect until this database is added to a page.</word>
|
||||
<word key="cms_database_no_forum_selected" js="0">You have post topic enabled but have not selected a forum.</word>
|
||||
<word key="cms_database_promote" js="0">Promote from Forums</word>
|
||||
<word key="cms_promote_enabled" js="0">Enable</word>
|
||||
@@ -966,6 +969,16 @@
|
||||
<word key="acplogs__cms_added_database" js="0">Added Database: %s</word>
|
||||
<word key="acplogs__cms_edited_database" js="0">Edited Database: %s</word>
|
||||
<word key="acplogs__cms_deleted_database" js="0">Deleted Database: %s</word>
|
||||
<word key="acplogs__cms_deleted_media" js="0">Deleted %s media files in Pages</word>
|
||||
<word key="acplogs__cms_replaced_media" js="0">Replaced media file in Pages: %s</word>
|
||||
<word key="acplogs__cms_uploaded_media" js="0">Uploaded %s media files in Pages</word>
|
||||
<word key="acplogs__cms_imported_templates" js="0">Imported Pages templates</word>
|
||||
<word key="acplogs__cms_exported_templates" js="0">Exported Pages templates</word>
|
||||
<word key="acplogs__cms_template_add" js="0">Added Pages template: %s</word>
|
||||
<word key="acplogs__cms_template_container" js="0">Added Pages template container: %s</word>
|
||||
<word key="acplogs__cms_template_delete" js="0">Deleted Pages template: %s</word>
|
||||
<word key="acplogs__cms_template_save" js="0">Edited Pages template: %s</word>
|
||||
<word key="acplogs__cms_template_group_delete" js="0">Deleted Pages template group: %s</word>
|
||||
<word key="block_embed_options" js="0">External embed</word>
|
||||
<word key="block_embed_title" js="0">External Embed</word>
|
||||
<word key="embed_message" js="0"><![CDATA[This feature allows you to embed this block on an external page that <strong>isn't</strong> part of your Invision Community. For pages created within Invision Community, use the normal embedding method instead.]]></word>
|
||||
|
||||
@@ -1671,6 +1671,18 @@
|
||||
"unsigned": true,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"category_allow_anonymous": {
|
||||
"name": "category_allow_anonymous",
|
||||
"type": "TINYINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
@@ -1920,6 +1932,18 @@
|
||||
"zerofill": false,
|
||||
"auto_increment": false,
|
||||
"binary": false
|
||||
},
|
||||
"comment_is_anon": {
|
||||
"name": "comment_is_anon",
|
||||
"type": "TINYINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</div>]]></template>
|
||||
<template template_group="blocks" template_name="previewBlock" template_data="" template_location="admin" template_app="cms"><![CDATA[<li class="ipsFieldRow ipsFieldRow_noFlex">
|
||||
<div id="elPages_block_preview_wrapper" class='ipsSpacer_bottom'>
|
||||
<iframe class='loading' src='{url="app=cms&module=pages&controller=builder&do=previewBlock" base="front" protocol="\IPS\Http\Url::PROTOCOL_RELATIVE"}' data-base-url="{url="app=cms&module=pages&controller=builder&do=previewBlock" base="front" protocol="\IPS\Http\Url::PROTOCOL_RELATIVE"}" frameborder="0" name="elpages_block_preview" id="elpages_block_preview"></iframe>
|
||||
<iframe class='loading' src='{url="app=cms&module=pages&controller=builder&do=previewBlock" base="front"}' data-base-url="{url="app=cms&module=pages&controller=blocks&do=storeTemporaryBlock"}" frameborder="0" name="elpages_block_preview" id="elpages_block_preview"></iframe>
|
||||
<p class='ipsType_reset'>
|
||||
<span data-role="refreshPreview" class="ipsButton ipsButton_light ipsButton_small">{lang="cms_block_preview_refresh"}</span>
|
||||
</p>
|
||||
@@ -648,13 +648,9 @@
|
||||
{{if $table->title}}
|
||||
<h2 class='ipsType_sectionTitle ipsType_reset ipsClear'>{lang="$table->title"}</h2>
|
||||
{{endif}}
|
||||
{{if $table->pages > 1}}
|
||||
<div class="ipsButtonBar ipsPad_half ipsClearfix ipsClear">
|
||||
<div data-role="tablePagination">
|
||||
{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit, TRUE, $table->getPaginationKey()"}
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}
|
||||
<div class="ipsButtonBar ipsPad_half ipsClearfix ipsClear {{if $table->pages <= 1}}ipsHide{{endif}}" data-role="tablePagination">
|
||||
{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit, TRUE, $table->getPaginationKey()"}
|
||||
</div>
|
||||
|
||||
|
||||
{{if \count( $rows )}}
|
||||
@@ -665,13 +661,9 @@
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
{{if $table->pages > 1}}
|
||||
<div class="ipsButtonBar ipsPad_half ipsClearfix ipsClear">
|
||||
<div data-role="tablePagination">
|
||||
{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit, TRUE, $table->getPaginationKey()"}
|
||||
</div>
|
||||
<div class="ipsButtonBar ipsPad_half ipsClearfix ipsClear {{if $table->pages <= 1}}ipsHide{{endif}}" data-role="tablePagination">
|
||||
{template="pagination" group="global" app="core" location="global" params="$table->baseUrl, $table->pages, $table->page, $table->limit, TRUE, $table->getPaginationKey()"}
|
||||
</div>
|
||||
{{endif}}
|
||||
</div>]]></template>
|
||||
<template template_group="revisions" template_name="view" template_data="$record, $revision, $conflicts, $id, $action, $elements, $hiddenValues, $actionButtons, $uploadField, $formClass='', $attributes=array(), $sidebar=''" template_location="front" template_app="cms"><![CDATA[<div class="ipsPageHeader ipsClearfix ipsSpacer_bottom">
|
||||
<h1 class="ipsType_pageTitle">{lang="content_record_revision_title" sprintf="\IPS\DateTime::ts($revision->date)->relative(), $record->_title"}</h1>
|
||||
@@ -1055,6 +1047,9 @@
|
||||
<div id='elTemplateEditor_attributesDialog' class='ipsHide'>
|
||||
<div data-controller='cms.admin.templates.variablesDialog'>
|
||||
<div class='ipsPad'>
|
||||
<div class='ipsMessage ipsMessage_information'>
|
||||
{lang="template_variables_save_warning_msg"}
|
||||
</div>
|
||||
<p class='ipsType_textBlock' id='elTemplateEditor_attributes_title'>
|
||||
{lang="content_template_editor_fields_params"}
|
||||
</p>
|
||||
@@ -1208,7 +1203,7 @@
|
||||
<a href="{$record->url( "getPrefComment" )}" title='{lang="view_this_cmsrecord" sprintf="\IPS\Member::loggedIn()->language()->addToStack( 'content_db_lang_sl_' . $record::$customDatabaseId, FALSE ), $record->_title"}' class='ipsDataItem_title'>{$record->_title}</a>
|
||||
</div>
|
||||
<p class='ipsType_reset ipsType_medium ipsType_blendLinks'>
|
||||
<span>{lang="byline_nodate" htmlsprintf="$record->author()->link()"}</span><br>
|
||||
<span>{lang="byline_nodate" htmlsprintf="$record->author()->link( NULL, NULL, $record->isAnonymous() )"}</span><br>
|
||||
<span class="ipsType_light">{datetime="$record->mapped('date')"}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -363,6 +363,7 @@
|
||||
"104067": "4.4.10",
|
||||
"104068": "4.4.10",
|
||||
"104069": "4.4.10",
|
||||
"104070": "4.4.11",
|
||||
"105013": "4.5.0 Beta 1",
|
||||
"105014": "4.5.0 Beta 1",
|
||||
"105015": "4.5.0 Beta 2",
|
||||
@@ -383,5 +384,42 @@
|
||||
"105030": "4.5.0 Beta 11",
|
||||
"105031": "4.5.0 Beta 11",
|
||||
"105032": "4.5.0 Beta 12",
|
||||
"105100": "4.5.0"
|
||||
"105100": "4.5.0",
|
||||
"105101": "4.5.0",
|
||||
"105102": "4.5.1 Beta 1",
|
||||
"105103": "4.5.1 Beta 1",
|
||||
"105104": "4.5.1 Beta 2",
|
||||
"105105": "4.5.1 Beta 3",
|
||||
"105106": "4.5.1",
|
||||
"105107": "4.5.2",
|
||||
"105108": "4.5.2",
|
||||
"105109": "4.5.2",
|
||||
"105110": "4.5.2",
|
||||
"105111": "4.5.2",
|
||||
"105112": "4.5.3",
|
||||
"105113": "4.5.3",
|
||||
"105114": "4.5.3",
|
||||
"105115": "4.5.3",
|
||||
"105116": "4.5.4",
|
||||
"105117": "4.5.4",
|
||||
"105118": "4.5.4",
|
||||
"105119": "4.5.4",
|
||||
"105120": "4.5.4",
|
||||
"105121": "4.5.4",
|
||||
"105122": "4.5.4",
|
||||
"105123": "4.5.4",
|
||||
"105124": "4.5.4.1",
|
||||
"105125": "4.5.4.2",
|
||||
"105126": "4.5.4.2",
|
||||
"105127": "4.5.4.2",
|
||||
"105128": "4.5.4.2",
|
||||
"105129": "4.5.4.2",
|
||||
"105130": "4.5.4.2",
|
||||
"106100": "4.6.0 Beta 1",
|
||||
"106101": "4.6.0 Beta 1.1",
|
||||
"106103": "4.6.0 Beta 2",
|
||||
"106104": "4.6.0 Beta 3",
|
||||
"106105": "4.6.0 Beta 3.1",
|
||||
"106106": "4.6.0 Beta 4",
|
||||
"106107": "4.6.0"
|
||||
}
|
||||
@@ -135,6 +135,8 @@ class _RssImport
|
||||
try
|
||||
{
|
||||
$record = $recordClass::createFromForm( $values, $container );
|
||||
|
||||
$record->changeAuthor( $member, FALSE );
|
||||
|
||||
if ( ! $settings['record_open'] )
|
||||
{
|
||||
|
||||
@@ -176,7 +176,7 @@ class _Databases
|
||||
/* We only want nodes we can see, and that have actual content inside */
|
||||
if( $node->url() !== NULL and $node->can( 'view', new \IPS\Member ) and ( $node->hasChildren() OR ( $node->show_records and $node->getContentItemCount() ) ) )
|
||||
{
|
||||
$data = array( 'url' => $node->url(), 'lastmod' => $node->getLastCommentTime() );
|
||||
$data = array( 'url' => $node->url(), 'lastmod' => $node->getLastCommentTime( new \IPS\Member ) );
|
||||
|
||||
$priority = \intval( \IPS\Settings::i()->sitemap_databases_priority );
|
||||
if ( $priority !== -1 )
|
||||
|
||||
@@ -41,7 +41,7 @@ class _Databases
|
||||
{
|
||||
if ( \IPS\Db::i()->checkForTable( 'cms_databases' ) )
|
||||
{
|
||||
foreach ( \IPS\Db::i()->select( '*', 'cms_databases') as $db )
|
||||
foreach ( \IPS\Db::i()->select( '*', 'cms_databases' ) as $db )
|
||||
{
|
||||
/* The content router only returns databases linked to pages. In theory, you may have linked a database and then removed it,
|
||||
so the method to remove all app content from the search index fails, so we need to account for that here: */
|
||||
@@ -61,14 +61,14 @@ class _Databases
|
||||
$tables = array();
|
||||
try
|
||||
{
|
||||
$databaseTables = \IPS\Db::i()->query("SHOW TABLES LIKE '" . \IPS\Db::i()->prefix . "cms_custom_database_%'" )->fetch_assoc();
|
||||
$databaseTables = \IPS\Db::i()->query( "SHOW TABLES LIKE '" . \IPS\Db::i()->prefix . "cms_custom_database_%'" )->fetch_assoc();
|
||||
if ( $databaseTables )
|
||||
{
|
||||
foreach( $databaseTables as $row )
|
||||
{
|
||||
if( \is_array( $row ) )
|
||||
{
|
||||
$tables[] = array_pop($row);
|
||||
$tables[] = array_pop( $row );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -43,18 +43,6 @@ class _Widgets
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute when other applications are uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return void
|
||||
* @deprecated This is here for backwards-compatibility - all new code should go in onOtherUninstall
|
||||
*/
|
||||
public function onOtherAppUninstall( $application )
|
||||
{
|
||||
return $this->onOtherUninstall( $application );
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute when other applications or plugins are uninstalled
|
||||
*
|
||||
|
||||
@@ -118,7 +118,7 @@ class cms_hook_FriendlyUrl extends _HOOK_CLASS_
|
||||
* @return \IPS\Http\Url\Friendly
|
||||
* @throws \IPS\Http\Url\Exception
|
||||
*/
|
||||
protected function setFriendlyUrlData( $seoTemplate, $seoTitles, $matchedParams=array(), $friendlyUrlComponent )
|
||||
protected function setFriendlyUrlData( $seoTemplate, $seoTitles, $matchedParams=array(), string $friendlyUrlComponent = '')
|
||||
{
|
||||
if ( $seoTemplate === 'content_page_path' )
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ class cms_hook_Lang extends _HOOK_CLASS_
|
||||
\IPS\Application::applications();
|
||||
|
||||
/* Add in the database specific language bits and bobs */
|
||||
foreach( \IPS\cms\Databases::getDatabaseDataFromStore() as $database )
|
||||
foreach( \IPS\cms\Databases::getStore() as $database )
|
||||
{
|
||||
$this->words['__indefart_content_record_comments_title_' . $database['database_id'] ] = $this->addToStack( '__indefart_content_record_comments_title' );
|
||||
$this->words['__indefart_content_record_reviews_title_' . $database['database_id'] ] = $this->addToStack( '__indefart_content_record_reviews_title' );
|
||||
@@ -66,7 +66,7 @@ class cms_hook_Lang extends _HOOK_CLASS_
|
||||
* @param bool $upper ucfirst string
|
||||
* @return string
|
||||
*/
|
||||
public function recordWord( $number = 2, $upper = FALSE, $databaseId )
|
||||
public function recordWord( $number, $upper, $databaseId )
|
||||
{
|
||||
$case = $upper ? 'u' : 'l';
|
||||
return $number == 1 ? $this->addToStack("content_db_lang_s{$case}_{$databaseId}") : $this->addToStack("content_db_lang_p{$case}_{$databaseId}");
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
//<?php
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class cms_hook_apiForum extends _HOOK_CLASS_
|
||||
{
|
||||
/**
|
||||
* Delete
|
||||
*
|
||||
* @param int $id ID Number
|
||||
* @param int|NULL $deleteChildrenOrMove -1 to delete all child nodes, or the new parent node ID to move the children to
|
||||
* @throws 2F363/7 The node ID does not exist
|
||||
* @throws 2F363/6 The target node cannot be deleted because it is in use by a CMS Database
|
||||
* @return \IPS\Api\Response
|
||||
*/
|
||||
public function _delete( $id, $deleteChildrenOrMove = NULL )
|
||||
{
|
||||
$nodeClass = $this->class;
|
||||
|
||||
try
|
||||
{
|
||||
$node = $nodeClass::load( $id );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
throw new \IPS\Api\Exception( 'INVALID_ID', '2F363/7', 404 );
|
||||
}
|
||||
|
||||
/* isUsedByCms in cms/hooks/Forum.php */
|
||||
if ( $db = $node->isUsedByCms() )
|
||||
{
|
||||
throw new \IPS\Api\Exception( 'FORUM_USED_BY_DATABASE', '2F363/6', 403 );
|
||||
}
|
||||
else
|
||||
{
|
||||
return parent::_delete( $id, $deleteChildrenOrMove );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ if ( isset( \IPS\Request::i()->file ) )
|
||||
}
|
||||
|
||||
$file = file_get_contents( \IPS\ROOT_PATH . '/themes/' . \IPS\Request::i()->file );
|
||||
|
||||
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
\IPS\Output::i()->sendOutput( preg_replace( '#<ips:template.+?\n#', '', $file ), 200, ( mb_substr( \IPS\Request::i()->file, -4 ) === '.css' ) ? 'text/css' : 'text/javascript' );
|
||||
}
|
||||
+32
-2
@@ -16,7 +16,7 @@ require_once str_replace( 'applications/cms/interface/external/external.php', ''
|
||||
|
||||
$id = \IPS\Request::i()->blockid;
|
||||
$k = \IPS\Request::i()->widgetid;
|
||||
$block = \IPS\cms\Blocks\Block::display( $id );
|
||||
$blockHtml = \IPS\cms\Blocks\Block::display( $id );
|
||||
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_external.js', 'cms', 'front' ) );
|
||||
\IPS\Output::i()->globalControllers[] = 'cms.front.external.communication';
|
||||
@@ -26,4 +26,34 @@ if( isset( \IPS\Output::i()->httpHeaders['X-Frame-Options'] ) )
|
||||
unset( \IPS\Output::i()->httpHeaders['X-Frame-Options'] );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( $block ), 200, 'text/html' );
|
||||
$cache = FALSE;
|
||||
|
||||
try
|
||||
{
|
||||
if ( \is_numeric( $id ) )
|
||||
{
|
||||
$block = \IPS\cms\Blocks\Block::load( $id );
|
||||
}
|
||||
else if ( ! $block instanceof \IPS\cms\Blocks\Block )
|
||||
{
|
||||
$block = \IPS\cms\Blocks\Block::load( $id, 'block_key' );
|
||||
}
|
||||
|
||||
if ( $block->active )
|
||||
{
|
||||
$cache = ( $block->type == 'custom' ) ? $block->cache : TRUE;
|
||||
}
|
||||
}
|
||||
catch( \OutOfRangeException $ex ){}
|
||||
|
||||
if( !$cache OR !\IPS\Settings::i()->widget_cache_ttl )
|
||||
{
|
||||
\IPS\Output::i()->pageCaching = FALSE;
|
||||
$headers = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$headers = \IPS\Output::getCacheHeaders( time(), \IPS\Settings::i()->widget_cache_ttl );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( $blockHtml ), 200, 'text/html', $headers );
|
||||
@@ -214,6 +214,11 @@ class _databases extends \IPS\Node\Controller
|
||||
'link' => \IPS\Http\Url::internal( 'app=cms&module=databases&controller=databases&do=delete&id=' . $row['database_id'] ),
|
||||
'data' => array( 'delete' => '' )
|
||||
);
|
||||
|
||||
if ( \IPS\cms\Databases::isUsedAsReciprocalField( $row['database_id'] ) )
|
||||
{
|
||||
unset( $return['delete']['data'] );
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
@@ -228,7 +233,7 @@ class _databases extends \IPS\Node\Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a theme dialog
|
||||
* Add a database dialog
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -283,8 +288,7 @@ class _databases extends \IPS\Node\Controller
|
||||
function( $data )
|
||||
{
|
||||
/* Open XML file */
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
$xml->open( \IPS\Request::i()->file );
|
||||
$xml = \IPS\Xml\XMLReader::safeOpen( \IPS\Request::i()->file );
|
||||
|
||||
if ( ! @$xml->read() )
|
||||
{
|
||||
@@ -304,7 +308,7 @@ class _databases extends \IPS\Node\Controller
|
||||
/* Set default perms, these will be editable post DB import */
|
||||
\IPS\Db::i()->replace( 'core_permission_index', array(
|
||||
'app' => 'cms',
|
||||
'perm_type' => $database::$permType,
|
||||
'perm_type' => $database::$permType,
|
||||
'perm_type_id' => $database->id,
|
||||
'perm_view' => '*',
|
||||
'perm_2' => '*', #read
|
||||
@@ -508,6 +512,12 @@ class _databases extends \IPS\Node\Controller
|
||||
{
|
||||
$attrs['field_type'] = 'Text';
|
||||
}
|
||||
|
||||
/* Upload field has a special "is multiple" option we need to set */
|
||||
if( mb_ucfirst( $attrs['field_type'] ) == 'Upload' )
|
||||
{
|
||||
$attrs['field_upload_is_multiple'] = $attrs['field_is_multiple'];
|
||||
}
|
||||
|
||||
$attrs['_skip_formatting'] = TRUE;
|
||||
|
||||
@@ -522,7 +532,7 @@ class _databases extends \IPS\Node\Controller
|
||||
if ( isset( $attrs['field_extra'] ) )
|
||||
{
|
||||
/* The export format is always correct */
|
||||
$values['field_extra'] = $attrs['field_extra'];
|
||||
$values['extra'] = $attrs['field_extra'];
|
||||
}
|
||||
|
||||
$obj->saveForm( $values );
|
||||
@@ -874,7 +884,7 @@ class _databases extends \IPS\Node\Controller
|
||||
|
||||
$arrays = array();
|
||||
foreach( array( 'use_categories', 'template_listing', 'template_display', 'template_categories', 'all_editable', 'revisions', 'field_title', 'field_content', 'field_sort', 'field_direction', 'field_perpage', 'comment_approve', 'record_approve', 'rss',
|
||||
'comment_bump', 'forum_record', 'forum_comments', 'forum_delete', 'forum_forum', 'forum_prefix', 'forum_suffix', 'search', 'tags_enabled', 'tags_noprefixes', 'tags_predefined', 'fixed_field_perms',
|
||||
'comment_bump', 'forum_record', 'forum_comments', 'forum_delete', 'forum_forum', 'forum_prefix', 'forum_suffix', 'search', 'tags_enabled', 'tags_noprefixes', 'tags_predefined', 'fixed_field_perms', 'fixed_field_settings',
|
||||
'cat_index_type', 'template_form', 'template_featured', 'featured_settings', 'options' ) as $field )
|
||||
{
|
||||
if ( \is_array( $database->$field ) )
|
||||
@@ -948,7 +958,7 @@ class _databases extends \IPS\Node\Controller
|
||||
if ( isset( $row[ $field ] ) )
|
||||
{
|
||||
$xml->startElement( $field );
|
||||
if ( preg_match( '/<|>|&/', $row[ $field ] ) )
|
||||
if ( preg_match( '/<|>|&|"/', $row[ $field ] ) )
|
||||
{
|
||||
$xml->writeCData( str_replace( ']]>', ']]]]><![CDATA[>', $row[ $field ] ) );
|
||||
}
|
||||
@@ -1098,9 +1108,6 @@ class _databases extends \IPS\Node\Controller
|
||||
protected function delete()
|
||||
{
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'databases_delete' );
|
||||
|
||||
/* Make sure the user confirmed the deletion */
|
||||
\IPS\Request::i()->confirmedDelete();
|
||||
|
||||
/* Load the database */
|
||||
try
|
||||
@@ -1112,6 +1119,17 @@ class _databases extends \IPS\Node\Controller
|
||||
\IPS\Output::i()->error( 'cms_database_not_exist', '3T259/2', 403, '' );
|
||||
}
|
||||
|
||||
/* Make sure the user confirmed the deletion */
|
||||
if( \IPS\cms\Databases::isUsedAsReciprocalField( \IPS\Request::i()->id ) )
|
||||
{
|
||||
/* SHow a custom deletion confirmation for the DB if it used as reciprocal field in any other DB */
|
||||
\IPS\Request::i()->confirmedDelete( 'delete_confirm', 'delete_db_confirm_detail_msg' );
|
||||
}
|
||||
else
|
||||
{ /* Make sure the user confirmed the deletion */
|
||||
\IPS\Request::i()->confirmedDelete();
|
||||
}
|
||||
|
||||
/* Delete the database and clear the 'create' menu cache */
|
||||
$database->delete();
|
||||
\IPS\Member::clearCreateMenu();
|
||||
@@ -1533,7 +1551,8 @@ class _databases extends \IPS\Node\Controller
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=databases&controller=databases' ), 'saved' );
|
||||
}
|
||||
|
||||
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'admin_databases.js', 'cms', 'admin' ) );
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->block( $current ? "content_db_" . $current->id : 'add', $form, FALSE );
|
||||
\IPS\Output::i()->title = ( $current ) ? \IPS\Member::loggedIn()->language()->addToStack('cms_editing_database', NULL, array( 'sprintf' => array( $current->_title ) ) ) : \IPS\Member::loggedIn()->language()->addToStack('cms_adding_database');
|
||||
}
|
||||
|
||||
@@ -108,13 +108,9 @@ class _records extends \IPS\Dispatcher\Controller
|
||||
|
||||
$table->advancedSearch = array(
|
||||
'category_id' => array( \IPS\Helpers\Table\SEARCH_NODE, array(
|
||||
'class' => '\IPS\cms\Categories',
|
||||
'class' => '\IPS\cms\Categories' . $database->id,
|
||||
'disabled' => false,
|
||||
'zeroVal' => 'content_db_table_as_no_cat',
|
||||
'permissionCheck' => function( $node )
|
||||
{
|
||||
return $node->database_id == \IPS\Request::i()->database_id;
|
||||
}
|
||||
'zeroVal' => 'content_db_table_as_no_cat'
|
||||
),
|
||||
),
|
||||
'record_comments'=> array( \IPS\Helpers\Table\SEARCH_SELECT, array( 'options' => array(
|
||||
|
||||
@@ -215,7 +215,7 @@ class _ajax extends \IPS\Dispatcher\Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadTags(): void
|
||||
public function loadTags()
|
||||
{
|
||||
$page = NULL;
|
||||
if ( isset( \IPS\Request::i()->pageId ) )
|
||||
|
||||
@@ -234,7 +234,7 @@ class _blocks extends \IPS\Node\Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadTags(): void
|
||||
public function loadTags()
|
||||
{
|
||||
$tags = array();
|
||||
$tagLinks = array();
|
||||
@@ -257,4 +257,32 @@ class _blocks extends \IPS\Node\Controller
|
||||
|
||||
\IPS\Output::i()->sendOutput( \IPS\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \IPS\Theme::i()->getTemplate( 'forms', 'core', 'global' )->editorTags( $tags, $tagLinks ) ), 200, 'text/html' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the custom code to use for a block preview
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function storeTemporaryBlock()
|
||||
{
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
|
||||
$key = md5( mt_rand() );
|
||||
|
||||
while( isset( \IPS\Data\Store::i()->$key ) )
|
||||
{
|
||||
$key = md5( mt_rand() );
|
||||
}
|
||||
|
||||
$data = array();
|
||||
|
||||
foreach( \IPS\Request::i() as $k => $v )
|
||||
{
|
||||
$data[ $k ] = $v;
|
||||
}
|
||||
|
||||
\IPS\Data\Store::i()->$key = $data;
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=cms&module=pages&controller=builder&do=previewBlock&_key=" . $key, 'front' ) );
|
||||
}
|
||||
}
|
||||
@@ -103,6 +103,8 @@ class _media extends \IPS\Node\Controller
|
||||
if ( \count( $ids ) )
|
||||
{
|
||||
\IPS\cms\Media::deleteByFileIds( $ids );
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_deleted_media', array( \count( $ids ) => FALSE ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -269,6 +271,8 @@ class _media extends \IPS\Node\Controller
|
||||
/* Wipe out included JS just in case we're using this media thing */
|
||||
\IPS\cms\Templates::deleteCompiledFiles();
|
||||
\IPS\cms\Pages\Page::deleteCachedIncludes();
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_replaced_media', array( $values['media_filename']->originalFilename => FALSE ) );
|
||||
|
||||
if ( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
@@ -372,6 +376,8 @@ class _media extends \IPS\Node\Controller
|
||||
/* Wipe out included JS just in case we're using this media thing */
|
||||
\IPS\cms\Templates::deleteCompiledFiles();
|
||||
\IPS\cms\Pages\Page::deleteCachedIncludes();
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_uploaded_media', array( $count => FALSE ) );
|
||||
|
||||
if ( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
|
||||
@@ -360,7 +360,7 @@ FILE;
|
||||
* @param string $lastUsedTab The tab last used in the form
|
||||
* @return void
|
||||
*/
|
||||
protected function _afterSave( \IPS\Node\Model $old = NULL, \IPS\Node\Model $new, $lastUsedTab = FALSE )
|
||||
protected function _afterSave( ?\IPS\Node\Model $old, \IPS\Node\Model $new, $lastUsedTab = FALSE )
|
||||
{
|
||||
/* If this page was the default in a folder, and it was moved to a new folder that already has a default, we need to unset the
|
||||
default page flag or there will be two defaults in the destination folder */
|
||||
|
||||
@@ -73,6 +73,8 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
$tempFile = tempnam( \IPS\TEMP_DIRECTORY, 'IPS' );
|
||||
move_uploaded_file( $values['cms_templates_import'], $tempFile );
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_imported_templates' );
|
||||
|
||||
/* Initate a redirector */
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=pages&controller=templates&do=importProcess' )->csrf()->setQueryString( array( 'file' => $tempFile, 'key' => md5_file( $tempFile ) ) ) );
|
||||
}
|
||||
@@ -127,16 +129,16 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
*/
|
||||
public function conflicts()
|
||||
{
|
||||
$key = \intval( \IPS\Request::i()->key );
|
||||
$key = \IPS\Request::i()->key;
|
||||
$form = new \IPS\Helpers\Form( 'form', 'theme_conflict_save' );
|
||||
$conflicts = array();
|
||||
|
||||
/* If this is part of plugin/app installation, set relevant form data */
|
||||
if( \IPS\Request::i()->app OR \IPS\Request::i()->plugin )
|
||||
if( \IPS\Request::i()->application OR \IPS\Request::i()->plugin )
|
||||
{
|
||||
if( \IPS\Request::i()->app )
|
||||
if( \IPS\Request::i()->application )
|
||||
{
|
||||
$form->hiddenValues['app'] = \IPS\Request::i()->app;
|
||||
$form->hiddenValues['application'] = \IPS\Request::i()->application;
|
||||
}
|
||||
elseif( \IPS\Request::i()->plugin )
|
||||
{
|
||||
@@ -177,7 +179,7 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$conflicts[ $cid ]['diff'] = \IPS\Theme::i()->getTemplate( 'customization' )->templateConflictLarge( $template->content, $data['conflict_content'], 'html' );
|
||||
$conflicts[ $cid ]['diff'] = \IPS\Theme::i()->getTemplate( 'customization', 'core' )->templateConflictLarge( $template->content, $data['conflict_content'], 'html' );
|
||||
$conflicts[ $cid ]['large'] = true;
|
||||
}
|
||||
|
||||
@@ -258,7 +260,7 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=marketplace&controller=marketplace&do=viewFile&id=' . $values['marketplace'] ), $lang );
|
||||
}
|
||||
elseif( !empty( $values['app'] ) )
|
||||
elseif( !empty( $values['application'] ) )
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=applications&controller=applications' ), $lang );
|
||||
}
|
||||
@@ -303,6 +305,9 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
\IPS\Output::i()->error( 'cms_no_templates_selected', '1T285/1', 403, '' );
|
||||
}
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_exported_templates' );
|
||||
|
||||
\IPS\Output::i()->sendOutput( $xml->outputMemory(), 200, 'application/xml', array( 'Content-Disposition' => \IPS\Output::getContentDisposition( 'attachment', "pages_templates.xml" ) ) );
|
||||
}
|
||||
|
||||
@@ -457,6 +462,8 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
'name' => $values['container_name'],
|
||||
'type' => 'template_' . $type
|
||||
) );
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_template_container', array( $container->title => false ) );
|
||||
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
@@ -760,6 +767,8 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
$newTemplate = \IPS\cms\Templates::add( $save );
|
||||
}
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_template_add', array( $newTemplate->title => false ) );
|
||||
|
||||
/* Done */
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
@@ -803,6 +812,8 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
'template_content' => NULL,
|
||||
'template_id' => NULL
|
||||
);
|
||||
|
||||
$originalTemplate = \IPS\cms\Templates::load( $key );
|
||||
|
||||
try
|
||||
{
|
||||
@@ -831,6 +842,8 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
/* Clear guest page caches */
|
||||
\IPS\Data\Cache::i()->clearAll();
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_template_delete', array( $originalTemplate->title => false ) );
|
||||
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->json( $return );
|
||||
@@ -947,6 +960,8 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
|
||||
/* Clear block caches */
|
||||
\IPS\cms\Blocks\Block::deleteCompiled();
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_template_save', array( \IPS\Request::i()->t_name => false ) );
|
||||
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
@@ -1093,6 +1108,8 @@ class _templates extends \IPS\Dispatcher\Controller
|
||||
\IPS\Db::i()->delete( 'cms_templates', array( 'template_location=? and template_group=?', 'database', \IPS\Request::i()->group ) );
|
||||
|
||||
unset( \IPS\Data\Store::i()->cms_databases );
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__cms_template_group_delete', array( \IPS\Request::i()->group => false ) );
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=cms&module=pages&controller=templates' . ( isset( \IPS\Request::i()->t_location ) ? '&t_location=' . \IPS\Request::i()->t_location : '' ) ), 'deleted' );
|
||||
}
|
||||
|
||||
@@ -263,6 +263,11 @@ class _category extends \IPS\cms\Databases\Controller
|
||||
{
|
||||
$where = NULL;
|
||||
}
|
||||
|
||||
if( \IPS\Request::i()->advanced_search_submitted )
|
||||
{
|
||||
\IPS\Request::i()->csrfKey = \IPS\Session::i()->csrfKey;
|
||||
}
|
||||
|
||||
$table = new \IPS\Helpers\Table\Content( 'IPS\cms\Records' . \IPS\cms\Databases\Dispatcher::i()->databaseId, $category->url(), $where, $category, NULL, 'read', isset( \IPS\Request::i()->rss ) ? FALSE : TRUE );
|
||||
$table->tableTemplate = array( \IPS\cms\Theme::i()->getTemplate( $category->_template_listing, 'cms', 'database' ), 'categoryTable' );
|
||||
|
||||
@@ -139,7 +139,16 @@ class _record extends \IPS\Content\Controller
|
||||
|
||||
$record->save();
|
||||
$record->processAfterEdit( $values );
|
||||
|
||||
|
||||
$fieldObjects = $fieldsClass::data( NULL, $record->category_id ? $category : NULL );
|
||||
|
||||
foreach( $fieldObjects as $id => $row )
|
||||
{
|
||||
if ( $row->type == 'Item' )
|
||||
{
|
||||
$record->processItemFieldData( $row );
|
||||
}
|
||||
}
|
||||
\IPS\Output::i()->redirect( $record->url() );
|
||||
}
|
||||
}
|
||||
@@ -214,14 +223,14 @@ class _record extends \IPS\Content\Controller
|
||||
'author' => array(
|
||||
'@type' => 'Person',
|
||||
'name' => (string) \IPS\Member::load( $record->member_id )->name,
|
||||
'image' => (string) \IPS\Member::load( $record->member_id )->get_photo()
|
||||
'image' => (string) \IPS\Member::load( $record->member_id )->get_photo( TRUE, TRUE )
|
||||
),
|
||||
'publisher' => array(
|
||||
'@id' => \IPS\Settings::i()->base_url . '#organization',
|
||||
'member' => array(
|
||||
'@type' => "Person",
|
||||
'name' => \IPS\Member::load( $record->member_id )->name,
|
||||
'image' => (string) \IPS\Member::load( $record->member_id )->get_photo(),
|
||||
'image' => (string) \IPS\Member::load( $record->member_id )->get_photo( TRUE, TRUE ),
|
||||
)
|
||||
),
|
||||
'interactionStatistic' => array(
|
||||
@@ -258,7 +267,7 @@ class _record extends \IPS\Content\Controller
|
||||
}
|
||||
\IPS\Output::i()->jsonLd['article']['publisher']['logo'] = array(
|
||||
'@type' => 'ImageObject',
|
||||
'url' => $logo ? (string) $logo : (string) \IPS\Member::load( $record->member_id )->get_photo(),
|
||||
'url' => $logo ? (string) $logo : (string) \IPS\Member::load( $record->member_id )->get_photo( TRUE, TRUE ),
|
||||
);
|
||||
|
||||
/* Image is required */
|
||||
@@ -283,7 +292,7 @@ class _record extends \IPS\Content\Controller
|
||||
|
||||
\IPS\Output::i()->jsonLd['article']['image'] = array(
|
||||
'@type' => 'ImageObject',
|
||||
'url' => \IPS\Member::load( $record->member_id )->get_photo(),
|
||||
'url' => \IPS\Member::load( $record->member_id )->get_photo( TRUE, TRUE ),
|
||||
'width' => $photoVars[0],
|
||||
'height' => $photoVars[1]
|
||||
);
|
||||
|
||||
@@ -30,23 +30,47 @@ class _builder extends \IPS\core\modules\front\system\widgets
|
||||
*/
|
||||
public function previewBlock()
|
||||
{
|
||||
if ( !\IPS\Member::loggedIn()->hasAcpRestriction( 'cms', 'blocks', 'block_manage' ) )
|
||||
{
|
||||
\IPS\Output::i()->error( 'no_module_permission', '3T419/1', 403, '' );
|
||||
}
|
||||
|
||||
$output = "";
|
||||
|
||||
if ( \IPS\Request::i()->_key )
|
||||
{
|
||||
try
|
||||
{
|
||||
$key = \IPS\Request::i()->_key;
|
||||
$data = \IPS\Data\Store::i()->$key;
|
||||
unset( \IPS\Data\Store::i()->$key );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$data = array();
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( \IPS\Request::i()->block_plugin ) )
|
||||
if ( isset( $data['block_plugin'] ) )
|
||||
{
|
||||
$block = new \IPS\cms\Blocks\Block;
|
||||
$block->type = "plugin";
|
||||
$block->plugin = \IPS\Request::i()->block_plugin;
|
||||
$block->plugin_app = ( isset( \IPS\Request::i()->block_plugin_app ) ) ? \IPS\Request::i()->block_plugin_app : \IPS\Request::i()->block_app;
|
||||
$block->plugin_plugin = \IPS\Request::i()->block_plugin_plugin;
|
||||
$block->plugin = $data['block_plugin'];
|
||||
$block->plugin_app = ( isset( $data['block_plugin_app'] ) ) ? $data['block_plugin_app'] : $data['block_app'];
|
||||
|
||||
if( isset( $data['block_plugin_plugin'] ) )
|
||||
{
|
||||
$block->plugin_plugin = $data['block_plugin_plugin'];
|
||||
}
|
||||
|
||||
$block->key = md5( mt_rand() );
|
||||
|
||||
$params = array();
|
||||
$block->content = NULL;
|
||||
|
||||
if ( isset( \IPS\Request::i()->_sending ) )
|
||||
if ( isset( $data['_sending'] ) )
|
||||
{
|
||||
foreach( explode( ",", \IPS\Request::i()->_sending ) as $field )
|
||||
foreach( explode( ",", $data['_sending'] ) as $field )
|
||||
{
|
||||
/* Multi-Selects will pass their parameters through as an array, so we need to make sure we check those properly to include all options. */
|
||||
if ( mb_strstr( $field, '[]' ) !== FALSE )
|
||||
@@ -59,15 +83,15 @@ class _builder extends \IPS\core\modules\front\system\widgets
|
||||
$isArray = FALSE;
|
||||
}
|
||||
|
||||
if ( $field and isset( \IPS\Request::i()->$field ) )
|
||||
if ( $field and isset( $data[ $field ] ) )
|
||||
{
|
||||
if ( $field == 'block_content' )
|
||||
{
|
||||
$block->content = \IPS\Request::i()->$field;
|
||||
$block->content = $data[ $field ];
|
||||
|
||||
if ( isset( \IPS\Request::i()->template_params ) )
|
||||
if ( isset( $data['template_params'] ) )
|
||||
{
|
||||
$block->template_params = \IPS\Request::i()->template_params;
|
||||
$block->template_params = $data['template_params'];
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@@ -75,35 +99,35 @@ class _builder extends \IPS\core\modules\front\system\widgets
|
||||
if( mb_strpos( $field, "widget_feed_container_" ) !== FALSE )
|
||||
{
|
||||
/* On means that the all checkbox is ticked */
|
||||
$params[ 'widget_feed_container'] = \IPS\Request::i()->$field == 'on' ? 0 : ( \is_array( \IPS\Request::i()->$field ) ? \IPS\Request::i()->$field : explode( ',', \IPS\Request::i()->$field ) );
|
||||
$params[ 'widget_feed_container'] = $data[ $field ] == 'on' ? 0 : ( \is_array( $data[ $field ] ) ? $data[ $field ] : explode( ',', $data[ $field ] ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
/* We need to handle tags special */
|
||||
if( $field == 'widget_feed_tags' )
|
||||
{
|
||||
$params[ $field ] = \IPS\Request::i()->$field ? explode( ',', \IPS\Request::i()->$field ) : array();
|
||||
$params[ $field ] = $data[ $field ] ? explode( ',', $data[ $field ] ) : array();
|
||||
continue;
|
||||
}
|
||||
|
||||
/* We need to handle authors special */
|
||||
if( $field == 'widget_feed_author' )
|
||||
{
|
||||
$params[ $field ] = \IPS\Request::i()->$field ? array( \IPS\Member::load( \IPS\Request::i()->$field, 'name' )->member_id ) : array();
|
||||
$params[ $field ] = $data[ $field ] ? array( \IPS\Member::load( $data[ $field ], 'name' )->member_id ) : array();
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Is it an array? */
|
||||
if ( $isArray )
|
||||
{
|
||||
foreach( \IPS\Request::i()->$field AS $multi )
|
||||
foreach( $data[ $field ] AS $multi )
|
||||
{
|
||||
$params[ $field ][] = $multi;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$params[ $field ] = \IPS\Request::i()->$field;
|
||||
$params[ $field ] = $data[ $field ];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,7 +135,7 @@ class _builder extends \IPS\core\modules\front\system\widgets
|
||||
$block->plugin_config = json_encode( $params );
|
||||
|
||||
/* Template stuffs */
|
||||
if ( \IPS\Request::i()->block_template_use_how == 'copy' )
|
||||
if ( $data['block_template_use_how'] == 'copy' )
|
||||
{
|
||||
$block->widget()->template( array( $block, 'getTemplate' ) );
|
||||
}
|
||||
|
||||
@@ -63,43 +63,47 @@ class _page extends \IPS\Dispatcher\Controller
|
||||
|
||||
if ( \IPS\Request::i()->path == $page->full_path )
|
||||
{
|
||||
/* Did we have a trailing slash? */
|
||||
if ( \IPS\Settings::i()->htaccess_mod_rewrite and mb_substr( \IPS\Request::i()->url()->data[ \IPS\Http\Url::COMPONENT_PATH ], -1 ) != '/' )
|
||||
/* Are we using Friendly URL's at all? */
|
||||
if ( \IPS\Settings::i()->use_friendly_urls )
|
||||
{
|
||||
$url = $page->url();
|
||||
|
||||
foreach( \IPS\Request::i()->url()->queryString as $k => $v )
|
||||
/* Did we have a trailing slash? */
|
||||
if ( \IPS\Settings::i()->htaccess_mod_rewrite and mb_substr( \IPS\Request::i()->url()->data[ \IPS\Http\Url::COMPONENT_PATH ], -1 ) != '/' )
|
||||
{
|
||||
$url = $url->setQueryString( $k, $v );
|
||||
}
|
||||
|
||||
if ( ! empty( \IPS\Request::i()->url()->fragment ) )
|
||||
{
|
||||
$url = $url->setFragment( \IPS\Request::i()->url()->fragment );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $url, NULL, 301 );
|
||||
}
|
||||
else if ( ! \IPS\Settings::i()->htaccess_mod_rewrite and ! mb_strstr( \IPS\Request::i()->url()->data[ \IPS\Http\Url::COMPONENT_QUERY ], $page->url()->data[ \IPS\Http\Url::COMPONENT_QUERY ] ) )
|
||||
{
|
||||
$url = $page->url();
|
||||
|
||||
foreach( \IPS\Request::i()->url()->queryString as $k => $v )
|
||||
{
|
||||
if ( mb_substr( $k, 0, 1 ) == '/' and mb_substr( $k, -1 ) != '/' )
|
||||
$url = $page->url();
|
||||
|
||||
foreach( \IPS\Request::i()->url()->queryString as $k => $v )
|
||||
{
|
||||
$k .= '/';
|
||||
$url = $url->setQueryString( $k, $v );
|
||||
}
|
||||
|
||||
if ( ! empty( \IPS\Request::i()->url()->fragment ) )
|
||||
{
|
||||
$url = $url->setFragment( \IPS\Request::i()->url()->fragment );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $url, NULL, 301 );
|
||||
}
|
||||
|
||||
$url = $url->setQueryString( $k, $v );
|
||||
|
||||
if ( ! empty( \IPS\Request::i()->url()->fragment ) )
|
||||
else if ( ! \IPS\Settings::i()->htaccess_mod_rewrite and ! mb_strstr( \IPS\Request::i()->url()->data[ \IPS\Http\Url::COMPONENT_QUERY ], $page->url()->data[ \IPS\Http\Url::COMPONENT_QUERY ] ) )
|
||||
{
|
||||
$url = $url->setFragment( \IPS\Request::i()->url()->fragment );
|
||||
$url = $page->url();
|
||||
|
||||
foreach( \IPS\Request::i()->url()->queryString as $k => $v )
|
||||
{
|
||||
if ( mb_substr( $k, 0, 1 ) == '/' and mb_substr( $k, -1 ) != '/' )
|
||||
{
|
||||
$k .= '/';
|
||||
}
|
||||
}
|
||||
|
||||
$url = $url->setQueryString( $k, $v );
|
||||
|
||||
if ( ! empty( \IPS\Request::i()->url()->fragment ) )
|
||||
{
|
||||
$url = $url->setFragment( \IPS\Request::i()->url()->fragment );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $url, NULL, 301 );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( $url, NULL, 301 );
|
||||
}
|
||||
|
||||
/* Just viewing this page, no database categories or records */
|
||||
|
||||
@@ -36,7 +36,7 @@ class _Upgrade
|
||||
{
|
||||
$queries[] = array(
|
||||
'table' => 'cms_custom_database_' . $database,
|
||||
'query' => "ALTER TABLE " . \IPS\Db::i()->prefix . "cms_custom_database_{$database} DROP KEY `category_id`, ADD KEY `category_id` (`category_id`,`record_last_comment`), ADD KEY `future_entries` (`record_future_date`,`record_publish_date`)"
|
||||
'query' => "ALTER TABLE `" . \IPS\Db::i()->prefix . "cms_custom_database_{$database}` DROP KEY `category_id`, ADD KEY `category_id` (`category_id`,`record_last_comment`), ADD KEY `future_entries` (`record_future_date`,`record_publish_date`)"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105101,
|
||||
"name": "4.5.0",
|
||||
"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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105102,
|
||||
"name": "4.5.1 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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105103,
|
||||
"name": "4.5.1 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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105104,
|
||||
"name": "4.5.1 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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105105,
|
||||
"name": "4.5.1 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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105106,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105107,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105108,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105109,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105110,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105111,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105112,
|
||||
"name": "4.5.3",
|
||||
"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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"field_display_display_json_custom_desc",
|
||||
"field_display_listing_json_custom_desc"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105113,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105114,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105115,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105116,
|
||||
"name": "4.5.4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [
|
||||
"cms\/front\/mixins\/ips.cms.comment.js"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"cms_no_db_page_no_forum_link"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105117,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105118,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105119,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105120,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105121,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105122,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105123,
|
||||
"name": "4.5.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105124,
|
||||
"name": "4.5.4.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105125,
|
||||
"name": "4.5.4.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105126,
|
||||
"name": "4.5.4.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105127,
|
||||
"name": "4.5.4.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105128,
|
||||
"name": "4.5.4.2",
|
||||
"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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"admin\/blocks\/previewBlock"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105129,
|
||||
"name": "4.5.4.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 105130,
|
||||
"name": "4.5.4.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 106100,
|
||||
"name": "4.6.0 Beta 1",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": true,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": true
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"added": [
|
||||
"apiForum"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"cms\/front\/mixins\/ips.cms.builder.area.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"__defart_content_record_comments_title_plural",
|
||||
"__defart_content_record_reviews_title_plural",
|
||||
"delete_db_confirm_detail_msg",
|
||||
"acplogs__cms_deleted_media",
|
||||
"acplogs__cms_replaced_media",
|
||||
"acplogs__cms_uploaded_media",
|
||||
"acplogs__cms_imported_templates",
|
||||
"acplogs__cms_exported_templates",
|
||||
"acplogs__cms_template_add",
|
||||
"acplogs__cms_template_container",
|
||||
"acplogs__cms_template_delete",
|
||||
"acplogs__cms_template_save",
|
||||
"acplogs__cms_template_group_delete"
|
||||
],
|
||||
"edited": [
|
||||
"can_edit_item_message_record"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"cms_database_categories",
|
||||
{
|
||||
"name": "category_allow_anonymous",
|
||||
"type": "TINYINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"cms_database_comments",
|
||||
{
|
||||
"name": "comment_is_anon",
|
||||
"type": "TINYINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": "0",
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/revisions\/table",
|
||||
"front\/widgets\/RecordFeed"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.6.0 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 Pages
|
||||
* @since 04 Mar 2021
|
||||
*/
|
||||
|
||||
namespace IPS\cms\setup\upg_106100;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.6.0 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
*
|
||||
* @return 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()
|
||||
{
|
||||
foreach( \IPS\cms\Databases::databases() as $id => $db )
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\cms\Databases::checkandFixDatabaseSchema( $id );
|
||||
}
|
||||
catch( \Exception $e ) { }
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
public function step1CustomTitle()
|
||||
{
|
||||
return 'Fixing CMS Tables';
|
||||
}
|
||||
|
||||
/**
|
||||
* Step 2
|
||||
* Initialize a search index rebuild for Pages
|
||||
*
|
||||
* @return 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 step2()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildSearchIndex', array( 'class' => 'IPS\cms\Pages\PageItem' ), 5 );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom title for this step
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function step2CustomTitle()
|
||||
{
|
||||
return 'Rebuilding pages search index';
|
||||
}
|
||||
|
||||
|
||||
// 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,24 @@
|
||||
{
|
||||
"id": 106101,
|
||||
"name": "4.6.0 Beta 1.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 106103,
|
||||
"name": "4.6.0 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"cms\/admin\/controllers\/templates\/ips.templates.variablesDialog.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"admin\/templates\/templates"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 106104,
|
||||
"name": "4.6.0 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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 106105,
|
||||
"name": "4.6.0 Beta 3.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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 106106,
|
||||
"name": "4.6.0 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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 106107,
|
||||
"name": "4.6.0",
|
||||
"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,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -492,9 +492,16 @@ EOF;
|
||||
'app' => 'cms',
|
||||
'key' => ( $this->id ? "content_block_name_" . $this->id . '_desc' : NULL )
|
||||
) ) );
|
||||
|
||||
$nodeContainer = $this->id ? $this->category :
|
||||
( \IPS\Request::i()->parent ?: \IPS\cms\Blocks\Container::load( ( $block_type == 'custom' ? 'block_custom' : 'block_plugins' ), 'container_key' )->id );
|
||||
|
||||
try
|
||||
{
|
||||
$nodeContainer = $this->id ? $this->category :
|
||||
( \IPS\Request::i()->parent ?: \IPS\cms\Blocks\Container::load( ( $block_type == 'custom' ? 'block_custom' : 'block_plugins' ), 'container_key' )->id );
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
$nodeContainer = NULL;
|
||||
}
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'block_category', $nodeContainer, TRUE, array(
|
||||
'class' => '\IPS\cms\Blocks\Container',
|
||||
'subnodes' => false
|
||||
@@ -728,6 +735,9 @@ EOF;
|
||||
\IPS\File::claimAttachments( ( $this->id ) ? 'block-content-' . $this->id : 'block-content-new', $this->id );
|
||||
}
|
||||
|
||||
$this->type = \IPS\Request::i()->block_type;
|
||||
$values['type'] = $this->type;
|
||||
|
||||
if ( ! $this->id )
|
||||
{
|
||||
$this->active = 1;
|
||||
@@ -752,9 +762,6 @@ EOF;
|
||||
unset ( $values['block_description'] );
|
||||
}
|
||||
|
||||
$this->type = \IPS\Request::i()->block_type;
|
||||
$values['type'] = $this->type;
|
||||
|
||||
if( isset( $values['block_key'] ) )
|
||||
{
|
||||
if ( ! $values['block_key'] )
|
||||
@@ -883,6 +890,17 @@ EOF;
|
||||
/* We're using a copy */
|
||||
if ( isset( $values['block_save_as_template'] ) AND $values['block_save_as_template'] )
|
||||
{
|
||||
$templateArray = array(
|
||||
'desc' => null,
|
||||
'content' => $values['block_content'],
|
||||
'location' => 'block',
|
||||
'group' => \IPS\Request::i()->block_plugin,
|
||||
'container' => null,
|
||||
'rel_id' => 0,
|
||||
'user_created' => 1,
|
||||
'user_edited' => 0,
|
||||
);
|
||||
|
||||
if ( $values['block_template_id'] == '_default_' )
|
||||
{
|
||||
/* Find it from the normal template system */
|
||||
@@ -893,19 +911,9 @@ EOF;
|
||||
$templateBits = \IPS\Theme::master()->getRawTemplates( $location['app'], $location['location'], $location['group'], \IPS\Theme::RETURN_ALL );
|
||||
$templateBit = $templateBits[ $location['app'] ][ $location['location'] ][ $location['group'] ][ $location['name'] ];
|
||||
|
||||
$templateArray = array(
|
||||
'key' => 'template_' . $templateBit['template_name'] . '.' . mt_rand(),
|
||||
'title' => str_replace( '-', '_', \IPS\Http\Url\Friendly::seoTitle( $values['block_save_as_template_name'] ? $values['block_save_as_template_name'] : $templateBit['template_name'] . '_' . \IPS\Member::loggedIn()->language()->get('copy_noun') ) ),
|
||||
'desc' => null,
|
||||
'content' => $values['block_content'],
|
||||
'location' => 'block',
|
||||
'group' => \IPS\Request::i()->block_plugin,
|
||||
'container' => null,
|
||||
'rel_id' => 0,
|
||||
'user_created' => 1,
|
||||
'user_edited' => 0,
|
||||
'params' => $templateBit['template_data']
|
||||
);
|
||||
$templateArray['key'] = 'template_' . $templateBit['template_name'] . '.' . mt_rand();
|
||||
$templateArray['title'] = str_replace( '-', '_', \IPS\Http\Url\Friendly::seoTitle( $values['block_save_as_template_name'] ? $values['block_save_as_template_name'] : $templateBit['template_name'] . '_' . \IPS\Member::loggedIn()->language()->get('copy_noun') ) );
|
||||
$templateArray['params'] = $templateBit['template_data'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -913,19 +921,9 @@ EOF;
|
||||
{
|
||||
$template = \IPS\cms\Templates::load( $values['block_template_id'] );
|
||||
|
||||
$templateArray = array(
|
||||
'key' => 'template_' . $template->name . '.' . mt_rand(),
|
||||
'title' => str_replace( '-', '_', \IPS\Http\Url\Friendly::seoTitle( $values['block_save_as_template_name'] ? $values['block_save_as_template_name'] : $template->name . '_' . \IPS\Member::loggedIn()->language()->get('copy_noun') ) ),
|
||||
'desc' => null,
|
||||
'content' => $values['block_content'],
|
||||
'location' => 'block',
|
||||
'group' => \IPS\Request::i()->block_plugin,
|
||||
'container' => null,
|
||||
'rel_id' => 0,
|
||||
'user_created' => 1,
|
||||
'user_edited' => 0,
|
||||
'params' => $template->params
|
||||
);
|
||||
$templateArray['key'] = 'template_' . $template->name . '.' . mt_rand();
|
||||
$templateArray['title'] = str_replace( '-', '_', \IPS\Http\Url\Friendly::seoTitle( $values['block_save_as_template_name'] ? $values['block_save_as_template_name'] : $template->name . '_' . \IPS\Member::loggedIn()->language()->get('copy_noun') ) );
|
||||
$templateArray['params'] = $template->params;
|
||||
}
|
||||
catch( \OutOfRangeException $ex )
|
||||
{
|
||||
@@ -933,6 +931,12 @@ EOF;
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure template name is unique within the group */
|
||||
if( \IPS\Db::i()->select( 'COUNT(*)', 'cms_templates', array( 'template_title=? and template_location=? and template_group=?', $templateArray['title'], $templateArray['location'], $templateArray['group'] ) )->first() )
|
||||
{
|
||||
$templateArray['title'] = $templateArray['title'] . '_' . time();
|
||||
}
|
||||
|
||||
/* Save */
|
||||
$newTemplate = \IPS\cms\Templates::add( $templateArray );
|
||||
|
||||
@@ -1036,41 +1040,12 @@ EOF;
|
||||
}
|
||||
|
||||
/**
|
||||
* [ActiveRecord] Duplicate
|
||||
* [Node] Does the currently logged in user have permission to copy this node?
|
||||
*
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function __clone()
|
||||
public function canCopy()
|
||||
{
|
||||
parent::__clone();
|
||||
|
||||
if( $this->skipCloneDuplication === TRUE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Copy language bits to make them unique */
|
||||
$config = $this->_plugin_config;
|
||||
$wordKey = 'widget_title_' . md5( mt_rand() );
|
||||
|
||||
if ( isset( $config['language_key'] ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_sys_lang_words', array( 'word_key=?', $config['language_key'] ) ) as $row )
|
||||
{
|
||||
unset( $row['word_id'] );
|
||||
$row['word_key'] = $wordKey;
|
||||
\IPS\Db::i()->insert( 'core_sys_lang_words', $row );
|
||||
}
|
||||
}
|
||||
catch( \Exception $ex ) { }
|
||||
|
||||
$config['language_key'] = $wordKey;
|
||||
$this->plugin_config = json_encode( $config );
|
||||
}
|
||||
|
||||
$this->key .= '_' . mt_rand();
|
||||
$this->save();
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,8 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
use \IPS\Node\Statistics;
|
||||
|
||||
/**
|
||||
* @brief Multiton Store
|
||||
*/
|
||||
@@ -487,7 +489,8 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'category_allow_rating', $this->allow_rating, FALSE, array(), NULL, NULL, NULL, 'category_allow_rating' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'category_has_perms', $this->has_perms, FALSE, array(), NULL, NULL, NULL, 'category_has_perms' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'category_can_view_others', $this->id ? $this->can_view_others : TRUE, FALSE, array(), NULL, NULL, NULL, 'category_can_view_others' ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'allow_anonymous', $this->id ? $this->allow_anonymous : FALSE, FALSE, array() ) );
|
||||
|
||||
$form->addHeader('cms_categories_header_display');
|
||||
$templatesList = array( 0 => \IPS\Member::loggedIn()->language()->addToStack('cms_categories_use_database') );
|
||||
$templatesDisplay = array( 0 => \IPS\Member::loggedIn()->language()->addToStack('cms_categories_use_database') );
|
||||
@@ -1537,15 +1540,17 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
* Get last comment time
|
||||
*
|
||||
* @note This should return the last comment time for this node only, not for children nodes
|
||||
* @param \IPS\Member|NULL $member MemberObject
|
||||
* @return \IPS\DateTime|NULL
|
||||
*/
|
||||
public function getLastCommentTime()
|
||||
public function getLastCommentTime( \IPS\Member $member = NULL )
|
||||
{
|
||||
if( !$this->can_view_others and !\IPS\Member::loggedIn()->modPermission( 'can_content_view_others_records' ) )
|
||||
$member = $member ?: \IPS\Member::loggedIn();
|
||||
if( !$this->can_view_others and !$member->modPermission( 'can_content_view_others_records' ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$select = \IPS\Db::i()->select('record_last_comment', 'cms_custom_database_' . $this->database_id, array("record_future_date=0 AND category_id=? AND record_approved=1 AND member_id=?", $this->id, \IPS\Member::loggedIn()->member_id), 'record_last_comment DESC', 1 )->first();
|
||||
$select = \IPS\Db::i()->select('record_last_comment', 'cms_custom_database_' . $this->database_id, array("record_future_date=0 AND category_id=? AND record_approved=1 AND member_id=?", $this->id, $member->member_id ), 'record_last_comment DESC', 1 )->first();
|
||||
}
|
||||
catch ( \UnderflowException $e )
|
||||
{
|
||||
|
||||
@@ -112,6 +112,11 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
*/
|
||||
public static $modalForms = FALSE;
|
||||
|
||||
/**
|
||||
* @brief [Node] Title prefix. If specified, will look for a language key with "{$key}_title" as the key
|
||||
*/
|
||||
public static $titleLangPrefix = 'content_db_';
|
||||
|
||||
/**
|
||||
* [Brief] Bump on edit only
|
||||
*/
|
||||
@@ -480,6 +485,9 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
'perm_3' => '*'
|
||||
), array( 'perm_id=?', $perms['perm_id']) );
|
||||
|
||||
/* Save the db now to save custom field ids */
|
||||
$database->save();
|
||||
|
||||
/* Create a category */
|
||||
$categoryClass = '\IPS\cms\Categories' . $database->id;
|
||||
$category = new $categoryClass;
|
||||
@@ -927,26 +935,66 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$cat->delete();
|
||||
}
|
||||
|
||||
$fileFields = array( 'record_image', 'record_image_thumb' );
|
||||
$isMultiple = false;
|
||||
|
||||
foreach( $fieldsClass::roots( NULL ) as $id => $field )
|
||||
{
|
||||
$field->delete( TRUE );
|
||||
|
||||
if( $field->type == 'Upload' )
|
||||
{
|
||||
$fileFields[] = 'field_' . $field->id;
|
||||
|
||||
/* Delete thumbnails */
|
||||
\IPS\Task::queue( 'core', 'FileCleanup', array(
|
||||
'table' => 'cms_database_fields_thumbnails',
|
||||
'column' => 'thumb_location',
|
||||
'storageExtension' => 'cms_Records',
|
||||
'where' => array( array( 'thumb_field_id=?', $field->id ) ),
|
||||
'deleteRows' => TRUE
|
||||
), 4 );
|
||||
|
||||
if( $field->is_multiple )
|
||||
{
|
||||
$isMultiple = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Delete comments */
|
||||
\IPS\Db::i()->delete( 'cms_database_comments', array( 'comment_database_id=?', $this->id ) );
|
||||
\IPS\Db::i()->delete( 'cms_database_reviews', array( 'review_database_id=?', $this->id ) );
|
||||
|
||||
/* Delete from view counter */
|
||||
\IPS\Db::i()->delete( 'core_view_updates', array( 'classname=? ', 'IPS\cms\Records' . $this->id ) );
|
||||
|
||||
/* Delete records */
|
||||
\IPS\Db::i()->dropTable( 'cms_custom_database_' . $this->id, TRUE );
|
||||
\IPS\Task::queue( 'core', 'FileCleanup', array(
|
||||
'table' => 'cms_custom_database_' . $this->id,
|
||||
'column' => $fileFields,
|
||||
'storageExtension' => 'cms_Records',
|
||||
'primaryId' => 'primary_id_field',
|
||||
'dropTable' => 'cms_custom_database_' . $this->id,
|
||||
'multipleFiles' => $isMultiple
|
||||
), 4 );
|
||||
|
||||
/* Delete revisions */
|
||||
\IPS\Db::i()->delete( 'cms_database_revisions', array( 'revision_database_id=?', $this->id ) );
|
||||
|
||||
/* Remove any reciprocal linking */
|
||||
\IPS\Db::i()->delete( 'cms_database_fields_reciprocal_map', array( 'map_foreign_database_id=? or map_origin_database_id=?', $this->id, $this->id ) );
|
||||
|
||||
|
||||
/* Remove any fields in other databases associated to this DB */
|
||||
foreach( \IPS\Db::i()->select( '*', 'cms_database_fields', array( 'field_type=?', 'Item' ) ) as $fieldData )
|
||||
{
|
||||
$fieldClass = '\IPS\cms\Fields' . $fieldData['field_database_id'];
|
||||
if ($field = $fieldClass::load($fieldData['field_id']) AND isset( $field->extra['database'] ) and $field->extra['database'] AND $field->extra['database'] == $this->id )
|
||||
{
|
||||
$field->delete();
|
||||
}
|
||||
}
|
||||
|
||||
/* Delete notifications */
|
||||
$memberIds = array();
|
||||
|
||||
@@ -963,6 +1011,8 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
|
||||
/* remove deletion log */
|
||||
\IPS\Db::i()->delete( 'core_deletion_log', array( 'dellog_content_class=?', 'IPS\cms\Records' . $this->id ) );
|
||||
\IPS\Db::i()->delete( 'core_deletion_log', array( 'dellog_content_class=?', 'IPS\cms\Records\Comment' . $this->id ) );
|
||||
\IPS\Db::i()->delete( 'core_deletion_log', array( 'dellog_content_class=?', 'IPS\cms\Records\Review' . $this->id ) );
|
||||
|
||||
/* remove metadata */
|
||||
\IPS\Db::i()->delete( 'core_content_meta', array( "meta_class=? ", 'IPS\cms\Records' . $this->id ) );
|
||||
@@ -972,6 +1022,12 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
\IPS\Member::load( $member )->recountNotifications();
|
||||
}
|
||||
|
||||
/* Remove rss imports */
|
||||
foreach( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_rss_import', array( 'rss_import_class=?', 'IPS\cms\Records' . $this->id ) ), 'IPS\core\Rss\Import' ) as $import )
|
||||
{
|
||||
$import->delete();
|
||||
}
|
||||
|
||||
/* Remove from search */
|
||||
\IPS\Content\Search\Index::i()->removeClassFromSearchIndex( 'IPS\cms\Records' . $this->id );
|
||||
\IPS\Content\Search\Index::i()->removeClassFromSearchIndex( 'IPS\cms\Records\Comment' . $this->id );
|
||||
@@ -1096,7 +1152,7 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if any fields from other databases are linking to items in this database via the Relational field
|
||||
* Determines if any fields from other databases are crosslinking to items in this database via the Relational field
|
||||
*
|
||||
* @param int $databaseId The ID of the database
|
||||
* @return boolean
|
||||
@@ -1136,7 +1192,59 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
foreach( $fields as $fieldid => $data )
|
||||
{
|
||||
if ( $data['database'] == $databaseId and $data['crosslink'] )
|
||||
if ( $data['database'] == $databaseId and !empty( $data['crosslink'] ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if any fields from other databases are linking to items in this database via the Relational field
|
||||
*
|
||||
* @param int $databaseId The ID of the database
|
||||
* @return boolean
|
||||
*/
|
||||
public static function isUsedAsReciprocalField( int $databaseId ) : bool
|
||||
{
|
||||
if ( isset( \IPS\Data\Store::i()->database_reciprocal_links ) )
|
||||
{
|
||||
$values = \IPS\Data\Store::i()->database_reciprocal_links;
|
||||
}
|
||||
else
|
||||
{
|
||||
$values = array();
|
||||
foreach( static::databases() as $database )
|
||||
{
|
||||
$fieldsClass = 'IPS\cms\Fields' . $database->_id;
|
||||
|
||||
foreach( $fieldsClass::data() as $field )
|
||||
{
|
||||
if ( $field->type === 'Item' )
|
||||
{
|
||||
$extra = $field->extra;
|
||||
if ( ! empty( $extra['database'] ) )
|
||||
{
|
||||
$values[ $database->_id ][] = $extra;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Data\Store::i()->database_reciprocal_links = $values;
|
||||
}
|
||||
}
|
||||
|
||||
if ( \is_array( $values ) )
|
||||
{
|
||||
foreach( $values as $id => $fields )
|
||||
{
|
||||
foreach( $fields as $fieldid => $data )
|
||||
{
|
||||
if ( $data['database'] == $databaseId )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1173,17 +1281,6 @@ class _Databases extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns database data from the store
|
||||
*
|
||||
* @return array
|
||||
* @deprecated
|
||||
*/
|
||||
public static function getDatabaseDataFromStore()
|
||||
{
|
||||
return static::getStore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get output for API
|
||||
*
|
||||
|
||||
@@ -1040,6 +1040,11 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
*/
|
||||
public static function validateUnique( $val, $field, $record )
|
||||
{
|
||||
if ( $val === '' )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$database = \IPS\cms\Databases::load( static::$customDatabaseId );
|
||||
|
||||
if( $field->type == 'Member' AND $val instanceof \IPS\Member )
|
||||
@@ -1311,9 +1316,10 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
*
|
||||
* @param mixed $value The value
|
||||
* @param bool $showSensitiveInformation If TRUE, potentially sensitive data (like passwords) will be displayed - otherwise will be blanked out
|
||||
* @param string $separator Used to separate items when displaying a field with multiple values.
|
||||
* @return string
|
||||
*/
|
||||
public function displayValue( $value=NULL, $showSensitiveInformation=FALSE )
|
||||
public function displayValue( $value=NULL, $showSensitiveInformation=FALSE, $separator=NULL )
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( static::$customDatabaseId );
|
||||
|
||||
@@ -2307,8 +2313,17 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
case 'Text':
|
||||
case 'Url':
|
||||
case 'Checkbox':
|
||||
$columnDefinition['type'] = 'VARCHAR';
|
||||
$columnDefinition['length'] = 255;
|
||||
if ( !isset( $values['field_max_length'] ) OR !$values['field_max_length'] )
|
||||
{
|
||||
$columnDefinition['type'] = 'MEDIUMTEXT';
|
||||
unset( $columnDefinition['length'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$columnDefinition['type'] = 'VARCHAR';
|
||||
$columnDefinition['length'] = 255;
|
||||
}
|
||||
|
||||
$values['field_extra'] = '';
|
||||
break;
|
||||
default:
|
||||
@@ -2316,9 +2331,21 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! empty( $values['field_max_length'] ) AND empty( $columnDefinition['length'] ) )
|
||||
if ( ! empty( $values['field_max_length'] ) )
|
||||
{
|
||||
$columnDefinition['length'] = $values['field_max_length'];
|
||||
if( $values['field_max_length'] > 255 )
|
||||
{
|
||||
$columnDefinition['type'] = 'MEDIUMTEXT';
|
||||
|
||||
if( isset( $columnDefinition['length'] ) )
|
||||
{
|
||||
unset( $columnDefinition['length'] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$columnDefinition['length'] = $values['field_max_length'];
|
||||
}
|
||||
}
|
||||
else if ( empty( $columnDefinition['length'] ) )
|
||||
{
|
||||
@@ -2797,7 +2824,7 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
*/
|
||||
public function delete( $skipDrop=FALSE )
|
||||
{
|
||||
static::$contentDatabaseTable = 'cms_custom_database_' . static::$customDatabaseId;
|
||||
static::$contentDatabaseTable = NULL; // This ensures the parent class doesn't try to drop the column regardless
|
||||
static::$cache = array();
|
||||
|
||||
/* Remove reciprocal map data */
|
||||
@@ -2810,17 +2837,36 @@ class _Fields extends \IPS\CustomField implements \IPS\Node\Permissions
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
if( $this->type == 'Upload' )
|
||||
{
|
||||
\IPS\Db::i()->dropIndex( static::$contentDatabaseTable, "field_{$this->id}" );
|
||||
}
|
||||
catch ( \IPS\Db\Exception $e ) {}
|
||||
/* Delete thumbnails */
|
||||
\IPS\Task::queue( 'core', 'FileCleanup', array(
|
||||
'table' => 'cms_database_fields_thumbnails',
|
||||
'column' => 'thumb_location',
|
||||
'storageExtension' => 'cms_Records',
|
||||
'where' => array( array( 'thumb_field_id=?', $this->id ) ),
|
||||
'deleteRows' => TRUE,
|
||||
), 4 );
|
||||
|
||||
try
|
||||
/* Delete records */
|
||||
\IPS\Task::queue( 'core', 'FileCleanup', array(
|
||||
'table' => 'cms_custom_database_' . static::$customDatabaseId,
|
||||
'column' => 'field_' . $this->id,
|
||||
'storageExtension' => 'cms_Records',
|
||||
'primaryId' => 'primary_id_field',
|
||||
'dropColumn' => 'field_' . $this->id,
|
||||
'dropColumnTable' => 'cms_custom_database_' . static::$customDatabaseId,
|
||||
'multipleFiles' => $this->is_multiple
|
||||
), 4 );
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Db::i()->dropColumn( static::$contentDatabaseTable, "field_{$this->id}" );
|
||||
try
|
||||
{
|
||||
\IPS\Db::i()->dropColumn( static::$contentDatabaseTable, "field_{$this->id}" );
|
||||
}
|
||||
catch( \IPS\Db\Exception $e ) { }
|
||||
}
|
||||
catch( \IPS\Db\Exception $e ) { }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -240,9 +240,9 @@ class _Folder extends \IPS\Node\Model
|
||||
|
||||
try
|
||||
{
|
||||
$test = \IPS\cms\Pages\Folder::load( \IPS\Http\Url\Friendly::seoTitle( $val ), 'folder_name' );
|
||||
$test = \IPS\cms\Pages\Folder::load( ( $val === '.well-known' ) ? $val : \IPS\Http\Url\Friendly::seoTitle( $val ), 'folder_name' );
|
||||
|
||||
if ( ! empty( \IPS\Request::i()->id ) and $test->id != \IPS\Request::i()->id )
|
||||
if ( empty( \IPS\Request::i()->id ) or $test->id != \IPS\Request::i()->id )
|
||||
{
|
||||
throw new \InvalidArgumentException('content_folder_name_in_use');
|
||||
}
|
||||
@@ -250,7 +250,7 @@ class _Folder extends \IPS\Node\Model
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
/* If we hit here, we don't have an existing folder by that name so check for a collision */
|
||||
if ( \IPS\Request::i()->folder_parent_id == 0 AND \IPS\cms\Pages\Page::isFurlCollision( \IPS\Http\Url\Friendly::seoTitle( $val ) ) )
|
||||
if ( \IPS\Request::i()->folder_parent_id == 0 AND \IPS\cms\Pages\Page::isFurlCollision( ( $val === '.well-known' ) ? $val : \IPS\Http\Url\Friendly::seoTitle( $val ) ) )
|
||||
{
|
||||
throw new \InvalidArgumentException('content_folder_name_furl_collision');
|
||||
}
|
||||
@@ -300,7 +300,15 @@ class _Folder extends \IPS\Node\Model
|
||||
|
||||
if( isset( $values['folder_name'] ) )
|
||||
{
|
||||
$values['name'] = \IPS\Http\Url\Friendly::seoTitle( $values['folder_name'] );
|
||||
/* If the folder name is explicitly .well-known, allow that as it will allow sites on CiC to use Apple Pay */
|
||||
if ( $values['folder_name'] === '.well-known' )
|
||||
{
|
||||
$values['name'] = $values['folder_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$values['name'] = \IPS\Http\Url\Friendly::seoTitle( $values['folder_name'] );
|
||||
}
|
||||
unset( $values['folder_name'] );
|
||||
}
|
||||
|
||||
|
||||
@@ -59,11 +59,6 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
*/
|
||||
protected static $multitonMap = array();
|
||||
|
||||
/**
|
||||
* @brief [Node] Parent ID Database Column
|
||||
*/
|
||||
public static $databaseColumnParent = 'folder_id';
|
||||
|
||||
/**
|
||||
* @brief [Node] Parent Node ID Database Column
|
||||
*/
|
||||
@@ -954,17 +949,6 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
return \IPS\Data\Store::i()->pages_page_urls;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns (and builds if required) the pages id => url datastore
|
||||
*
|
||||
* @return array
|
||||
* @deprecated
|
||||
*/
|
||||
public static function getPageUrlStore()
|
||||
{
|
||||
return static::getStore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get page path, returning stripped path and current page number
|
||||
*
|
||||
@@ -1550,7 +1534,7 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
'options' => array( 0 => 'menu_manager_access_type_inherit', 1 => 'menu_manager_access_type_override' ),
|
||||
'toggles' => array( 1 => array( 'menu_manager_access' ) )
|
||||
), NULL, NULL, NULL, 'menu_manager_access_type' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'menu_manager_access', '*', NULL, array( 'multiple' => TRUE, 'options' => $groups, 'unlimited' => '*', 'unlimitedLang' => 'everyone' ), NULL, NULL, NULL, 'menu_manager_access' ) );
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'menu_manager_access', '*', NULL, array( 'multiple' => TRUE, 'options' => $groups, 'unlimited' => '*', 'unlimitedLang' => 'everyone', 'impliedUnlimited' => TRUE ), NULL, NULL, NULL, 'menu_manager_access' ) );
|
||||
}
|
||||
|
||||
if ( $pageType === 'builder' )
|
||||
@@ -2318,6 +2302,8 @@ class _Page extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
\IPS\Output::i()->breadcrumb['module'] = array( $this->url(), $this->_title );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->pageName = $this->full_path;
|
||||
|
||||
if ( isset( \IPS\Settings::i()->cms_error_page ) and \IPS\Settings::i()->cms_error_page and \IPS\Settings::i()->cms_error_page == $this->id )
|
||||
{
|
||||
|
||||
@@ -123,7 +123,7 @@ class _PageItem extends \IPS\Content\Item implements \IPS\Content\Searchable
|
||||
* @param array $reactions Reaction Data
|
||||
* @return string
|
||||
*/
|
||||
public static function searchResult( array $indexData, array $authorData, array $itemData, array $containerData = NULL, array $reputationData, $reviewRating, $iPostedIn, $view, $asItem, $canIgnoreComments=FALSE, $template=NULL, $reactions=array() )
|
||||
public static function searchResult( array $indexData, array $authorData, array $itemData, ?array $containerData, array $reputationData, $reviewRating, $iPostedIn, $view, $asItem, $canIgnoreComments=FALSE, $template=NULL, $reactions=array() )
|
||||
{
|
||||
$indexData['index_title'] = \IPS\Member::loggedIn()->language()->addToStack( 'cms_page_' . $indexData['index_item_id'] );
|
||||
return parent::searchResult( $indexData, $authorData, $itemData, $containerData, $reputationData, $reviewRating, $iPostedIn, $view, $asItem, $canIgnoreComments, $template, $reactions );
|
||||
@@ -168,7 +168,39 @@ class _PageItem extends \IPS\Content\Item implements \IPS\Content\Searchable
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->content;
|
||||
/* Remove {tags="foo"} */
|
||||
$this->content = preg_replace( '#\{([a-z]+?=([\'"]).+?\\2 ?+)}#', '', $this->content );
|
||||
|
||||
/* Convert {{}} logic into html tags */
|
||||
$this->content = preg_replace( '#{{(if|foreach)([^{]+?)}}#', '<ips$1 data="$2">', $this->content );
|
||||
$this->content = preg_replace( '#{{end(if|foreach)}}#', '</ips$1>', $this->content );
|
||||
|
||||
/* Remove custom PHP {{$foo = $this->test();}} */
|
||||
$this->content = preg_replace( '#{{(.+?)}}#', '', $this->content );
|
||||
|
||||
$source = new \IPS\Xml\DOMDocument( '1.0', 'UTF-8' );
|
||||
$source->loadHTML( \IPS\Xml\DOMDocument::wrapHtml( $this->content ) );
|
||||
|
||||
/* And then remove the HTML logic */
|
||||
$domElemsToRemove = array();
|
||||
foreach ( $source->getElementsByTagname('ipsif') as $domElement )
|
||||
{
|
||||
$domElemsToRemove[] = $domElement;
|
||||
}
|
||||
|
||||
foreach ( $source->getElementsByTagname('ipsforeach') as $domElement )
|
||||
{
|
||||
$domElemsToRemove[] = $domElement;
|
||||
}
|
||||
|
||||
foreach( $domElemsToRemove as $domElement )
|
||||
{
|
||||
$domElement->parentNode->removeChild($domElement);
|
||||
}
|
||||
|
||||
$content = \IPS\Text\DOMParser::getDocumentBodyContents( $source );
|
||||
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Post Model
|
||||
*/
|
||||
class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory, \IPS\Content\Hideable, \IPS\Content\Shareable, \IPS\Content\Searchable, \IPS\Content\Embeddable
|
||||
class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory, \IPS\Content\Hideable, \IPS\Content\Shareable, \IPS\Content\Searchable, \IPS\Content\Embeddable, \IPS\Content\Anonymous
|
||||
{
|
||||
use \IPS\Content\Reactable, \IPS\Content\Reportable;
|
||||
|
||||
@@ -76,6 +76,7 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
|
||||
'edit_member_id' => 'edit_member_id',
|
||||
'edit_reason' => 'edit_reason',
|
||||
'approved' => 'approved',
|
||||
'is_anon' => 'is_anon'
|
||||
# 'first' => 'new_topic'
|
||||
);
|
||||
|
||||
@@ -133,9 +134,18 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
|
||||
* @param \IPS\Member $member The memner
|
||||
* @return int
|
||||
*/
|
||||
public static function memberPostCount( \IPS\Member $member )
|
||||
public static function memberPostCount( \IPS\Member $member, bool $includeNonPostCountIncreasing = FALSE, bool $includeHiddenAndPendingApproval = TRUE )
|
||||
{
|
||||
return \IPS\Db::i()->select( 'COUNT(*)', static::$databaseTable, array( 'comment_database_id=? AND comment_user=?', static::$customDatabaseId, $member->member_id ) )->first();
|
||||
$where = [];
|
||||
$where[] = [ 'comment_database_id=?', static::$customDatabaseId ];
|
||||
$where[] = [ 'comment_user=?', $member->member_id ];
|
||||
|
||||
if ( !$includeHiddenAndPendingApproval )
|
||||
{
|
||||
$where[] = [ 'comment_approved=1' ];
|
||||
}
|
||||
|
||||
return \IPS\Db::i()->select( 'COUNT(*)', static::$databaseTable, $where )->first();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,7 +201,7 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
|
||||
* @param array $reactions Reaction Data
|
||||
* @return string
|
||||
*/
|
||||
public static function searchResult( array $indexData, array $authorData, array $itemData, array $containerData = NULL, array $reputationData, $reviewRating, $iPostedIn, $view, $asItem, $canIgnoreComments=FALSE, $template=NULL, $reactions=array() )
|
||||
public static function searchResult( array $indexData, array $authorData, array $itemData, ?array $containerData, array $reputationData, $reviewRating, $iPostedIn, $view, $asItem, $canIgnoreComments=FALSE, $template=NULL, $reactions=array() )
|
||||
{
|
||||
/* Ensure that the comment title is formatted correctly */
|
||||
try
|
||||
|
||||
@@ -71,6 +71,11 @@ class _CommentTopicSync extends \IPS\cms\Records\Comment
|
||||
*/
|
||||
public static $icon = 'comment';
|
||||
|
||||
/**
|
||||
* @brief [Content] Key for hide reasons
|
||||
*/
|
||||
public static $hideLogKey = 'post';
|
||||
|
||||
/**
|
||||
* @brief [Content\Comment] Comment Template
|
||||
*/
|
||||
@@ -199,13 +204,14 @@ class _CommentTopicSync extends \IPS\cms\Records\Comment
|
||||
/**
|
||||
* Post count for member
|
||||
*
|
||||
* @param \IPS\Member $member The memner
|
||||
* @param \IPS\Member $member The member
|
||||
* @param bool $includeNonPostCountIncreasing If FALSE, will skip any posts which would not cause the user's post count to increase
|
||||
* @param bool $includeHiddenAndPendingApproval If FALSE, will skip any hidden posts, or posts pending approval
|
||||
* @return int
|
||||
* @note We explicitely return 0 because any posts will be counted via the forums application inherently already
|
||||
*/
|
||||
public static function memberPostCount( \IPS\Member $member )
|
||||
public static function memberPostCount( \IPS\Member $member, bool $includeNonPostCountIncreasing = FALSE, bool $includeHiddenAndPendingApproval = TRUE )
|
||||
{
|
||||
return 0;
|
||||
return 0; // We explicitely return 0 because any posts will be counted via the forums application inherently already
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,7 +33,8 @@ class _Records extends \IPS\Content\Item implements
|
||||
\IPS\Content\Searchable,
|
||||
\IPS\Content\FuturePublishing,
|
||||
\IPS\Content\Embeddable,
|
||||
\IPS\Content\MetaData
|
||||
\IPS\Content\MetaData,
|
||||
\IPS\Content\Anonymous
|
||||
{
|
||||
use \IPS\Content\Reactable, \IPS\Content\Reportable;
|
||||
|
||||
@@ -403,12 +404,20 @@ class _Records extends \IPS\Content\Item implements
|
||||
* Definite Article
|
||||
*
|
||||
* @param \IPS\Lang|NULL $lang The language to use, or NULL for the language of the currently logged in member
|
||||
* @param integer|boolean $count Number of items. If not false, pluralized version of phrase will be used.
|
||||
* @return string
|
||||
*/
|
||||
public function definiteArticle( \IPS\Lang $lang = NULL )
|
||||
public function definiteArticle( \IPS\Lang $lang = NULL, $count = FALSE )
|
||||
{
|
||||
$lang = $lang ?: \IPS\Member::loggedIn()->language();
|
||||
return $lang->addToStack( 'content_db_lang_sl_' . static::$customDatabaseId, FALSE );
|
||||
if( $count === TRUE || ( \is_int( $count ) && $count > 1 ) )
|
||||
{
|
||||
return $lang->addToStack( 'content_db_lang_pl_' . static::$customDatabaseId, FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
return $lang->addToStack( 'content_db_lang_sl_' . static::$customDatabaseId, FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -417,12 +426,20 @@ class _Records extends \IPS\Content\Item implements
|
||||
* @param array $containerData Basic data about the container. Only includes columns returned by container::basicDataColumns()
|
||||
* @param \IPS\Lang|NULL $lang The language to use, or NULL for the language of the currently logged in member
|
||||
* @param array $options Options to pass to \IPS\Lang::addToStack
|
||||
* @param integer|boolean $count Number of items. If not false, pluralized version of phrase will be used.
|
||||
* @return string
|
||||
*/
|
||||
public static function _definiteArticle( array $containerData = NULL, \IPS\Lang $lang = NULL, $options = array() )
|
||||
public static function _definiteArticle( array $containerData = NULL, \IPS\Lang $lang = NULL, $options = array(), $count = FALSE )
|
||||
{
|
||||
$lang = $lang ?: \IPS\Member::loggedIn()->language();
|
||||
return $lang->addToStack( 'content_db_lang_sl_' . static::$customDatabaseId, FALSE, $options );
|
||||
if( $count === TRUE || ( \is_int( $count ) && $count > 1 ) )
|
||||
{
|
||||
return $lang->addToStack( 'content_db_lang_pl_' . static::$customDatabaseId, FALSE, $options );
|
||||
}
|
||||
else
|
||||
{
|
||||
return $lang->addToStack( 'content_db_lang_sl_' . static::$customDatabaseId, FALSE, $options );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -558,7 +575,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( $fieldsClass::fixedFieldFormShow( 'record_publish_date' ) AND ( \IPS\Member::loggedIn()->modPermission( "can_future_publish_content" ) or \IPS\Member::loggedIn()->modPermission( "can_future_publish_" . static::$title ) ) )
|
||||
{
|
||||
$formElements['record_publish_date'] = $elements['date'];
|
||||
@@ -569,7 +586,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
$fixedFieldSettings = static::database()->fixed_field_settings;
|
||||
$dims = TRUE;
|
||||
|
||||
if ( isset( $fixedFieldSettings['record_image']['image_dims'] ) )
|
||||
if ( isset( $fixedFieldSettings['record_image']['image_dims'] ) AND $fixedFieldSettings['record_image']['image_dims'][0] AND $fixedFieldSettings['record_image']['image_dims'][1] )
|
||||
{
|
||||
$dims = array( 'maxWidth' => $fixedFieldSettings['record_image']['image_dims'][0], 'maxHeight' => $fixedFieldSettings['record_image']['image_dims'][1] );
|
||||
}
|
||||
@@ -601,6 +618,12 @@ class _Records extends \IPS\Content\Item implements
|
||||
'unlimitedLang' => 'record_datetime_noval'
|
||||
), NULL, NULL, NULL, 'record_comment_cutoff' );
|
||||
}
|
||||
|
||||
/* Post Anonymously */
|
||||
if ( $container and $container->canPostAnonymously( $container::ANON_ITEMS ) )
|
||||
{
|
||||
$formElements['post_anonymously'] = new \IPS\Helpers\Form\YesNo( 'post_anonymously', ( $item ) ? $item->isAnonymous() : FALSE , FALSE, array( 'label' => \IPS\Member::loggedIn()->language()->addToStack( 'post_anonymously_suffix' ) ), NULL, NULL, NULL, 'post_anonymously' );
|
||||
}
|
||||
|
||||
if ( static::modPermission( 'lock', NULL, $container ) )
|
||||
{
|
||||
@@ -957,6 +980,8 @@ class _Records extends \IPS\Content\Item implements
|
||||
static::$customFields = $fieldsClass::fields( $customValues, ( $this->_new ? 'add' : 'edit' ), $container, 0, ( $this->_new ? NULL : $this ) );
|
||||
}
|
||||
|
||||
$seen = [];
|
||||
|
||||
foreach( static::$customFields as $key => $field )
|
||||
{
|
||||
$seen[] = $key;
|
||||
@@ -986,7 +1011,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
/* If we're using decimals, then the database field is set to DECIMALS, so we cannot using stringValue() */
|
||||
else if ( isset( $customValues[ $field->name ] ) and \get_class( $field ) == 'IPS\Helpers\Form\Number' and ( isset( $field->options['decimals'] ) and $field->options['decimals'] > 0 ) )
|
||||
{
|
||||
$this->$key = $field->value;
|
||||
$this->$key = ( $field->value === '' ) ? NULL : $field->value;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1144,29 +1169,10 @@ class _Records extends \IPS\Content\Item implements
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( $row->can( ( $isNew ? 'add' : 'edit' ) ) and $row->type == 'Item' )
|
||||
{
|
||||
\IPS\Db::i()->delete( 'cms_database_fields_reciprocal_map', array( 'map_origin_database_id=? and map_field_id=? and map_origin_item_id=?', static::$customDatabaseId, $row->id, $this->_id ) );
|
||||
|
||||
$field = 'field_' . $row->id;
|
||||
$extra = $row->extra;
|
||||
if ( $this->$field and ! empty( $extra['database'] ) )
|
||||
{
|
||||
foreach( explode( ',', $this->$field ) as $foreignId )
|
||||
{
|
||||
if ( $foreignId )
|
||||
{
|
||||
\IPS\Db::i()->insert( 'cms_database_fields_reciprocal_map', array(
|
||||
'map_origin_database_id' => static::$customDatabaseId,
|
||||
'map_foreign_database_id' => $extra['database'],
|
||||
'map_origin_item_id' => $this->$idColumn,
|
||||
'map_foreign_item_id' => $foreignId,
|
||||
'map_field_id' => $row->id
|
||||
) );
|
||||
}
|
||||
}
|
||||
}
|
||||
$field = $this->processItemFieldData( $row );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1229,7 +1235,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
switch( $pref )
|
||||
{
|
||||
case 'unread':
|
||||
$action = 'getNewComment';
|
||||
$action = \IPS\Member::loggedIn()->member_id ? 'getNewComment' : NULL;
|
||||
break;
|
||||
|
||||
case 'last':
|
||||
@@ -1241,6 +1247,10 @@ class _Records extends \IPS\Content\Item implements
|
||||
break;
|
||||
}
|
||||
}
|
||||
elseif( !\IPS\Member::loggedIn()->member_id AND $action == 'getNewComment' )
|
||||
{
|
||||
$action = NULL;
|
||||
}
|
||||
|
||||
if ( ! $this->recordPage )
|
||||
{
|
||||
@@ -1352,7 +1362,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
* @param string $view 'expanded' or 'condensed'
|
||||
* @return callable
|
||||
*/
|
||||
public static function searchResultSnippet( array $indexData, array $authorData, array $itemData, array $containerData = NULL, array $reputationData, $reviewRating, $view )
|
||||
public static function searchResultSnippet( array $indexData, array $authorData, array $itemData, ?array $containerData, array $reputationData, $reviewRating, $view )
|
||||
{
|
||||
/* We want the custom template only for expanded view or if we have a record image */
|
||||
|
||||
@@ -1384,7 +1394,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
switch( $pref )
|
||||
{
|
||||
case 'unread':
|
||||
$action = 'getNewComment';
|
||||
$action = \IPS\Member::loggedIn()->member_id ? 'getNewComment' : NULL;
|
||||
break;
|
||||
|
||||
case 'last':
|
||||
@@ -1396,6 +1406,10 @@ class _Records extends \IPS\Content\Item implements
|
||||
break;
|
||||
}
|
||||
}
|
||||
elseif( !\IPS\Member::loggedIn()->member_id AND $action == 'getNewComment' )
|
||||
{
|
||||
$action = NULL;
|
||||
}
|
||||
|
||||
if ( static::$pagePath === NULL )
|
||||
{
|
||||
@@ -2339,6 +2353,11 @@ class _Records extends \IPS\Content\Item implements
|
||||
*/
|
||||
public static $skipTopicCreation = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Are we creating a record? Ignore topic syncs until we are done if so.
|
||||
*/
|
||||
protected static $creatingRecord = FALSE;
|
||||
|
||||
/**
|
||||
* Create from form
|
||||
*
|
||||
@@ -2349,7 +2368,9 @@ class _Records extends \IPS\Content\Item implements
|
||||
*/
|
||||
public static function createFromForm( $values, \IPS\Node\Model $container = NULL, $sendNotification = TRUE )
|
||||
{
|
||||
static::$creatingRecord = TRUE;
|
||||
$record = parent::createFromForm( $values, $container, $sendNotification );
|
||||
static::$creatingRecord = FALSE;
|
||||
|
||||
if ( !static::$skipTopicCreation and \IPS\Application::appIsEnabled('forums') and $record->_forum_record and $record->_forum_forum and ! $record->hidden() and ! $record->record_future_date )
|
||||
{
|
||||
@@ -2383,6 +2404,38 @@ class _Records extends \IPS\Content\Item implements
|
||||
parent::processAfterEdit( $values );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the reciprocal field data
|
||||
*
|
||||
* @param mixed $row
|
||||
* @return string
|
||||
*/
|
||||
public function processItemFieldData( \IPS\cms\Fields $row ): string
|
||||
{
|
||||
$idColumn = static::$databaseColumnId;
|
||||
\IPS\Db::i()->delete( 'cms_database_fields_reciprocal_map', array('map_origin_database_id=? and map_field_id=? and map_origin_item_id=?', static::$customDatabaseId, $row->id, $this->_id) );
|
||||
|
||||
$field = 'field_' . $row->id;
|
||||
$extra = $row->extra;
|
||||
if ( $this->$field and !empty( $extra['database'] ) )
|
||||
{
|
||||
foreach ( explode( ',', $this->$field ) as $foreignId )
|
||||
{
|
||||
if ( $foreignId )
|
||||
{
|
||||
\IPS\Db::i()->insert( 'cms_database_fields_reciprocal_map', array(
|
||||
'map_origin_database_id' => static::$customDatabaseId,
|
||||
'map_foreign_database_id' => $extra['database'],
|
||||
'map_origin_item_id' => $this->$idColumn,
|
||||
'map_foreign_item_id' => $foreignId,
|
||||
'map_field_id' => $row->id
|
||||
) );
|
||||
}
|
||||
}
|
||||
}
|
||||
return $field;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback to execute when tags are edited
|
||||
*
|
||||
@@ -2434,9 +2487,26 @@ class _Records extends \IPS\Content\Item implements
|
||||
$post = \IPS\forums\Topic\Post::create( $topic, $comment, FALSE, ( isset( $values['guest_name'] ) ? $values['guest_name'] : NULL ) );
|
||||
|
||||
$commentClass = 'IPS\cms\Records\CommentTopicSync' . static::$customDatabaseId;
|
||||
|
||||
$idColumn = static::$databaseColumnId;
|
||||
$autoSaveKey = 'reply-' . static::$application . '/' . static::$module . '-' . $this->$idColumn;
|
||||
|
||||
/* First we have to update the attachment location key */
|
||||
\IPS\Db::i()->update( 'core_attachments_map', array( 'location_key' => 'forums_Forums' ), array( 'temp=?', md5( $autoSaveKey ) ) );
|
||||
|
||||
/* Then "claim" the attachments */
|
||||
$parameters = array_merge( array( $autoSaveKey ), $post->attachmentIds() );
|
||||
\IPS\File::claimAttachments( ...$parameters );
|
||||
|
||||
$topic->markRead();
|
||||
|
||||
/* Post anonymously */
|
||||
if( isset( $values[ 'post_anonymously' ] ) )
|
||||
{
|
||||
$post->setAnonymous( $values[ 'post_anonymously' ] );
|
||||
$this->syncRecordFromTopic( $topic );
|
||||
}
|
||||
|
||||
return $commentClass::load( $post->pid );
|
||||
|
||||
}
|
||||
@@ -2587,11 +2657,6 @@ class _Records extends \IPS\Content\Item implements
|
||||
return parent::lastCommenter();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Map of topic links we've already checked
|
||||
*/
|
||||
protected static $topicLinkMap = array();
|
||||
|
||||
/**
|
||||
* Is this topic linked to a record?
|
||||
*
|
||||
@@ -2600,33 +2665,13 @@ class _Records extends \IPS\Content\Item implements
|
||||
*/
|
||||
public static function topicIsLinked( $topic )
|
||||
{
|
||||
if( isset( static::$topicLinkMap[ $topic->tid ] ) )
|
||||
{
|
||||
return static::$topicLinkMap[ $topic->tid ];
|
||||
}
|
||||
|
||||
foreach( \IPS\cms\Databases::databases() as $database )
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( $database->forum_record and $database->forum_forum == $topic->container()->_id )
|
||||
{
|
||||
$class = '\IPS\cms\Records' . $database->id;
|
||||
$record = $class::load( $topic->tid, 'record_topicid' );
|
||||
|
||||
if ( $record->_forum_record )
|
||||
{
|
||||
static::$topicLinkMap[ $topic->tid ] = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( \Exception $e ) { }
|
||||
}
|
||||
|
||||
static::$topicLinkMap[ $topic->tid ] = FALSE;
|
||||
|
||||
return static::$topicLinkMap[ $topic->tid ];
|
||||
return ( static::getLinkedRecord( $topic ) === NULL ) ? FALSE : TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Cached linked record checks to prevent duplicate queries
|
||||
*/
|
||||
protected static $linkedRecordLookup = array();
|
||||
|
||||
/**
|
||||
* Is this topic linked to a record?
|
||||
@@ -2636,6 +2681,13 @@ class _Records extends \IPS\Content\Item implements
|
||||
*/
|
||||
public static function getLinkedRecord( $topic )
|
||||
{
|
||||
if( array_key_exists( $topic->tid, static::$linkedRecordLookup ) )
|
||||
{
|
||||
return static::$linkedRecordLookup[ $topic->tid ];
|
||||
}
|
||||
|
||||
static::$linkedRecordLookup[ $topic->tid ] = NULL;
|
||||
|
||||
foreach( \IPS\cms\Databases::databases() as $database )
|
||||
{
|
||||
try
|
||||
@@ -2647,14 +2699,14 @@ class _Records extends \IPS\Content\Item implements
|
||||
|
||||
if ( $record->_forum_record )
|
||||
{
|
||||
return $record;
|
||||
static::$linkedRecordLookup[ $topic->tid ] = $record;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( \Exception $e ) { }
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return static::$linkedRecordLookup[ $topic->tid ];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2693,6 +2745,12 @@ class _Records extends \IPS\Content\Item implements
|
||||
throw new \UnexpectedValueException('content_record_no_forum_app_for_topic');
|
||||
}
|
||||
|
||||
/* If we're in the middle of creating a record, don't sync the topic yet */
|
||||
if( static::$creatingRecord === TRUE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fetch the forum */
|
||||
try
|
||||
{
|
||||
@@ -2784,8 +2842,20 @@ class _Records extends \IPS\Content\Item implements
|
||||
|
||||
$topic->topic_firstpost = $post->pid;
|
||||
$topic->save();
|
||||
|
||||
if( $this->isAnonymous() )
|
||||
{
|
||||
$topic->setAnonymous( TRUE, $this->author );
|
||||
$post->setAnonymous( TRUE, $this->author );
|
||||
}
|
||||
|
||||
$topic->markRead();
|
||||
|
||||
/* Send notifications */
|
||||
if ( !$topic->isFutureDate() AND !$topic->hidden() )
|
||||
{
|
||||
$topic->sendNotifications();
|
||||
}
|
||||
|
||||
/* Update file */
|
||||
$this->record_topicid = $topic->tid;
|
||||
@@ -2945,7 +3015,6 @@ class _Records extends \IPS\Content\Item implements
|
||||
}
|
||||
|
||||
/* Remove Record Image And Record Thumb Image */
|
||||
|
||||
if ( $this->record_image )
|
||||
{
|
||||
try
|
||||
@@ -2964,6 +3033,34 @@ class _Records extends \IPS\Content\Item implements
|
||||
catch ( \Exception $e ) { }
|
||||
}
|
||||
|
||||
/* Clean up any other uploaded files */
|
||||
$fieldsClass = '\IPS\cms\Fields' . static::$customDatabaseId;
|
||||
foreach( $fieldsClass::roots( NULL ) as $id => $field )
|
||||
{
|
||||
if( $field->type == 'Upload' )
|
||||
{
|
||||
$fieldName = 'field_' . $field->id;
|
||||
|
||||
if ( $this->$fieldName )
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\File::get( 'cms_Records', $this->$fieldName )->delete();
|
||||
}
|
||||
catch( \Exception $e ){}
|
||||
}
|
||||
|
||||
/* Delete thumbnails */
|
||||
foreach( \IPS\Db::i()->select( '*', 'cms_database_fields_thumbnails', array( array( 'thumb_field_id=? AND thumb_record_id=?', $field->id, $this->primary_id_field ) ) ) as $thumb )
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\File::get( 'cms_Records', $thumb['thumb_location'] )->delete();
|
||||
}
|
||||
catch( \Exception $e ){}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove any reciprocal linking */
|
||||
\IPS\Db::i()->delete( 'cms_database_fields_reciprocal_map', array( 'map_origin_database_id=? and map_origin_item_id=?', static::database()->id, $this->_id ) );
|
||||
@@ -3378,7 +3475,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
* @param string $exclude Predetermined array of member IDs to exclude
|
||||
* @return void
|
||||
*/
|
||||
public function setFieldQuoteAndMentionExcludes( array $exclude = array() ): void
|
||||
public function setFieldQuoteAndMentionExcludes( array $exclude = array() )
|
||||
{
|
||||
$className = 'IPS\cms\Fields' . static::$customDatabaseId;
|
||||
foreach( $className::data() AS $field )
|
||||
@@ -3558,6 +3655,26 @@ class _Records extends \IPS\Content\Item implements
|
||||
return $this->deleteLogPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Online List Permissions
|
||||
*
|
||||
* @return string Comma-delimited values or '*'
|
||||
* @li Number indicates a group
|
||||
* @li Number prepended by "m" indicates a member
|
||||
* @li Number prepended by "s" indicates a social group
|
||||
*/
|
||||
public function onlineListPermissions()
|
||||
{
|
||||
/* If search is disabled for this database, we want to use the page/category permissions
|
||||
instead of falling back to searchIndexPermissions */
|
||||
if( ! static::database()->search )
|
||||
{
|
||||
return $this->container()->readPermissionMergeWithPage();
|
||||
}
|
||||
|
||||
return parent::onlineListPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get output for API
|
||||
*
|
||||
@@ -3579,13 +3696,23 @@ class _Records extends \IPS\Content\Item implements
|
||||
* @apiresponse bool hidden Event is hidden
|
||||
* @apiresponse bool pinned Event is pinned
|
||||
* @apiresponse bool featured Event is featured
|
||||
* @apiresponse string url URL
|
||||
* @apiresponse string|NULL url URL, or NULL if the database has not been embedded onto a page
|
||||
* @apiresponse float rating Average Rating
|
||||
* @apiresponse string image Record Image
|
||||
* @apiresponse \IPS\forums\Topic topic The topic
|
||||
*/
|
||||
public function apiOutput( \IPS\Member $authorizedMember = NULL )
|
||||
{
|
||||
/* You can have a database that is not embedded onto a page */
|
||||
try
|
||||
{
|
||||
$url = (string) $this->url();
|
||||
}
|
||||
catch( \LogicException $e )
|
||||
{
|
||||
$url = NULL;
|
||||
}
|
||||
|
||||
return array(
|
||||
'id' => $this->primary_id_field,
|
||||
'title' => $this->_title,
|
||||
@@ -3603,7 +3730,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
'hidden' => (bool) $this->hidden(),
|
||||
'pinned' => (bool) $this->mapped('pinned'),
|
||||
'featured' => (bool) $this->mapped('featured'),
|
||||
'url' => (string) $this->url(),
|
||||
'url' => $url,
|
||||
'rating' => $this->averageRating(),
|
||||
'image' => $this->record_image ? (string) \IPS\File::get( 'cms_Records', $this->record_image )->url : null,
|
||||
'topic' => $this->topicid ? $this->topic()->apiOutput( $authorizedMember ) : NULL,
|
||||
@@ -3730,10 +3857,10 @@ class _Records extends \IPS\Content\Item implements
|
||||
/**
|
||||
* Get a count of the database table
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
* @param bool $approximate Accept an approximate result if the table is large (approximate results are faster on large tables)
|
||||
* @return int
|
||||
*/
|
||||
public static function databaseTableCount()
|
||||
public static function databaseTableCount( bool $approximate=FALSE ): int
|
||||
{
|
||||
if ( static::$databaseTable == NULL )
|
||||
{
|
||||
@@ -3741,7 +3868,7 @@ class _Records extends \IPS\Content\Item implements
|
||||
}
|
||||
else
|
||||
{
|
||||
return parent::databaseTableCount();
|
||||
return parent::databaseTableCount( $approximate );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -600,6 +600,8 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
$form->addMessage( 'cms_templates_export_description_app', 'ipsMessage ipsMessage_general' );
|
||||
}
|
||||
|
||||
$templates = [];
|
||||
|
||||
foreach( \IPS\cms\Templates::getTemplates( \IPS\cms\Templates::RETURN_DATABASE_ONLY + \IPS\cms\Templates::RETURN_ALL ) as $template )
|
||||
{
|
||||
$title = \IPS\cms\Templates::readableGroupName( $template->group );
|
||||
@@ -816,15 +818,15 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
public static function importUserTemplateXml( string $filePath=NULL, string $fileContents=NULL ):? \IPS\Http\Url\Internal
|
||||
{
|
||||
/* Open XML file */
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
|
||||
if( $filePath )
|
||||
{
|
||||
$xml->open( $filePath );
|
||||
$xml = \IPS\Xml\XMLReader::safeOpen( $filePath );
|
||||
}
|
||||
elseif( $fileContents )
|
||||
{
|
||||
if( !$xml->xml( $fileContents ) )
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
|
||||
if( !$xml->xml( $fileContents, NULL, LIBXML_NONET ) )
|
||||
{
|
||||
throw \UnexpectedValueException('bad_xml_string');
|
||||
}
|
||||
@@ -1027,8 +1029,7 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
}
|
||||
|
||||
/* Open XML file */
|
||||
$xml = new \IPS\Xml\XMLReader;
|
||||
$xml->open( $file );
|
||||
$xml = \IPS\Xml\XMLReader::safeOpen( $file );
|
||||
$xml->read();
|
||||
|
||||
while( $xml->read() )
|
||||
@@ -1162,6 +1163,16 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
if ( isset( static::$multitons[ $this->id ] ) )
|
||||
{
|
||||
unset( static::$multitons[ $this->id ] );
|
||||
|
||||
if( isset( static::$multitonMap['template_id'][ $this->id ] ) )
|
||||
{
|
||||
unset( static::$multitonMap['template_id'][ $this->id ] );
|
||||
}
|
||||
|
||||
if( isset( static::$multitonMap['template_key'][ $this->key ] ) )
|
||||
{
|
||||
unset( static::$multitonMap['template_key'][ $this->key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1173,6 +1184,16 @@ class _Templates extends \IPS\Patterns\ActiveRecord
|
||||
if ( isset( static::$multitons[ $this->id ] ) )
|
||||
{
|
||||
unset( static::$multitons[ $this->id ] );
|
||||
|
||||
if( isset( static::$multitonMap['template_id'][ $this->id ] ) )
|
||||
{
|
||||
unset( static::$multitonMap['template_id'][ $this->id ] );
|
||||
}
|
||||
|
||||
if( isset( static::$multitonMap['template_key'][ $this->key ] ) )
|
||||
{
|
||||
unset( static::$multitonMap['template_key'][ $this->key ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -183,7 +183,7 @@ class _DatabaseFilters extends \IPS\Widget
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
$url = $category->url()->setQueryString( array( 'advanced_search_submitted' => 1, 'csrfKey' => \IPS\Session::i()->csrfKey ) );
|
||||
$url = $category->url()->setQueryString( array( 'advanced_search_submitted' => 1 ) );
|
||||
$cookie = array();
|
||||
$params = array();
|
||||
foreach( $values as $k => $v )
|
||||
|
||||
@@ -98,7 +98,7 @@ class _RecordFeed extends \IPS\Content\Widget
|
||||
);
|
||||
|
||||
$class = static::$class;
|
||||
foreach ( array( 'num_comments', 'date', 'views', 'rating_average' ) as $k )
|
||||
foreach ( array( 'num_comments', 'views', 'rating_average' ) as $k )
|
||||
{
|
||||
if ( isset( $class::$databaseColumnMap[ $k ] ) )
|
||||
{
|
||||
|
||||
@@ -75,10 +75,14 @@ class _pagebuilderoembed extends \IPS\Widget\StaticCache implements \IPS\Widget\
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
if ( isset( $this->configuration['video_url'] ) AND $embed = \IPS\Text\Parser::embeddableMedia( \IPS\Http\Url::external( $this->configuration['video_url'] ) ) )
|
||||
try
|
||||
{
|
||||
return $this->output( $embed );
|
||||
if ( isset( $this->configuration['video_url'] ) AND $embed = \IPS\Text\Parser::embeddableMedia( \IPS\Http\Url::external( $this->configuration['video_url'] ) ) )
|
||||
{
|
||||
return $this->output( $embed );
|
||||
}
|
||||
}
|
||||
catch( \UnexpectedValueException $e ){}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user