Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -19,6 +19,7 @@ use IPS\Content\Search\Index;
|
||||
use IPS\Data\Store;
|
||||
use IPS\DateTime;
|
||||
use IPS\Db;
|
||||
use IPS\Dispatcher;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Lang;
|
||||
use IPS\Log;
|
||||
@@ -453,6 +454,26 @@ class Application extends SystemApplication
|
||||
return $blocks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can manage the widgets
|
||||
*
|
||||
* @param Member|null $member Member we are checking against or NULL for currently logged on user
|
||||
* @return boolean
|
||||
*/
|
||||
public function canManageWidgets( Member $member=NULL ): bool
|
||||
{
|
||||
/* Are we viewing an older version of a page? */
|
||||
if( Dispatcher::checkLocation( 'front', 'cms', 'pages', 'page' ) )
|
||||
{
|
||||
if( empty( Request::i()->do ) and isset( Request::i()->version ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return parent::canManageWidgets( $member );
|
||||
}
|
||||
|
||||
/**
|
||||
* Developer sync items
|
||||
*
|
||||
@@ -521,7 +542,8 @@ class Application extends SystemApplication
|
||||
Lang::saveCustom( 'cms', "content_db_lang_sl_" . $database->id . '_pl', 'Articles' );
|
||||
Lang::saveCustom( 'cms', "digest_area_cms_records" . $database->id, "Articles" );
|
||||
Lang::saveCustom( 'cms', "cms_records" . $database->id . '_pl', 'Article' );
|
||||
|
||||
Lang::saveCustom( 'cms', 'cms_page_1', 'Articles' );
|
||||
|
||||
try
|
||||
{
|
||||
Databases::createDatabase( $database );
|
||||
@@ -650,7 +672,7 @@ HTML;
|
||||
);
|
||||
|
||||
$area = Area::create( 'col1', $defaultWidgets );
|
||||
$page->saveArea( $area );
|
||||
$page->saveArea( $area, false );
|
||||
|
||||
/* Add block container (custom)*/
|
||||
$container = new Container;
|
||||
|
||||
+199
-160
@@ -430,7 +430,7 @@
|
||||
<template template_key="database_category_articles_entry" template_title="entry" template_desc="" template_location="database" template_group="category_articles" template_params="$record, $database" template_app="" template_type="template"><![CDATA[<article class="ipsData__item {{if $record->hidden()}}ipsModerated{{endif}}" {{if $record->unread()}}data-ips-unread{{else}}data-ips-read{{endif}}>
|
||||
<a href='{$record->url( "getPrefComment" )}' class="ipsLinkPanel" aria-hidden="true" tabindex="-1"><span>{wordbreak="$record->_title"}</span></a>
|
||||
{{if $record->showRecordImage()}}
|
||||
<a href='{$record->url( "getPrefComment" )}' class="ipsData__image" aria-hidden="true" tabindex="-1">
|
||||
<a href='{$record->url( "getPrefComment" )}' class="ipsData__image" aria-hidden="true" tabindex="-1" aria-hidden="true" tabindex="-1">
|
||||
{{if $record->record_image}}
|
||||
<img src='{file="$record->record_image" extension="cms_Records"}' loading="lazy" alt="">
|
||||
{{else}}
|
||||
@@ -530,7 +530,7 @@
|
||||
{{endif}}
|
||||
|
||||
{{if \count($articles)}}
|
||||
<section class='ipsBox ipsPull'>
|
||||
<section class='ipsBox ipsBox--cmsCategoryArticles ipsPull'>
|
||||
<i-data>
|
||||
<div class="ipsData ipsData--entries ipsData--{$database->display_settings['index']['layout']} ipsData--cms-category-articles">
|
||||
{{foreach $articles as $id => $record}}
|
||||
@@ -538,21 +538,25 @@
|
||||
{{endforeach}}
|
||||
</div>
|
||||
</i-data>
|
||||
<div class="ipsButtonBar ipsButtonBar--bottom">
|
||||
<div class="ipsButtonBar__pagination" data-role="tablePagination">
|
||||
{template="pagination" app="core" location="global" group="global" params="$url, $pagination['pages'], $pagination['page'], ( $database->field_perpage ?? 25 ), TRUE, 'page'"}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{endif}}
|
||||
{template="pagination" app="core" location="global" group="global" params="$url, $pagination['pages'], $pagination['page'], ( $database->field_perpage ?? 25 ), TRUE, 'page'"}]]></template>
|
||||
{{endif}}]]></template>
|
||||
<template template_key="database_category_index_categoryRow" template_title="categoryRow" template_desc="" template_location="database" template_group="category_index" template_params="$category" template_app="" template_type="template"><![CDATA[{{$RecordsClass = $category::$contentItemClass;}}
|
||||
{{if $category->can('view')}}
|
||||
{{$lastPost = $category->lastPost();}}
|
||||
<li class="ipsData__item" data-categoryID="{$category->_id}" {{if $RecordsClass::containerUnread( $category )}}data-ips-unread{{else}}data-ips-read{{endif}}>
|
||||
<a href="{$category->url()}" class="ipsLinkPanel" aria-hidden="true" tabindex="-1"><span>{$category->_title}</span></a>
|
||||
<figure class="ipsData__image">
|
||||
<div class="ipsData__image" aria-hidden="true">
|
||||
{{if $image = $category->primaryImage()}}
|
||||
<img src="{$image->url}" alt="" loading="lazy">
|
||||
{{else}}
|
||||
<span class='ipsIcon ipsIcon--fa' aria-hidden="true"><i class="fa-ips"></i></span>
|
||||
{{endif}}
|
||||
</figure>
|
||||
</div>
|
||||
<div class="ipsData__content">
|
||||
<div class="ipsData__main">
|
||||
<h4 class="ipsData__title">
|
||||
@@ -623,7 +627,7 @@
|
||||
</header>
|
||||
<section>
|
||||
<ol class='cCmsDatabase_index' data-controller='core.global.core.table, forums.front.forum.forumList' data-baseURL=''>
|
||||
<li class='ipsBox ipsPull'>
|
||||
<li class='ipsBox ipsBox--cmsDatabaseCategory ipsPull'>
|
||||
<h2 class="ipsBox__header">
|
||||
{lang="content_categories_title"}
|
||||
</h2>
|
||||
@@ -735,6 +739,9 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $comment->getVi
|
||||
{{if member.modPermission('mod_see_warn') and $comment->warning}}
|
||||
{template="commentWarned" group="global" app="core" params="$comment"}
|
||||
{{endif}}
|
||||
{{if $comment->showRecognized()}}
|
||||
{template="commentRecognized" group="global" app="core" params="$comment"}
|
||||
{{endif}}
|
||||
{{if $comment->hidden() AND $comment->hidden() != -2}}
|
||||
<div class='ipsEntry__hiddenMessage'>{$comment->hiddenBlurb()}</div>
|
||||
{{elseif $comment->hidden() == -2}}
|
||||
@@ -762,22 +769,26 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $comment->getVi
|
||||
{{endif}}
|
||||
{{if $comment->canEdit() || $comment->canSplit() || $comment->canHide()}}
|
||||
<li>
|
||||
<a href='#elControlsCommentsSub_{$comment->$idField}_menu' id='elControlsCommentsSub_{$comment->$idField}' data-ipsMenu data-ipsMenu-appendTo='#comment-{$comment->$idField}_wrap'><span>{lang="moderator_tools"}</span><i class='fa-solid fa-caret-down'></i></a>
|
||||
<ul id='elControlsCommentsSub_{$comment->$idField}_menu' class='ipsMenu ipsMenu_auto 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>
|
||||
{{else}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $comment->canSplit()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
|
||||
{{endif}}
|
||||
{{if \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Hideable' ) and $comment->canHide()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
<button type="button" id="elControlsCommentsSub_{$comment->$idField}" popovertarget="elControlsCommentsSub_{$comment->$idField}_menu"><span>{lang="moderator_tools"}</span><i class='fa-solid fa-caret-down'></i></button>
|
||||
<i-dropdown popover id="elControlsCommentsSub_{$comment->$idField}_menu">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
{{if $comment->canEdit()}}
|
||||
{{if $comment->mapped('first') and $comment->item()->canEdit()}}
|
||||
<li><a href='{$comment->item()->url()->setQueryString( 'do', 'edit' )}'>{lang="edit"}</a></li>
|
||||
{{else}}
|
||||
<li><a href='{$comment->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $comment->canSplit()}}
|
||||
<li><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
|
||||
{{endif}}
|
||||
{{if \IPS\IPS::classUsesTrait( $comment, 'IPS\Content\Hideable' ) and $comment->canHide()}}
|
||||
<li><a href='{$comment->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
@@ -810,13 +821,17 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $comment->getVi
|
||||
{{$itemClassSafe = str_replace( '\\', '_', mb_substr( $comment::$itemClass, 4 ) );}}
|
||||
{{if $comment->isIgnored()}}
|
||||
<div class='ipsEntry ipsEntry--ignored' id='elIgnoreComment_{$comment->$idField}' data-ignoreCommentID='elComment_{$comment->$idField}' data-ignoreUserID='{$comment->author()->member_id}'>
|
||||
<i class="fa-solid fa-user-slash"></i> {lang="ignoring_content" sprintf="$comment->author()->name"} <a href='#elIgnoreComment_{$comment->$idField}_menu' data-ipsMenu data-ipsMenu-menuID='elIgnoreComment_{$comment->$idField}_menu' data-ipsMenu-appendTo='#elIgnoreComment_{$comment->$idField}' data-action="ignoreOptions" title='{lang="see_post_ignore_options"}'>{lang="options"} <i class='fa-solid fa-caret-down'></i></a>
|
||||
<ul class='ipsMenu ipsHide' id='elIgnoreComment_{$comment->$idField}_menu'>
|
||||
<li class='ipsMenu_item' data-ipsMenuValue='showPost'><a href='#'>{lang="show_this_comment"}</a></li>
|
||||
<li class='ipsMenu_sep'><hr></li>
|
||||
<li class='ipsMenu_item' data-ipsMenuValue='stopIgnoring'><a href='{url="app=core&module=system&controller=ignore&do=remove&id={$comment->author()->member_id}" seoTemplate="ignore"}'>{lang="stop_ignoring_posts_by" sprintf="$comment->author()->name"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{url="app=core&module=system&controller=ignore" seoTemplate="ignore"}'>{lang="change_ignore_preferences"}</a></li>
|
||||
</ul>
|
||||
<i class="fa-solid fa-user-slash"></i> {lang="ignoring_content" sprintf="$comment->author()->name"} <button type="button" id="elIgnoreComment_{$comment->$idField}" popovertarget="elIgnoreComment_{$comment->$idField}_menu" data-action="ignoreOptions" title='{lang="see_post_ignore_options"}'>{lang="options"} <i class='fa-solid fa-caret-down'></i></button>
|
||||
<i-dropdown popover id="elIgnoreComment_{$comment->$idField}_menu">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
<li><button type="button" data-ipsMenuValue='showPost'>{lang="show_this_comment"}</button></li>
|
||||
<li><hr></li>
|
||||
<li><a href='{url="app=core&module=system&controller=ignore&do=remove&id={$comment->author()->member_id}" seoTemplate="ignore"}' data-ipsMenuValue='stopIgnoring'>{lang="stop_ignoring_posts_by" sprintf="$comment->author()->name"}</a></li>
|
||||
<li><a href='{url="app=core&module=system&controller=ignore" seoTemplate="ignore"}'>{lang="change_ignore_preferences"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
@@ -949,7 +964,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $comment->getVi
|
||||
</span>
|
||||
{{endif}}
|
||||
</p>
|
||||
<div class="ipsPhotoPanel__secondary">{datetime="$record->mapped( 'date' )"}</div>
|
||||
<div class="ipsPhotoPanel__secondary">{datetime="$record->mapped( 'date' )"} · {lang="num_views_with_number" pluralize="$record->record_views"}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1123,46 +1138,50 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
{{if \count( $item->reviewMultimodActions() )}}
|
||||
<input type="checkbox" name="multimod[{$review->id}]" value="1" data-role="moderation" data-actions="{{if $review->hidden() === -1 AND $review->canUnhide()}}unhide{{elseif $review->hidden() === 1 AND $review->canUnhide()}}approve{{elseif $review->canHide()}}hide{{endif}} {{if $review->canDelete()}}delete{{endif}}" data-state='{{if $review->tableStates()}}{$review->tableStates()}{{endif}}' class="ipsInput ipsInput--toggle">
|
||||
{{endif}}
|
||||
<a href='#elControlsReviews_{$review->id}_menu' class='ipsEntry__topButton ipsEntry__topButton--ellipsis' id='elControlsReviews_{$review->id}' title='{lang="more_options"}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'><i class='fa-solid fa-ellipsis'></i><span class='ipsInvisible'>{lang="more_options"}</span></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')}' {{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}}
|
||||
{{if ! \IPS\Output::i()->reduceLinks()}}
|
||||
<li class='ipsMenu_item'>
|
||||
<a href='{$review->shareableUrl('review')}' title='{lang="share_this_review"}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-content='#elShareReview_{$review->id}_menu' data-ipsDialog-title="{lang="share_this_review"}" id='elShareReview_{$review->id}' data-role='shareComment'>{lang="share_this_review"}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if $review->canEdit() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') ) || ( \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Hideable' ) && ( ( !$review->hidden() and $review->canHide() ) || ( $review->hidden() and $review->canUnhide() ) ) ) || $review->canDelete()}}
|
||||
<li class='ipsMenu_sep'><hr></li>
|
||||
{{endif}}
|
||||
|
||||
{{if $review->canEdit()}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
|
||||
{{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>
|
||||
<li class='ipsMenu_item'><a href='{$review->url('delete')->csrf()->setQueryString( 'immediately', 1 )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li>
|
||||
{{else}}
|
||||
{{if \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Hideable' )}}
|
||||
{{if !$review->hidden() and $review->canHide()}}
|
||||
<li class='ipsMenu_item'><a href='{{if $review::$hideLogKey}}{$review->url('hide')}{{else}}{$review->url('hide')->csrf()}{{endif}}' 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>
|
||||
<button type="button" id='elControlsReviews_{$review->id}' popovertarget="elControlsReviews_{$review->id}_menu" class='ipsEntry__topButton ipsEntry__topButton--ellipsis' title='{lang="more_options"}'><i class='fa-solid fa-ellipsis'></i><span class='ipsInvisible'>{lang="more_options"}</span></button>
|
||||
<i-dropdown popover id="elControlsReviews_{$review->id}_menu">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
{{if $review->canReportOrRevoke() === TRUE}}
|
||||
<li>
|
||||
<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}}
|
||||
{{if \IPS\Application::appIsEnabled('cloud')}}
|
||||
<li>{template="spam" app="cloud" group="spam" params="$review, FALSE"}</li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $review->canDelete()}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('delete')->csrf()->setPage('page',\IPS\Request::i()->page)}' data-action='deleteComment' data-updateOnDelete="#reviewCount">{lang="delete"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</ul>
|
||||
{{if ! \IPS\Output::i()->reduceLinks()}}
|
||||
<li>
|
||||
<a href='{$review->shareableUrl('review')}' title='{lang="share_this_review"}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-content='#elShareReview_{$review->id}_menu' data-ipsDialog-title="{lang="share_this_review"}" id='elShareReview_{$review->id}' data-role='shareComment'>{lang="share_this_review"}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if $review->canEdit() || ( $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') ) || ( \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Hideable' ) && ( ( !$review->hidden() and $review->canHide() ) || ( $review->hidden() and $review->canUnhide() ) ) ) || $review->canDelete()}}
|
||||
<li><hr></li>
|
||||
{{endif}}
|
||||
|
||||
{{if $review->canEdit()}}
|
||||
<li><a href='{$review->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
|
||||
{{if $review->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content')}}
|
||||
<li><a href='{$review->url('restore')->csrf()}' data-confirm data-confirmSubMessage='{lang="restore_as_visible_desc"}'>{lang="restore_as_visible"}</a></li>
|
||||
<li><a href='{$review->url('restore')->csrf()->setQueryString( 'restoreAsHidden', 1 )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li>
|
||||
<li><a href='{$review->url('delete')->csrf()->setQueryString( 'immediately', 1 )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li>
|
||||
{{else}}
|
||||
{{if \IPS\IPS::classUsesTrait( $review, 'IPS\Content\Hideable' )}}
|
||||
{{if !$review->hidden() and $review->canHide()}}
|
||||
<li><a href='{{if $review::$hideLogKey}}{$review->url('hide')}{{else}}{$review->url('hide')->csrf()}{{endif}}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
{{elseif $review->hidden() and $review->canUnhide()}}
|
||||
<li><a href='{$review->url('unhide')->csrf()}'>{lang="unhide"}</a></li>
|
||||
{{endif}}
|
||||
{{if \IPS\Application::appIsEnabled('cloud')}}
|
||||
<li>{template="spam" app="cloud" group="spam" params="$review, FALSE"}</li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $review->canDelete()}}
|
||||
<li><a href='{$review->url('delete')->csrf()->setPage('page',\IPS\Request::i()->page)}' data-action='deleteComment' data-updateOnDelete="#reviewCount">{lang="delete"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
{{if $review->author()->member_id}}
|
||||
<!-- Expand mini profile -->
|
||||
<button class='ipsEntry__topButton ipsEntry__topButton--profile' type='button' aria-controls='mini-profile-review-{$review->id}' aria-expanded='false' data-ipscontrols data-ipscontrols-src="{$review->authorMiniProfileUrl}" aria-label="Toggle mini profile"><i class="fa-solid fa-chevron-down" aria-hidden="true"></i></button>
|
||||
@@ -1201,20 +1220,24 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
<div class='i-flex i-align-items_center i-justify-content_space-between i-margin-bottom_2'>
|
||||
<h4 class='ipsTitle ipsTitle--h5'>{lang="review_response_title"}</h4>
|
||||
{{if $review->canEditResponse() OR $review->canDeleteResponse()}}
|
||||
<a href='#elControlsReviews_{$review->id}_response_menu' class='ipsEntry__topButton ipsEntry__topButton--ellipsis' id='elControlsReviews_{$review->id}_response' title='{lang="more_options"}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'><i class='fa-solid fa-ellipsis'></i></a>
|
||||
<button type="button" id='elControlsReviews_{$review->id}_response' popovertarget='elControlsReviews_{$review->id}_response_menu' class='ipsEntry__topButton ipsEntry__topButton--ellipsis' title='{lang="more_options"}'><i class='fa-solid fa-ellipsis'></i></button>
|
||||
{{endif}}
|
||||
</div>
|
||||
<div data-role="reviewResponse" class="ipsRichText" 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='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}}
|
||||
{{if $review->canDeleteResponse()}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('deleteResponse')->csrf()}' data-confirm>{lang="delete"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
<i-dropdown id="elControlsReviews_{$review->id}_response_menu" popover>
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
{{if $review->canEditResponse()}}
|
||||
<li><a href='{$review->url('editResponse')}' data-ipsDialog data-ipsDialog-title='{lang="review_author_respond"}'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
{{if $review->canDeleteResponse()}}
|
||||
<li><a href='{$review->url('deleteResponse')->csrf()}' data-confirm>{lang="delete"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
{{endif}}
|
||||
</div>
|
||||
{{endif}}
|
||||
@@ -1245,19 +1268,23 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
{{endif}}
|
||||
{{if $review->canEdit() || $review->canSplit()}}
|
||||
<li>
|
||||
<a href='#elControlsReviewsSub_{$review->id}_menu' id='elControlsReviewsSub_{$review->id}' data-ipsMenu data-ipsMenu-appendTo='#review-{$review->id}_wrap'><span>{lang="options"}</span><i class='fa-solid fa-caret-down'></i></a>
|
||||
<ul id='elControlsReviewsSub_{$review->id}_menu' class='ipsMenu ipsMenu_narrow ipsHide'>
|
||||
{{if $review->canEdit()}}
|
||||
{{if $review->mapped('first') and $review->item()->canEdit()}}
|
||||
<li class='ipsMenu_item'><a href='{$review->item()->url()->setQueryString( 'do', 'edit' )}'>{lang="edit"}</a></li>
|
||||
{{else}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $review->canSplit()}}
|
||||
<li class='ipsMenu_item'><a href='{$review->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
<button type="button" id="elControlsReviewsSub_{$review->id}" popovertarget="elControlsReviewsSub_{$review->id}_menu"><span>{lang="options"}</span><i class='fa-solid fa-caret-down'></i></button>
|
||||
<i-dropdown popover id="elControlsReviewsSub_{$review->id}_menu">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
{{if $review->canEdit()}}
|
||||
{{if $review->mapped('first') and $review->item()->canEdit()}}
|
||||
<li><a href='{$review->item()->url()->setQueryString( 'do', 'edit' )}'>{lang="edit"}</a></li>
|
||||
{{else}}
|
||||
<li><a href='{$review->url('edit')}' data-action='editComment'>{lang="edit"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $review->canSplit()}}
|
||||
<li><a href='{$review->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{elseif $review->hidden() !== 1 && $review->canRespond()}}
|
||||
@@ -1291,30 +1318,30 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
</article>
|
||||
{{endif}}]]></template>
|
||||
<template template_key="database_display_reviews" template_title="reviews" template_desc="" template_location="database" template_group="display" template_params="$record" template_app="" template_type="template"><![CDATA[<div data-controller='core.front.core.commentFeed' {{if settings.auto_polling_enabled}}data-autoPoll{{endif}} data-commentsType='reviews' data-baseURL='{$record->url()}' {{if $record->isLastPage('reviews')}}data-lastPage{{endif}} data-feedID='{$record->reviewFeedId}' id='reviews' data-follow-area-id="records{$record::$customDatabaseId}-{$record->primary_id_field}">
|
||||
{{if $record->reviewForm()}}
|
||||
<div class="ipsComposeAreaWrapper">
|
||||
<div class="ipsComposeAreaWrapper">
|
||||
{{if $record->reviewForm()}}
|
||||
{{if $record->locked()}}
|
||||
<strong class='i-color_warning'><i class='fa-solid fa-circle-info'></i> {lang="item_locked_can_review"}</strong>
|
||||
{{endif}}
|
||||
<div id='elRecordReviewForm'>
|
||||
{$record->reviewForm()|raw}
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
{{if $record->hasReviewed()}}
|
||||
<!-- Already reviewed -->
|
||||
{{elseif $record->locked()}}
|
||||
{template="commentUnavailable" group="forms" location="front" app="core" params="'item_locked_cannot_review'"}
|
||||
{{elseif \IPS\Member::loggedin()->restrict_post}}
|
||||
{{if \IPS\Member::loggedIn()->restrict_post == -1}}
|
||||
{template="reviewUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment'"}
|
||||
{{else}}
|
||||
{template="reviewUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment', \IPS\Member::loggedIn()->warnings(5,NULL,'rpa'), \IPS\Member::loggedIn()->restrict_post"}
|
||||
{{else}}
|
||||
{{if $record->hasReviewed()}}
|
||||
<!-- Already reviewed -->
|
||||
{{elseif $record->locked()}}
|
||||
{template="commentUnavailable" group="forms" location="front" app="core" params="'item_locked_cannot_review'"}
|
||||
{{elseif \IPS\Member::loggedin()->restrict_post}}
|
||||
{{if \IPS\Member::loggedIn()->restrict_post == -1}}
|
||||
{template="reviewUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment'"}
|
||||
{{else}}
|
||||
{template="reviewUnavailable" group="forms" location="front" app="core" params="'restricted_cannot_comment', \IPS\Member::loggedIn()->warnings(5,NULL,'rpa'), \IPS\Member::loggedIn()->restrict_post"}
|
||||
{{endif}}
|
||||
{{elseif \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
|
||||
{template="reviewUnavailable" group="forms" location="front" app="core" params="'unacknowledged_warning_cannot_post', \IPS\Member::loggedIn()->warnings( 1, FALSE )"}
|
||||
{{endif}}
|
||||
{{elseif \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings']}}
|
||||
{template="reviewUnavailable" group="forms" location="front" app="core" params="'unacknowledged_warning_cannot_post', \IPS\Member::loggedIn()->warnings( 1, FALSE )"}
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
</div>
|
||||
{{if \count( $record->reviews( NULL, NULL, 'date', 'desc', NULL, NULL, NULL, NULL, isset( \IPS\Request::i()->showDeleted ) ) )}}
|
||||
<div class="ipsButtonBar ipsButtonBar--top">
|
||||
{{if $record->reviewPageCount() > 1}}
|
||||
@@ -1382,13 +1409,12 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
<input type="hidden" name="plupload" value="{expression="md5( mt_rand() )"}">
|
||||
<input type="hidden" name="content_record_form_container" value="{$category->_id}">
|
||||
{{endif}}
|
||||
|
||||
<div class='ipsBox ipsPull'>
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
<div class='ipsBox ipsBox--cmsRecordForm ipsPull'>
|
||||
<h2 class='ipsBox__header'>{lang="record_information" sprintf="$database->recordWord(1, TRUE)"}</h2>
|
||||
{{if is_countable( $elements) AND \count( $elements ) > 1}}
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
|
||||
<div role='tablist'>
|
||||
{{$checkedTab = NULL;}}
|
||||
@@ -1529,13 +1555,12 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
<input type="hidden" name="plupload" value="{expression="md5( mt_rand() )"}">
|
||||
<input type="hidden" name="content_record_form_container" value="{$category->_id}">
|
||||
{{endif}}
|
||||
|
||||
<div class='ipsBox'>
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
<div class='ipsBox ipsBox--cmsTopicCopy'>
|
||||
<h2 class='ipsBox__header'>{lang="record_information" sprintf="$database->recordWord(1, TRUE)"}</h2>
|
||||
{{if \count( $elements ) > 1}}
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
|
||||
<div role='tablist'>
|
||||
{{$checkedTab = NULL;}}
|
||||
@@ -1707,7 +1732,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
{{endif}}
|
||||
|
||||
{{if $category->hasChildren() AND ! isset( \IPS\Request::i()->advancedSearchForm )}}
|
||||
<div class="ipsBox ipsPull i-margin-bottom_3">
|
||||
<div class="ipsBox ipsBox--cmsSubCategories ipsPull i-margin-bottom_3">
|
||||
<h2 class='ipsBox__header'>{lang="content_subcategories_title"}</h2>
|
||||
<i-data>
|
||||
<ol class="ipsData {{if $category::database()->display_settings['categories']['layout'] != 'custom'}}ipsData--{$category::database()->display_settings['categories']['layout']}{{else}}ipsData--table{{endif}} ipsData--category ipsData--database-listing">
|
||||
@@ -1737,7 +1762,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
{{if \count( $activeFilters ) AND ! isset( \IPS\Request::i()->advancedSearchForm )}}
|
||||
{template="filterMessage" group="listing" location="database" app="cms" params="$activeFilters, $category"}
|
||||
{{endif}}]]></template>
|
||||
<template template_key="database_listing_categoryTable" template_title="categoryTable" template_desc="" template_location="database" template_group="listing" template_params="$table, $headers, $rows, $quickSearch" template_app="" template_type="template"><![CDATA[<div class='ipsBox ipsPull' data-baseurl='{$table->baseUrl}' data-resort='{$table->resortKey}' data-controller='core.global.core.table{{if $table->canModerate()}},core.front.core.moderation{{endif}}'>
|
||||
<template template_key="database_listing_categoryTable" template_title="categoryTable" template_desc="" template_location="database" template_group="listing" template_params="$table, $headers, $rows, $quickSearch" template_app="" template_type="template"><![CDATA[<div class='ipsBox ipsBox--cmsCategoryTable ipsPull' data-baseurl='{$table->baseUrl}' data-resort='{$table->resortKey}' data-controller='core.global.core.table{{if $table->canModerate()}},core.front.core.moderation{{endif}}'>
|
||||
|
||||
{{if isset( $table->extra['db'] )}}
|
||||
<h2 class='ipsBox__header'>
|
||||
@@ -1760,54 +1785,68 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
<ul class='ipsDataFilters'>
|
||||
{{if isset( $table->sortOptions ) and !empty( $table->sortOptions )}}
|
||||
<li>
|
||||
<a href="#elSortByMenu_menu" class='ipsDataFilters__button' id="elSortByMenu_{$table->uniqueId}" data-role='sortButton' data-ipsMenu data-ipsMenu-activeClass="ipsDataFilters__button--active" data-ipsMenu-selectable="radio">{lang="sort_by"} <i class="fa-solid fa-caret-down"></i></a>
|
||||
<ul class="ipsMenu ipsMenu_auto ipsMenu_withStem ipsMenu_selectable ipsHide" id="elSortByMenu_{$table->uniqueId}_menu">
|
||||
{{$custom = TRUE;}}
|
||||
{{foreach $table->sortOptions as $k => $col}}
|
||||
<li class="ipsMenu_item {{if $col === $table->getSortByColumn()}}{{$custom = FALSE;}}ipsMenu_itemChecked{{endif}}" data-ipsMenuValue="{$col}" data-sortDirection='{$table->getSortDirection( $col )}'><a href="{$table->baseUrl->setQueryString( array( 'filter' => $table->filter, 'sortby' => $col, 'sortdirection' => $table->getSortDirection( $col ) ) )->setPage('page',1)}" rel="nofollow">{lang="{$table->langPrefix}sort_{$k}"}</a></li>
|
||||
{{endforeach}}
|
||||
{{if $table->advancedSearch}}
|
||||
<li class="ipsMenu_item {{if $custom}}ipsMenu_itemChecked{{endif}}" data-noSelect="true">
|
||||
<a href='{$table->baseUrl->setQueryString( array( 'advancedSearchForm' => '1', 'filter' => $table->filter, 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection ) )}' rel="nofollow" data-ipsDialog data-ipsDialog-title='{lang="custom_sort"}'>{lang="custom"}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
<button type="button" id="elSortByMenu_{$table->uniqueId}" popovertarget="elSortByMenu_{$table->uniqueId}_menu" class='ipsDataFilters__button' data-role='sortButton'>{lang="sort_by"} <i class="fa-solid fa-caret-down"></i></button>
|
||||
<i-dropdown popover id="elSortByMenu_{$table->uniqueId}_menu" data-i-dropdown-selectable="radio">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
{{$custom = TRUE;}}
|
||||
{{foreach $table->sortOptions as $k => $col}}
|
||||
<li><a href="{$table->baseUrl->setQueryString( array( 'filter' => $table->filter, 'sortby' => $col, 'sortdirection' => $table->getSortDirection( $col ) ) )->setPage('page',1)}" rel="nofollow" {{if $col === $table->getSortByColumn()}}{{$custom = FALSE;}}aria-selected="true"{{endif}} data-ipsMenuValue="{$col}" data-sortDirection='{$table->getSortDirection( $col )}'><i class="iDropdown__input"></i>{lang="{$table->langPrefix}sort_{$k}"}</a></li>
|
||||
{{endforeach}}
|
||||
{{if $table->advancedSearch}}
|
||||
<li><hr></li>
|
||||
<li>
|
||||
<a href='{$table->baseUrl->setQueryString( array( 'advancedSearchForm' => '1', 'filter' => $table->filter, 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection ) )}' rel="nofollow" data-ipsDialog data-ipsDialog-title='{lang="custom_sort"}' {{if $custom}}aria-selected="true"{{endif}}><i class="fa-solid fa-sliders"></i>{lang="custom"}</a>
|
||||
</li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if !empty( $table->filters )}}
|
||||
<li>
|
||||
<a href="#elFilterByMenu_menu" class='ipsDataFilters__button' data-role="tableFilterMenu" id="elFilterByMenu_{$table->uniqueId}" data-ipsMenu data-ipsMenu-activeClass="ipsDataFilters__button--active" data-ipsMenu-selectable="radio">{lang="filter_by"} <i class="fa-solid fa-caret-down"></i></a>
|
||||
<ul class='ipsMenu ipsMenu_auto ipsMenu_withStem ipsMenu_selectable ipsHide' id='elFilterByMenu_{$table->uniqueId}_menu'>
|
||||
<li data-action="tableFilter" data-ipsMenuValue='' class='ipsMenu_item {{if !$table->filter}}ipsMenu_itemChecked{{endif}}'>
|
||||
<a href='{$table->baseUrl->setQueryString( array( 'filter' => '', 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection ) )->setPage('page',1)}' rel="nofollow">{lang="{$table->langPrefix}all"}</a>
|
||||
</li>
|
||||
{{foreach $table->filters as $k => $q}}
|
||||
<li data-action="tableFilter" data-ipsMenuValue='{$k}' class='ipsMenu_item {{if $k === $table->filter}}ipsMenu_itemChecked{{endif}}'>
|
||||
<a href='{$table->baseUrl->setQueryString( array( 'filter' => $k, 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection ) )->setPage('page',1)}' rel="nofollow">{lang="{$table->langPrefix}{$k}"}</a>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
<button type="button" id="elFilterByMenu_{$table->uniqueId}" popovertarget="elFilterByMenu_{$table->uniqueId}_menu" class='ipsDataFilters__button' data-role="tableFilterMenu">{lang="filter_by"} <i class="fa-solid fa-caret-down"></i></button>
|
||||
<i-dropdown popover id="elFilterByMenu_{$table->uniqueId}_menu" data-i-dropdown-selectable="radio">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
<li>
|
||||
<a href='{$table->baseUrl->setQueryString( array( 'filter' => '', 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection ) )->setPage('page',1)}' rel="nofollow" data-action="tableFilter" data-ipsMenuValue='' {{if !$table->filter}}aria-selected="true"{{endif}}><i class="iDropdown__input"></i>{lang="{$table->langPrefix}all"}</a>
|
||||
</li>
|
||||
<li><hr></li>
|
||||
{{foreach $table->filters as $k => $q}}
|
||||
<li>
|
||||
<a href='{$table->baseUrl->setQueryString( array( 'filter' => $k, 'sortby' => $table->sortBy, 'sortdirection' => $table->sortDirection ) )->setPage('page',1)}' rel="nofollow" data-action="tableFilter" data-ipsMenuValue='{$k}' {{if $k === $table->filter}}aria-selected="true"{{endif}}><i class="iDropdown__input"></i>{lang="{$table->langPrefix}{$k}"}</a>
|
||||
</li>
|
||||
{{endforeach}}
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if $table->canModerate()}}
|
||||
<li>
|
||||
<a class="ipsDataFilters__button ipsJS_show" href="#elCheck_menu" id="elCheck_{$table->uniqueId}" title='{lang="{$table->langPrefix}select_rows_tooltip"}' data-ipsTooltip data-ipsAutoCheck data-ipsAutoCheck-context="#elTable_{$table->uniqueId}" data-ipsMenu data-ipsMenu-activeClass="ipsDataFilters__button--active">
|
||||
<button type="button" id="elCheck_{$table->uniqueId}" popovertarget="elCheck_{$table->uniqueId}_menu" class="ipsDataFilters__button" id="elCheck_{$table->uniqueId}" title='{lang="{$table->langPrefix}select_rows_tooltip"}' data-ipsTooltip data-ipsAutoCheck data-ipsAutoCheck-context="#elTable_{$table->uniqueId}">
|
||||
<span class="cAutoCheckIcon"><i class="fa-regular fa-square"></i></span> <i class="fa-solid fa-caret-down"></i>
|
||||
<span class='ipsNotification' data-role='autoCheckCount'>0</span>
|
||||
</a>
|
||||
<ul class="ipsMenu ipsMenu_auto ipsMenu_withStem ipsHide" id="elCheck_{$table->uniqueId}_menu">
|
||||
<li class="ipsMenu_title">{lang="{$table->langPrefix}select_rows"}</li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="all"><a href="#">{lang="all"}</a></li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="none"><a href="#">{lang="none"}</a></li>
|
||||
<li class="ipsMenu_sep"><hr></li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="read"><a href="#">{lang="read"}</a></li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="unread"><a href="#">{lang="unread"}</a></li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="hidden"><a href="#">{lang="hidden"}</a></li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="unapproved"><a href="#">{lang="unapproved"}</a></li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="locked"><a href="#">{lang="locked"}</a></li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="pinned"><a href="#">{lang="pinned"}</a></li>
|
||||
<li class="ipsMenu_item" data-ipsMenuValue="featured"><a href="#">{lang="featured"}</a></li>
|
||||
</ul>
|
||||
</button>
|
||||
<i-dropdown popover id="elCheck_{$table->uniqueId}_menu" data-i-dropdown-selectable="radio">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
<li class="iDropdown__title">{lang="{$table->langPrefix}select_rows"}</li>
|
||||
<li><button type="button" data-ipsMenuValue="all"><i class="iDropdown__input"></i>{lang="all"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue="none"><i class="iDropdown__input"></i>{lang="none"}</button></li>
|
||||
<li><hr></li>
|
||||
<li><button type="button" data-ipsMenuValue="read"><i class="iDropdown__input"></i>{lang="read"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue="unread"><i class="iDropdown__input"></i>{lang="unread"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue="hidden"><i class="iDropdown__input"></i>{lang="hidden"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue="unapproved"><i class="iDropdown__input"></i>{lang="unapproved"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue="locked"><i class="iDropdown__input"></i>{lang="locked"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue="pinned"><i class="iDropdown__input"></i>{lang="pinned"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue="featured"><i class="iDropdown__input"></i>{lang="featured"}</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
</li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
@@ -1927,13 +1966,13 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
|
||||
<li class="ipsData__item {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsData__item--{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}} {{if $row->isAssignedToMember()}}ipsData__item--assigned{{endif}}" data-rowID='{$row->$idField}' {{if $table !== null and $row->unread()}}data-ips-unread{{else}}data-ips-read{{endif}}>
|
||||
<a href='{$row->url( "getPrefComment" )}' class="ipsLinkPanel" aria-hidden="true" tabindex="-1"><span>{{if $row->_title or $row->_title == 0}}{$row->_title}{{else}}{lang="content_deleted"}{{endif}}</span></a>
|
||||
{{if $row->showRecordImage()}}
|
||||
<figure class="ipsData__image">
|
||||
<div class="ipsData__image" aria-hidden="true">
|
||||
{{if $row->record_image}}
|
||||
<img src="{file="$row->record_image" extension="cms_Records"}" loading="lazy" alt="">
|
||||
{{else}}
|
||||
<i></i>
|
||||
{{endif}}
|
||||
</figure>
|
||||
</div>
|
||||
{{endif}}
|
||||
<div class='ipsData__content'>
|
||||
<div class='ipsData__main'>
|
||||
|
||||
@@ -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="5000074" 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="5001302" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -67,7 +67,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000074" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -115,7 +115,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="5000074" 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="5001302" javascript_position="1000150">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -160,7 +160,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="5000074" 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="5001302" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -236,7 +236,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="5000074" 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="5001302" javascript_position="1000150"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -371,7 +371,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="5000074" javascript_position="1000200"><![CDATA[/**
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5001302" javascript_position="1000200"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -461,7 +461,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="5000074" 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="5001302" javascript_position="1000300"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1100,7 +1100,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="5000074" 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="5001302" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1135,7 +1135,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="5000074" 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="5001302" javascript_position="1000250"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1257,7 +1257,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="5000074" 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="5001302" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1369,7 +1369,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="5000074" 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="5001302" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1424,7 +1424,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="5000074" 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="5001302" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1474,7 +1474,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="5000074" 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="5001302" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1546,7 +1546,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="5000074" 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="5001302" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -1616,11 +1616,11 @@
|
||||
this._editorPreferences['lines'] = ips.utils.db.get('templateEditor', 'lines');
|
||||
|
||||
if( this._editorPreferences['wrap'] ){
|
||||
$('#elTemplateEditor_preferences_menu').find('[data-ipsMenuValue="wrap"]').addClass('ipsMenu_itemChecked');
|
||||
$('#elTemplateEditor_preferences_menu').find('[data-ipsMenuValue="wrap"]').attr("aria-selected", "true");
|
||||
}
|
||||
|
||||
if( this._editorPreferences['lines'] ){
|
||||
$('#elTemplateEditor_preferences_menu').find('[data-ipsMenuValue="lines"]').addClass('ipsMenu_itemChecked');
|
||||
$('#elTemplateEditor_preferences_menu').find('[data-ipsMenuValue="lines"]').attr("aria-selected", "true");
|
||||
}
|
||||
|
||||
// Initialize the initial content
|
||||
@@ -1656,7 +1656,7 @@
|
||||
* @param {object} data Event data object
|
||||
* @returns {void}
|
||||
*/
|
||||
menuSelected: function (e, data) {
|
||||
menuSelected: function (e, data = e.detail) {
|
||||
if( data.originalEvent ){
|
||||
data.originalEvent.preventDefault();
|
||||
}
|
||||
@@ -1683,10 +1683,10 @@
|
||||
// Set the menu appropriately
|
||||
if( toValue ){
|
||||
$('#elTemplateEditor_preferences_menu')
|
||||
.find('[data-ipsMenuValue="' + type + '"]').addClass('ipsMenu_itemChecked');
|
||||
.find('[data-ipsMenuValue="' + type + '"]').attr("aria-selected", "true");
|
||||
} else {
|
||||
$('#elTemplateEditor_preferences_menu')
|
||||
.find('[data-ipsMenuValue="' + type + '"]').removeClass('ipsMenu_itemChecked');
|
||||
.find('[data-ipsMenuValue="' + type + '"]').removeAttr("aria-selected");
|
||||
}
|
||||
|
||||
// Update controller variable
|
||||
@@ -2265,9 +2265,9 @@
|
||||
$('#elTemplateEditor_attributes').hide();
|
||||
|
||||
if ( this._cmInstances[ key ] instanceof CodeMirror.MergeView ) {
|
||||
$('[data-ipsmenuvalue="diff"]').addClass('ipsMenu_itemChecked');
|
||||
$('[data-ipsmenuvalue="diff"]').attr("aria-selected", "true");
|
||||
} else {
|
||||
$('[data-ipsmenuvalue="diff"]').removeClass('ipsMenu_itemChecked');
|
||||
$('[data-ipsmenuvalue="diff"]').removeAttr("aria-selected");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2507,7 +2507,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="5000074" 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="5001302" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2799,7 +2799,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="5000074" 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="5001302" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -2906,7 +2906,7 @@
|
||||
* @param {object} data Event data object
|
||||
* @returns {void}
|
||||
*/
|
||||
menuSelected: function (e, data) {
|
||||
menuSelected: function (e, data = e.detail) {
|
||||
if( data.originalEvent ){
|
||||
data.originalEvent.preventDefault();
|
||||
}
|
||||
@@ -2934,7 +2934,7 @@
|
||||
$('#elTemplateEditor_fileList').find('li[data-type=' + type + ']').addClass('ipsHide');
|
||||
|
||||
var filters = [];
|
||||
$('#elTemplateFilterMenu_menu .ipsMenu_itemChecked').each(function(){
|
||||
$('#elTemplateFilterMenu_menu [aria-selected="true"]').each(function(){
|
||||
filters.push( $(this).attr('data-ipsMenuValue') );
|
||||
});
|
||||
|
||||
@@ -2968,7 +2968,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="5000074" 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="5001302" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -3013,7 +3013,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000074" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5001302" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
|
||||
<ul class='ipsGrid ipsGrid--pages-media'>\
|
||||
{{{contents}}}\
|
||||
</ul>\
|
||||
@@ -3030,7 +3030,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="5000074" 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="5001302" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
|
||||
/* TEMPLATECEPTION */
|
||||
ips.templates.set('templates.editor.newTab', " \
|
||||
<a href='#' class='ipsTabs__tab' id='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}' role='tab' aria-controls='ipsTabs_elTemplateEditor_tabbar_tab_{{fileid}}_panel' aria-selected='false' data-fileid='{{fileid}}' data-location='{{location}}'>{{title}} <span data-action='closeTab'><i class='fa-solid fa-xmark'></i></span></a>\
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="cms" version="5000074">
|
||||
<app key="cms" version="5001302">
|
||||
<word key="__app_cms" js="0">Pages</word>
|
||||
<word key="menutab__cms" js="0">Pages</word>
|
||||
<word key="menutab__cms_icon" js="0">file</word>
|
||||
@@ -75,6 +75,7 @@
|
||||
<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>
|
||||
<word key="can_view_reports_record" js="0">Can view reported content on %s?</word>
|
||||
<word key="can_assign_record" js="0">Can assign %s?</word>
|
||||
<word key="r__page_add" js="0">Can create pages?</word>
|
||||
<word key="r__page_edit" js="0">Can edit pages?</word>
|
||||
<word key="r__page_delete" js="0">Can delete pages?</word>
|
||||
@@ -150,6 +151,7 @@
|
||||
<word key="content_block_add_type_custom_desc" js="0">You can author HTML or PHP for advertisements, javascript widgets (e.g. stock tickers, gamer feeds, etc.) and notices/announcements.</word>
|
||||
<word key="content_block_add_custom_type_wysiwyg" js="0">Editor</word>
|
||||
<word key="content_block_add_custom_type_html" js="0">Manual HTML</word>
|
||||
<word key="content_block_php_disabled" js="0"><![CDATA[This was a PHP block in Invision Community 4.<br> PHP blocks are deprecated with Invision Community 5 and will be treated as a HTML block.]]></word>
|
||||
<word key="content_block_add_custom_type_html_desc" js="0">Allows use of HTML and Invision Community template logic that you'll enter manually</word>
|
||||
<word key="content_block_add_custom_type_php" js="0">Manual PHP</word>
|
||||
<word key="content_block_add_custom_type_php_desc" js="0"><![CDATA[Allows use of raw PHP that you'll enter manually. Note: don't include <?php ?> tags; Invision Community will handle this for you.]]></word>
|
||||
@@ -310,8 +312,15 @@
|
||||
<word key="content_err_no_page" js="0">Could not load a page to edit</word>
|
||||
<word key="content_edit_page_content_title" js="0">Editing page content for %s</word>
|
||||
<word key="page_content" js="0">Content</word>
|
||||
<word key="content_default_page" js="0">Make default page for this folder</word>
|
||||
<word key="content_default_page" js="0">Set default page</word>
|
||||
<word key="err__no_page_default" js="0">The %s member group will have no default page. Please adjust your selection or set another default page for this group first.</word>
|
||||
<word key="content_default_error_page" js="0">Make default error page</word>
|
||||
<word key="set_page_default" js="0">Set as default page</word>
|
||||
<word key="set_page_default_desc" js="0">Make this the default page for any groups that do not have an override</word>
|
||||
<word key="group_defaults" js="0">Default for groups: %s</word>
|
||||
<word key="set_group_defaults" js="0">For groups</word>
|
||||
<word key="default_page" js="0">Default Page</word>
|
||||
<word key="set_page_default_info" js="0"><![CDATA[A member's default page is determined <em>only</em> by their primary group.]]></word>
|
||||
<word key="content_remove_error_page" js="0">Remove as default error page</word>
|
||||
<word key="content_database_form_options_page" js="0">Page</word>
|
||||
<word key="content_database_form_options_page_msg" js="0">You may optionally create a page for this database. After creation, you may edit the page as normal.</word>
|
||||
@@ -370,6 +379,15 @@
|
||||
<word key="content_import_dev_templates_info" js="0">Select the templates you wish to import, and map it to a template type</word>
|
||||
<word key="content_import_db" js="0">Database Templates</word>
|
||||
<word key="content_import_wrappers" js="0">Custom Wrappers</word>
|
||||
<word key="content_page_history" js="0">Past versions</word>
|
||||
<word key="revision_date" js="0">Date</word>
|
||||
<word key="revision_member_id" js="0">Member</word>
|
||||
<word key="view_page_revision" js="0">View this version</word>
|
||||
<word key="revision_page_manual" js="0">Manual Saves Only</word>
|
||||
<word key="revision_manual_save" js="0">Type</word>
|
||||
<word key="revision_page_type_manual" js="0">Stored when the Page Editor was closed</word>
|
||||
<word key="revision_page_type_auto" js="0">Stored when the Page Editor made a change</word>
|
||||
<word key="revision_page_last_session" js="0">Last Editing Session</word>
|
||||
<word key="menu_content_page" js="0">Page</word>
|
||||
<word key="content_page_form_tab__menu" js="0">Menu</word>
|
||||
<word key="page_add_to_menu" js="0">Add to front navigation menu</word>
|
||||
@@ -942,6 +960,8 @@
|
||||
<word key="field_daterange_start" js="0">From %s</word>
|
||||
<word key="field_daterange_end" js="0">To %s</word>
|
||||
<word key="cms_number_none" js="0">None</word>
|
||||
<word key="viewing_page_revision" js="0">You are viewing a previous version of this page. This page cannot be edited.</word>
|
||||
<word key="page_version_use" js="0">Restore this version</word>
|
||||
<word key="cms_rf_database" js="0">Database</word>
|
||||
<word key="cms_rf_database_description" js="0"><![CDATA[<br/>This cannot be changed. If you want to create a feed from a different database, please create a new custom block.]]></word>
|
||||
<word key="cms_rf_category" js="0">Categories</word>
|
||||
@@ -1045,7 +1065,7 @@
|
||||
<word key="acplogs__cms_deleted_record" js="0">Deleted %s from database %s</word>
|
||||
<word key="acplogs__cms_moved_record" js="0">Moved %s from %s to %s in %s</word>
|
||||
<word key="acplogs__cms_added_record" js="0">Added %s to %s</word>
|
||||
<word key="acplogs__cms_edited_recored" js="0">Edited %s in %s</word>
|
||||
<word key="acplogs__cms_edited_record" js="0">Edited %s in %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>
|
||||
@@ -1056,6 +1076,7 @@
|
||||
<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="acplogs__cms_page_set_default" js="0"><![CDATA[Set <em>%s</em> page as default in folder <em>%s</em>]]></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>
|
||||
|
||||
@@ -2969,6 +2969,18 @@
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
},
|
||||
"page_group_defaults": {
|
||||
"name": "page_group_defaults",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
@@ -4272,5 +4284,105 @@
|
||||
},
|
||||
"collation": "utf8_general_ci",
|
||||
"engine": "InnoDB"
|
||||
},
|
||||
"cms_page_revisions": {
|
||||
"name": "cms_page_revisions",
|
||||
"columns": {
|
||||
"revision_id": {
|
||||
"allow_null": false,
|
||||
"auto_increment": true,
|
||||
"comment": "ID Number",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "revision_id",
|
||||
"type": "BIGINT",
|
||||
"unsigned": true,
|
||||
"values": []
|
||||
},
|
||||
"revision_date": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "revision_date",
|
||||
"type": "INT",
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"revision_member_id": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "revision_member_id",
|
||||
"type": "BIGINT",
|
||||
"unsigned": true,
|
||||
"values": []
|
||||
},
|
||||
"revision_page_id": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "revision_page_id",
|
||||
"type": "BIGINT",
|
||||
"unsigned": true,
|
||||
"values": []
|
||||
},
|
||||
"revision_data": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": null,
|
||||
"length": 0,
|
||||
"name": "revision_data",
|
||||
"type": "LONGTEXT",
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
},
|
||||
"revision_manual_save": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": 0,
|
||||
"length": 1,
|
||||
"name": "revision_manual_save",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
"values": []
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"revision_id"
|
||||
]
|
||||
},
|
||||
"revision_page_id": {
|
||||
"type": "key",
|
||||
"name": "revision_page_id",
|
||||
"length": [
|
||||
null
|
||||
],
|
||||
"columns": [
|
||||
"revision_page_id"
|
||||
]
|
||||
}
|
||||
},
|
||||
"collation": "utf8mb4_unicode_ci"
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@
|
||||
{$index|raw}
|
||||
]]></template>
|
||||
<template template_group="clubs" template_name="index" template_data="$database, $articles, $url, $pagination" template_location="front" template_app="cms"><![CDATA[
|
||||
<header class='ipsPageHeader ipsBox ipsPull'>
|
||||
<header class='ipsPageHeader ipsBox ipsBox--cmsClubHeader ipsPull'>
|
||||
<div class="ipsPageHeader__row">
|
||||
<div class='ipsPageHeader__primary'>
|
||||
<h1 class='ipsPageHeader__title'>{$database->_title}</h1>
|
||||
@@ -136,7 +136,7 @@
|
||||
{template="entry" app="cms" location="database" group="category_articles" params="$record, $database"}
|
||||
{{endforeach}}
|
||||
{{else}}
|
||||
<div class="ipsBox ipsBox--padding">{lang="cms_no_records_to_show" sprintf="\IPS\cms\Databases::load( \IPS\cms\Databases\Dispatcher::i()->databaseId )->recordWord()"}</div>
|
||||
<div class="ipsBox ipsBox--cmsClubNoRecords ipsBox--padding">{lang="cms_no_records_to_show" sprintf="\IPS\cms\Databases::load( \IPS\cms\Databases\Dispatcher::i()->databaseId )->recordWord()"}</div>
|
||||
{{endif}}
|
||||
</section>
|
||||
{{if $pagination['pages'] > 1}}
|
||||
@@ -239,6 +239,7 @@
|
||||
</div>
|
||||
</div>]]></template>
|
||||
<template template_group="global" template_name="embedRecordComment" template_data="$comment, $item, $url" template_location="front" template_app="cms"><![CDATA[
|
||||
{{$image = NULL;}}
|
||||
<div class='ipsRichEmbed ipsRichEmbed--cms-comment'>
|
||||
{template="embedHeader" group="embed" app="core" params="$comment, $item->mapped('title'), $comment->mapped('date'), $url"}
|
||||
<div class='ipsRichEmbed__content'>
|
||||
@@ -482,7 +483,35 @@
|
||||
{template="widgetContainer" group="pages" app="cms" params="$area, $widgets"}
|
||||
</div>
|
||||
{{endforeach}}]]></template>
|
||||
<template template_group="pages" template_name="pageRowHtml" template_data="$page, $groupNames" template_location="admin" template_app="cms"><![CDATA[{{if $page->default == \IPS\cms\Pages\Page::PAGE_DEFAULT}}
|
||||
<span class='ipsBadge ipsBadge--positive'>{lang="default_page"}</span>
|
||||
{{elseif $groupNames}}
|
||||
<span class='ipsBadge ipsBadge--intermediary'>{lang="group_defaults" sprintf="$groupNames"}</span>
|
||||
{{endif}}]]></template>
|
||||
<template template_group="pages" template_name="previewTemplateLink" template_data="" template_location="admin" template_app="cms"><![CDATA[<span data-role="viewTemplate" class='ipsButton ipsButton--inherit ipsButton--tiny'>{lang="cms_block_view_template"}</span>]]></template>
|
||||
<template template_group="pages" template_name="revision" template_data="$version" template_location="front" template_app="cms"><![CDATA[{{if $version}}
|
||||
{{$url = $version->page->url()->setQueryString( [ 'do' => 'revertToVersion', 'version' => $version->id ] )->csrf();}}
|
||||
<div class='ipsMessage ipsMessage--info i-position_sticky-top'>
|
||||
<div class="i-flex i-align-items_center i-justify-content_space-between">
|
||||
<div>{lang="viewing_page_revision"}</div>
|
||||
<div><a href='{$url}' data-confirm class='ipsButton ipsButton--primary ipsButton--small'>{lang="page_version_use"}</a></div>
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}
|
||||
]]></template>
|
||||
<template template_group="pages" template_name="revisionDate" template_data="$time, $manualSave=0" template_location="admin" template_app="cms"><![CDATA[<ul class='ipsList ipsList--inline i-gap_2'>
|
||||
<li>
|
||||
{{if $manualSave}}
|
||||
<span class="ipsBadge ipsBadge--icon ipsBadge--small ipsBadge--positive" data-ipsTooltip title="{lang="revision_page_type_manual"}"><i class='fa fa-save'></i></span>
|
||||
{{else}}
|
||||
<span class="ipsBadge ipsBadge--icon ipsBadge--small ipsBadge--neutral" data-ipsTooltip title="{lang="revision_page_type_auto"}"><i class='fa fa-history'></i></span>
|
||||
{{endif}}
|
||||
</li>
|
||||
<li>
|
||||
<span class="{{if $manualSave}}i-color_positive{{else}}i-color_soft{{endif}}">{$time}</span>
|
||||
</li>
|
||||
</ul>
|
||||
]]></template>
|
||||
<template template_group="pages" template_name="widgetContainer" template_data="$id, $widgets, $orientation='horizontal'" template_location="front" template_app="cms"><![CDATA[{{if isset( \IPS\Output::i()->sidebar['widgetareas'][$id] )}}
|
||||
{{$area = \IPS\Output::i()->sidebar['widgetareas'][$id];}}
|
||||
{template="widgetArea" group="global" app="core" params="$area"}
|
||||
@@ -518,7 +547,7 @@
|
||||
{$form|raw}
|
||||
</div>]]></template>
|
||||
<template template_group="records" template_name="categorySelector" template_data="$form" template_location="front" template_app="cms"><![CDATA[
|
||||
<div class='i-padding_3'>
|
||||
<div class=''>
|
||||
{$form|raw}
|
||||
</div>]]></template>
|
||||
<template template_group="records" template_name="categoryTree" template_data="$category, $parents" template_location="admin" template_app="cms"><![CDATA[<div class="i-padding_3">
|
||||
@@ -627,7 +656,7 @@
|
||||
</span>
|
||||
{{endif}}
|
||||
{$title}]]></template>
|
||||
<template template_group="records" template_name="youtube" template_data="$url, $params" template_location="global" template_app="cms"><![CDATA[<div class='ipsEmbeddedVideo' contenteditable="false" {{if isset( $params['width'] ) OR isset( $params['height'] )}}style="{{if isset( $params['width'] )}}width:{$params['width']}px;max-width:{$params['width']}px;{{endif}}{{if isset( $params['height'] )}}height:{$params['height']}px;{{endif}}"{{endif}}><div><iframe id="ytplayer" type="text/html" {{foreach $params as $k => $v }}{$k}="{$v}" {{endforeach}} src="{$url}" loading='lazy'></iframe></div></div>]]></template>
|
||||
<template template_group="records" template_name="youtube" template_data="$url, $params" template_location="global" template_app="cms"><![CDATA[<div class='ipsEmbeddedVideo ipsEmbeddedVideo--youtube' contenteditable="false"><iframe id="ytplayer" type="text/html" {{foreach $params as $k => $v }}{$k}="{$v}" {{endforeach}} src="{$url}" loading='lazy'></iframe></div>]]></template>
|
||||
<template template_group="revisions" template_name="rows" template_data="$table, $headers, $rows" template_location="front" template_app="cms"><![CDATA[{{foreach $rows as $row}}
|
||||
<article class='ipsEntry js-ipsEntry ipsEntry--simple ipsEntry--revisions'>
|
||||
<header class='ipsEntry__header'>
|
||||
@@ -700,7 +729,7 @@
|
||||
<h1 class='ipsPageHeader__title'>{lang="content_view_revisions"}</h1>
|
||||
</header>
|
||||
{{endif}}
|
||||
<div class='ipsBox' data-baseurl='{$table->baseUrl}' data-resort='{$table->resortKey}' data-controller='cms.front.records.revisions'>
|
||||
<div class='ipsBox ipsBox--cmsRevisions' data-baseurl='{$table->baseUrl}' data-resort='{$table->resortKey}' data-controller='cms.front.records.revisions'>
|
||||
{{if $table->title}}
|
||||
<h2 class='ipsBox__header'>{lang="$table->title"}</h2>
|
||||
{{endif}}
|
||||
@@ -831,12 +860,13 @@
|
||||
<div class='ipsColumns__primary'>
|
||||
{{endif}}
|
||||
|
||||
<div class='ipsBox'>
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error i-margin-bottom_1 ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
|
||||
<div class='ipsBox ipsBox--cmsCreateRecord'>
|
||||
<h2 class='ipsBox__header'>{lang="topic_details"}</h2>
|
||||
{{if \count( $elements ) > 1}}
|
||||
{{if !empty( $errorTabs )}}
|
||||
<p class="ipsMessage ipsMessage--error ipsJS_show">{lang="tab_error"}</p>
|
||||
{{endif}}
|
||||
<i-tabs class='ipsTabs' id='ipsTabs_{$id}' data-ipsTabBar data-ipsTabBar-contentArea='#ipsTabs_{$id}_content'>
|
||||
<div role='tablist'>
|
||||
{{$checkedTab = NULL;}}
|
||||
@@ -1038,19 +1068,27 @@
|
||||
<div class='cTemplateControls' id='elTemplateEditor_fileListControls'>
|
||||
<div class="cTemplateControls__input">
|
||||
<input type='text' data-role="templateSearch" placeholder="{lang="search_templates"}">
|
||||
<a href='#elTemplateFilterMenu_menu' id='elTemplateFilterMenu' class='cTemplateControls__filter' data-ipsMenu data-ipsMenu-selectable><i class="fa-solid fa-filter"></i> <i class='fa-solid fa-caret-down'></i></a>
|
||||
<button type="button" id="elTemplateFilterMenu" popovertarget="elTemplateFilterMenu_menu" class='cTemplateControls__filter'><i class="fa-solid fa-filter"></i> <i class='fa-solid fa-caret-down'></i></button>
|
||||
</div>
|
||||
<ul id='elTemplateFilterMenu_menu' role='menu' class='ipsMenu ipsMenu_selectable ipsMenu_auto ipsMenu_withStem ipsHide'>
|
||||
<li class='ipsMenu_item ipsMenu_itemChecked' data-ipsMenuValue='custom'><a href='#'>{lang="cms_theme_template_custom"}</a></li>
|
||||
<li class='ipsMenu_item ipsMenu_itemChecked' data-ipsMenuValue='unmodified'><a href='#'>{lang="cms_theme_template_default"}</a></li>
|
||||
</ul>
|
||||
<ul id='elTemplateEditor_newItemMenu_menu' role='menu' class='ipsMenu ipsMenu_auto ipsMenu_withStem ipsHide'>
|
||||
<li class='ipsMenu_item'><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=block"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_block_title"}'>{lang="content_template_add_template_block"}</a></li>
|
||||
<li class='ipsMenu_item'><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=page"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_page_title""}'>{lang="content_template_add_template_page"}</a></li>
|
||||
<li class='ipsMenu_item'><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=database"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_database_title""}'>{lang="content_template_add_template_database"}</a></li>
|
||||
<li class='ipsMenu_item'><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=css"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_css_title""}'>{lang="content_template_add_template_css"}</a></li>
|
||||
<li class='ipsMenu_item'><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=js"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_js_title""}'>{lang="content_template_add_template_js"}</a></li>
|
||||
</ul>
|
||||
<i-dropdown popover id="elTemplateFilterMenu_menu" data-i-dropdown-selectable="checkbox">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
<li><button type="button" data-ipsMenuValue='custom' aria-selected="true"><i class="iDropdown__input"></i>{lang="cms_theme_template_custom"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue='unmodified' aria-selected="true"><i class="iDropdown__input"></i>{lang="cms_theme_template_default"}</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
<i-dropdown popover id="elTemplateEditor_newItemMenu_menu">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
<li><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=block"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_block_title"}'>{lang="content_template_add_template_block"}</a></li>
|
||||
<li><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=page"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_page_title""}'>{lang="content_template_add_template_page"}</a></li>
|
||||
<li><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=database"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_database_title""}'>{lang="content_template_add_template_database"}</a></li>
|
||||
<li><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=css"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_css_title""}'>{lang="content_template_add_template_css"}</a></li>
|
||||
<li><a role='menuitem' href='{url="app=cms&module=pages&controller=templates&do=addTemplate&type=js"}' data-ipsDialog data-ipsDialog-forceReload data-ipsDialog-title='{lang="content_template_add_template_js_title""}'>{lang="content_template_add_template_js"}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
</div>
|
||||
<i-tabs class='ipsTabs ipsTabs--stretch acpFormTabBar' id='elTemplateEditor_typeTabs' data-ipsTabBar data-ipsTabBar-contentArea='#elTemplateEditor_fileList' data-ipsTabBar-updateURL='false'>
|
||||
<div role="tablist">
|
||||
@@ -1069,7 +1107,7 @@
|
||||
<li class='cTemplateState_inherit'> {lang="content_templates_inherit"}</li>
|
||||
</ul>
|
||||
<div id='elTemplateEditor_newButton'>
|
||||
<a href='#elTemplateEditor_newItemMenu_menu' id='elTemplateEditor_newItemMenu' class='ipsButton ipsButton--secondary ipsButton--small ipsButton--wide' data-ipsMenu data-ipsMenu-above>{lang="theme_template_new"} <i class='fa-solid fa-caret-down'></i></a>
|
||||
<button type="button" id="elTemplateEditor_newItemMenu" popovertarget="elTemplateEditor_newItemMenu_menu" class='ipsButton ipsButton--secondary ipsButton--small ipsButton--wide'>{lang="theme_template_new"} <i class='fa-solid fa-caret-down'></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class='ipsTemplateEditor__codeColumn' data-controller='cms.admin.templates.fileEditor'>
|
||||
@@ -1082,12 +1120,16 @@
|
||||
<div data-role='loading' class='ipsHide i-padding-inline_2'><i class='ipsLoadingIcon'></i> {lang="loading"}</div>
|
||||
</li>
|
||||
<li class="i-margin-start_auto">
|
||||
<a href='#elTemplateEditor_preferences_menu' id='elTemplateEditor_preferences' class='ipsButton ipsButton--inherit i-color_primary' data-ipsMenu data-ipsMenu-selectable><i class='fa-solid fa-gear'></i> <i class='fa-solid fa-caret-down'></i></a>
|
||||
<ul id='elTemplateEditor_preferences_menu' class='ipsMenu ipsMenu_selectable ipsMenu_auto ipsMenu_withStem ipsHide'>
|
||||
<li class='ipsMenu_item' data-ipsMenuValue='wrap'><button type="button">{lang="theme_wrap"}</button></li>
|
||||
<li class='ipsMenu_item' data-ipsMenuValue='lines'><button type="button">{lang="theme_show_line"}</button></li>
|
||||
<li class='ipsMenu_item' data-ipsMenuValue='diff'><button type="button">{lang="theme_show_original"}</button></li>
|
||||
</ul>
|
||||
<button type="button" id="elTemplateEditor_preferences" popovertarget="elTemplateEditor_preferences_menu" class='ipsButton ipsButton--inherit i-color_primary'><i class='fa-solid fa-gear'></i> <i class='fa-solid fa-caret-down'></i></button>
|
||||
<i-dropdown popover id="elTemplateEditor_preferences_menu" data-i-dropdown-selectable="checkbox">
|
||||
<div class="iDropdown">
|
||||
<ul class="iDropdown__items">
|
||||
<li><button type="button" data-ipsMenuValue='wrap'><i class="iDropdown__input"></i>{lang="theme_wrap"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue='lines'><i class="iDropdown__input"></i>{lang="theme_show_line"}</button></li>
|
||||
<li><button type="button" data-ipsMenuValue='diff'><i class="iDropdown__input"></i>{lang="theme_show_original"}</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</i-dropdown>
|
||||
</li>
|
||||
<li>
|
||||
<button type="button" id='elTemplateEditor_variables' class='ipsButton ipsButton--inherit i-color_primary' data-ipsDialog data-ipsDialog-title='{lang="content_template_editor_fields_title"}' data-ipsDialog-content="#elTemplateEditor_attributesDialog" data-ipsDialog-size='narrow'>{lang="theme_attributes"}</button>
|
||||
@@ -1569,19 +1611,22 @@
|
||||
max-height: 20px;
|
||||
max-width: 20px;
|
||||
}</css>
|
||||
<css css_location="front" css_app="cms" css_attributes="" css_path="records" css_name="record.css">.ipsDatabaseFields{
|
||||
<css css_location="front" css_app="cms" css_attributes="" css_path="records" css_name="record.css"><![CDATA[.ipsDatabaseFields{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 1em;
|
||||
}
|
||||
|
||||
.ipsDatabaseFields > li:has(.ipsEmbeddedVideo){
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.ipsDatabaseFields .ipsBadge{
|
||||
text-transform: none;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
|
||||
.ipsBadge img.ipsImage {
|
||||
max-height: 20px;
|
||||
max-width: 20px;
|
||||
@@ -1589,7 +1634,7 @@
|
||||
|
||||
.ipsPagesDiff {
|
||||
margin-bottom: 5px;
|
||||
}</css>
|
||||
}]]></css>
|
||||
<css css_location="admin" css_app="cms" css_attributes="" css_path="templates" css_name="templates.css"><![CDATA[.ipsTemplateEditor{
|
||||
overflow: hidden; /* Trim border-radius of child elements */
|
||||
}
|
||||
|
||||
@@ -1,322 +1,4 @@
|
||||
{
|
||||
"40000": "4.0.0",
|
||||
"100000": "4.0.0 Beta 0",
|
||||
"100001": "4.0.0 Beta 1",
|
||||
"100002": "4.0.0 Beta 2",
|
||||
"100003": "4.0.0 Beta 3",
|
||||
"100004": "4.0.0 Beta 3a",
|
||||
"100005": "4.0.0 Beta 4",
|
||||
"100006": "4.0.0 Beta 4a",
|
||||
"100007": "4.0.0 Beta 4b",
|
||||
"100008": "4.0.0 Beta 5",
|
||||
"100009": "4.0.0 Beta 5a",
|
||||
"100010": "4.0.0 Beta 6",
|
||||
"100011": "4.0.0 Beta 7",
|
||||
"100012": "4.0.0 Beta 7a",
|
||||
"100013": "4.0.0 Beta 8",
|
||||
"100014": "4.0.0 RC1",
|
||||
"100015": "4.0.0 RC2",
|
||||
"100016": "4.0.0 RC3",
|
||||
"100017": "4.0.0 RC4",
|
||||
"100018": "4.0.0 RC5",
|
||||
"100019": "4.0.0 RC5a",
|
||||
"100020": "4.0.0 RC6",
|
||||
"100021": "4.0.0 RC7",
|
||||
"100022": "4.0.0 RC7a",
|
||||
"100023": "4.0.0",
|
||||
"100024": "4.0.1",
|
||||
"100025": "4.0.2",
|
||||
"100026": "4.0.3",
|
||||
"100027": "4.0.4",
|
||||
"100028": "4.0.5",
|
||||
"100029": "4.0.5.1",
|
||||
"100030": "4.0.6",
|
||||
"100031": "4.0.6.1",
|
||||
"100032": "4.0.7",
|
||||
"100033": "4.0.8",
|
||||
"100034": "4.0.8.1",
|
||||
"100035": "4.0.9",
|
||||
"100036": "4.0.9.1",
|
||||
"100037": "4.0.9.2",
|
||||
"100038": "4.0.10",
|
||||
"100039": "4.0.10.1",
|
||||
"100040": "4.0.10.2",
|
||||
"100041": "4.0.11",
|
||||
"100042": "4.0.12",
|
||||
"100043": "4.0.12.1",
|
||||
"100044": "4.0.13",
|
||||
"100045": "4.0.13.1",
|
||||
"101000": "4.1.0 Beta 1",
|
||||
"101001": "4.1.0 Beta 2",
|
||||
"101002": "4.1.0 Beta 3",
|
||||
"101003": "4.1.0 Beta 4",
|
||||
"101004": "4.1.0 Beta 5",
|
||||
"101005": "4.1.0 Beta 6",
|
||||
"101006": "4.1.0 Beta 7",
|
||||
"101007": "4.1.0 Beta 8",
|
||||
"101008": "4.1.0 Beta 9",
|
||||
"101009": "4.1.0 Beta 10",
|
||||
"101010": "4.1.0",
|
||||
"101011": "4.1.1",
|
||||
"101012": "4.1.2",
|
||||
"101013": "4.1.3",
|
||||
"101014": "4.1.3.1",
|
||||
"101015": "4.1.3.2",
|
||||
"101016": "4.1.4",
|
||||
"101017": "4.1.4.1",
|
||||
"101018": "4.1.5",
|
||||
"101019": "4.1.5.1",
|
||||
"101020": "4.1.5.2",
|
||||
"101021": "4.1.6",
|
||||
"101022": "4.1.6.1",
|
||||
"101023": "4.1.7",
|
||||
"101024": "4.1.8",
|
||||
"101025": "4.1.8.1",
|
||||
"101026": "4.1.9",
|
||||
"101027": "4.1.10",
|
||||
"101028": "4.1.11",
|
||||
"101029": "4.1.11.1",
|
||||
"101030": "4.1.12",
|
||||
"101031": "4.1.12.1",
|
||||
"101032": "4.1.12.2",
|
||||
"101033": "4.1.12.3",
|
||||
"101034": "4.1.13 Beta 1",
|
||||
"101035": "4.1.13 Beta 2",
|
||||
"101036": "4.1.13",
|
||||
"101037": "4.1.13",
|
||||
"101038": "4.1.13.1",
|
||||
"101040": "4.1.13.2",
|
||||
"101041": "4.1.13.2",
|
||||
"101042": "4.1.14 Beta 1",
|
||||
"101043": "4.1.14 Beta 2",
|
||||
"101044": "4.1.14 Beta 3",
|
||||
"101045": "4.1.14 Beta 4",
|
||||
"101046": "4.1.14 Beta 5",
|
||||
"101049": "4.1.14 Beta 6",
|
||||
"101050": "4.1.14 Beta 7",
|
||||
"101051": "4.1.14 RC",
|
||||
"101052": "4.1.14",
|
||||
"101053": "4.1.14.1",
|
||||
"101054": "4.1.14.2",
|
||||
"101055": "4.1.14.3",
|
||||
"101056": "4.1.15",
|
||||
"101057": "4.1.15 Beta 1",
|
||||
"101058": "4.1.15 Beta 2",
|
||||
"101059": "4.1.15 Beta 2a",
|
||||
"101060": "4.1.15 Beta 3",
|
||||
"101061": "4.1.15",
|
||||
"101062": "4.1.15",
|
||||
"101063": "4.1.15",
|
||||
"101064": "4.1.16 Beta 1",
|
||||
"101065": "4.1.16 Beta 2",
|
||||
"101066": "4.1.16 Beta 3",
|
||||
"101067": "4.1.16 Beta 4",
|
||||
"101068": "4.1.16 Beta 5",
|
||||
"101069": "4.1.16",
|
||||
"101070": "4.1.16.1",
|
||||
"101071": "4.1.17 Beta 1",
|
||||
"101072": "4.1.17 Beta 1a",
|
||||
"101073": "4.1.17 Beta 1b",
|
||||
"101074": "4.1.17 Beta 2",
|
||||
"101075": "4.1.17 Beta 3",
|
||||
"101076": "4.1.17 Beta 3",
|
||||
"101077": "4.1.17",
|
||||
"101078": "4.1.17.1",
|
||||
"101079": "4.1.18 Beta 1",
|
||||
"101082": "4.1.18 Beta 1b",
|
||||
"101083": "4.1.18 Beta 2",
|
||||
"101084": "4.1.18 Beta 3",
|
||||
"101085": "4.1.18",
|
||||
"101088": "4.1.18.1",
|
||||
"101089": "4.1.18.2",
|
||||
"101090": "4.1.19 Beta 1",
|
||||
"101091": "4.1.19 Beta 2",
|
||||
"101092": "4.1.19 Beta 3",
|
||||
"101093": "4.1.19",
|
||||
"101094": "4.1.19.1",
|
||||
"101095": "4.1.19.2 Beta 1",
|
||||
"101096": "4.1.19.2",
|
||||
"101097": "4.1.19.2",
|
||||
"101098": "4.1.19.3",
|
||||
"101099": "4.1.19.4",
|
||||
"101100": "4.2.0 Beta 1",
|
||||
"101101": "4.2.0 Beta 1",
|
||||
"101102": "4.2.0 Beta 1",
|
||||
"101103": "4.2.0 Beta 1",
|
||||
"101104": "4.2.0 Beta 2",
|
||||
"101105": "4.2.0 Beta 3",
|
||||
"101106": "4.2.0 Beta 3a",
|
||||
"101107": "4.2.0 Beta 4",
|
||||
"101108": "4.2.0 Beta 4",
|
||||
"101109": "4.2.0 Beta 5",
|
||||
"101110": "4.2.0 Beta 5a",
|
||||
"101111": "4.2.0 Beta 6",
|
||||
"101112": "4.2.0 Beta 6a",
|
||||
"101113": "4.2.0 Beta 6a",
|
||||
"101114": "4.2.0 Beta 7",
|
||||
"101115": "4.2.0 Beta 7a",
|
||||
"101116": "4.2.0 Beta 8",
|
||||
"101117": "4.2.0 Beta 8",
|
||||
"102000": "4.2.0",
|
||||
"102001": "4.2.0",
|
||||
"102002": "4.2.0",
|
||||
"102003": "4.2.0",
|
||||
"102004": "4.2.1",
|
||||
"102005": "4.2.2 Beta 1",
|
||||
"102006": "4.2.2 Beta 2",
|
||||
"102007": "4.2.2",
|
||||
"102008": "4.2.2",
|
||||
"102009": "4.2.2",
|
||||
"102010": "4.2.3 Beta 1",
|
||||
"102011": "4.2.3",
|
||||
"102012": "4.2.3",
|
||||
"102013": "4.2.3",
|
||||
"102014": "4.2.4 Beta 1",
|
||||
"102015": "4.2.4 Beta 2",
|
||||
"102016": "4.2.4",
|
||||
"102017": "4.2.4",
|
||||
"102018": "4.2.4",
|
||||
"102019": "4.2.4",
|
||||
"102020": "4.2.4",
|
||||
"102021": "4.2.5 Beta 1",
|
||||
"102022": "4.2.5 Beta 2",
|
||||
"102023": "4.2.5 Beta 3",
|
||||
"102024": "4.2.5",
|
||||
"102025": "4.2.5",
|
||||
"102026": "4.2.5",
|
||||
"102027": "4.2.5",
|
||||
"102028": "4.2.5",
|
||||
"102029": "4.2.5",
|
||||
"102030": "4.2.6 Beta 1",
|
||||
"102031": "4.2.6 Beta 1",
|
||||
"102032": "4.2.6 Beta 2",
|
||||
"102033": "4.2.6 Beta 3",
|
||||
"102034": "4.2.6",
|
||||
"102035": "4.2.6",
|
||||
"102036": "4.2.6",
|
||||
"102037": "4.2.7 Beta 1",
|
||||
"102038": "4.2.7 Beta 2",
|
||||
"102039": "4.2.7 Beta 3",
|
||||
"102040": "4.2.7 Beta 4",
|
||||
"102041": "4.2.7 Beta 5",
|
||||
"102042": "4.2.7",
|
||||
"102043": "4.2.7",
|
||||
"102044": "4.2.7",
|
||||
"102045": "4.2.7",
|
||||
"102046": "4.2.7",
|
||||
"102047": "4.2.8",
|
||||
"102048": "4.2.8",
|
||||
"102049": "4.2.9",
|
||||
"103000": "4.3.0 Beta 1",
|
||||
"103002": "4.3.0 Beta 2",
|
||||
"103003": "4.3.0 Beta 3",
|
||||
"103004": "4.3.0 Beta 4",
|
||||
"103005": "4.3.0",
|
||||
"103006": "4.3.1",
|
||||
"103007": "4.3.1",
|
||||
"103008": "4.3.1",
|
||||
"103009": "4.3.2",
|
||||
"103010": "4.3.2",
|
||||
"103011": "4.3.3",
|
||||
"103012": "4.3.3",
|
||||
"103013": "4.3.3",
|
||||
"103014": "4.3.3",
|
||||
"103015": "4.3.3",
|
||||
"103016": "4.3.3",
|
||||
"103017": "4.3.3",
|
||||
"103018": "4.3.3",
|
||||
"103019": "4.3.3",
|
||||
"103020": "4.3.3",
|
||||
"103021": "4.3.4",
|
||||
"103022": "4.3.4",
|
||||
"103023": "4.3.4",
|
||||
"103024": "4.3.4",
|
||||
"103025": "4.3.4",
|
||||
"103026": "4.3.5 Beta 1",
|
||||
"103027": "4.3.5 Beta 2",
|
||||
"103028": "4.3.5",
|
||||
"103029": "4.3.5",
|
||||
"103030": "4.3.5",
|
||||
"103031": "4.3.5",
|
||||
"103032": "4.3.5",
|
||||
"103033": "4.3.6 Beta 1",
|
||||
"103034": "4.3.6 Beta 2",
|
||||
"103035": "4.3.6",
|
||||
"103036": "4.3.6",
|
||||
"103037": "4.3.6",
|
||||
"103038": "4.3.6",
|
||||
"103039": "4.3.6",
|
||||
"104000": "4.4.0 Beta 1",
|
||||
"104001": "4.4.0 Beta 2",
|
||||
"104002": "4.4.0 Beta 3",
|
||||
"104004": "4.4.0 Beta 4",
|
||||
"104003": "4.4.0 Beta 4",
|
||||
"104005": "4.4.0",
|
||||
"104006": "4.4.0",
|
||||
"104007": "4.4.0",
|
||||
"104008": "4.4.0",
|
||||
"104009": "4.4.1",
|
||||
"104010": "4.4.1 Beta 2",
|
||||
"104011": "4.4.1",
|
||||
"104012": "4.4.1",
|
||||
"104013": "4.4.1",
|
||||
"104014": "4.4.1",
|
||||
"104015": "4.4.2 Beta 1",
|
||||
"104016": "4.4.2",
|
||||
"104017": "4.4.2",
|
||||
"104018": "4.4.2",
|
||||
"104019": "4.4.2",
|
||||
"104020": "4.4.2",
|
||||
"104021": "4.4.3 Beta 1",
|
||||
"104022": "4.4.3 Beta 2",
|
||||
"104023": "4.4.3",
|
||||
"104024": "4.4.3",
|
||||
"104025": "4.4.3",
|
||||
"104026": "4.4.4 Beta 1",
|
||||
"104027": "4.4.4",
|
||||
"104028": "4.4.4",
|
||||
"104029": "4.4.4",
|
||||
"104030": "4.4.5 Beta 1",
|
||||
"104031": "4.4.5 Beta 2",
|
||||
"104032": "4.4.5 Beta 2",
|
||||
"104033": "4.4.5",
|
||||
"104034": "4.4.5",
|
||||
"104035": "4.4.5",
|
||||
"104036": "4.4.5",
|
||||
"104037": "4.4.5",
|
||||
"104038": "4.4.6",
|
||||
"104039": "4.4.6",
|
||||
"104040": "4.4.6",
|
||||
"104041": "4.4.7 Beta 1",
|
||||
"104042": "4.4.7 Beta 2",
|
||||
"104043": "4.4.7 Beta 3",
|
||||
"104044": "4.4.7",
|
||||
"104045": "4.4.8 Beta 1",
|
||||
"104046": "4.4.8 Beta 2",
|
||||
"104047": "4.4.8",
|
||||
"104048": "4.4.9 Beta 1",
|
||||
"104049": "4.4.9",
|
||||
"104050": "4.4.9",
|
||||
"104051": "4.4.9",
|
||||
"104052": "4.4.9",
|
||||
"104053": "4.4.9.1",
|
||||
"104054": "4.4.9.1",
|
||||
"104055": "4.4.9.2",
|
||||
"104056": "4.4.9.2",
|
||||
"104057": "4.4.10 Beta 1",
|
||||
"104058": "4.4.10 Beta 2",
|
||||
"104059": "4.4.10 Beta 3",
|
||||
"104060": "4.4.10 Beta 4",
|
||||
"104061": "4.4.10",
|
||||
"104062": "4.4.10",
|
||||
"104063": "4.4.10",
|
||||
"104064": "4.4.10",
|
||||
"104065": "4.4.10",
|
||||
"104066": "4.4.10",
|
||||
"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",
|
||||
@@ -666,5 +348,54 @@
|
||||
"5000071": "5.0.6 Beta 2",
|
||||
"5000072": "5.0.6 Beta 3",
|
||||
"5000073": "5.0.6 Beta 4",
|
||||
"5000074": "5.0.6"
|
||||
"5000074": "5.0.6",
|
||||
"5000075": "5.0.7 Beta 1",
|
||||
"5000076": "5.0.7 Beta 2",
|
||||
"5000077": "5.0.7 Beta 2",
|
||||
"5000078": "5.0.7 Beta 3",
|
||||
"5000079": "5.0.7 Beta 4",
|
||||
"5000080": "5.0.7",
|
||||
"5000081": "5.0.7",
|
||||
"5000082": "5.0.7",
|
||||
"5000800": "5.0.8 Alpha 1",
|
||||
"5000801": "5.0.8 Alpha 2",
|
||||
"5000802": "5.0.8 Beta 1",
|
||||
"5000803": "5.0.8 Beta 2",
|
||||
"5000804": "5.0.8 Beta 3",
|
||||
"5000805": "5.0.8",
|
||||
"5000900": "5.0.9 Beta 1",
|
||||
"5000901": "5.0.9 Beta 1",
|
||||
"5000902": "5.0.9 Beta 1",
|
||||
"5000903": "5.0.9 Beta 2",
|
||||
"5000904": "5.0.9",
|
||||
"5000905": "5.0.9",
|
||||
"5000906": "5.0.10 Beta 1",
|
||||
"5000907": "5.0.10 Beta 1",
|
||||
"5000908": "5.0.10 Beta 1",
|
||||
"5000909": "5.0.10 Beta 1",
|
||||
"5000910": "5.0.10 Beta 2",
|
||||
"5000911": "5.0.10 Beta 3",
|
||||
"5000912": "5.0.10 Beta 4",
|
||||
"5000913": "5.0.10 Beta 4",
|
||||
"5000914": "5.0.10",
|
||||
"5000915": "5.0.10",
|
||||
"5000916": "5.0.10",
|
||||
"5000917": "5.0.10",
|
||||
"5000918": "5.0.10",
|
||||
"5000919": "5.0.10",
|
||||
"5000920": "5.0.10",
|
||||
"5001100": "5.0.11 Beta 1",
|
||||
"5001101": "5.0.11 Beta 1",
|
||||
"5001102": "5.0.11 Beta 2",
|
||||
"5001103": "5.0.11",
|
||||
"5001104": "5.0.11",
|
||||
"5001105": "5.0.11",
|
||||
"5001200": "5.0.12 Beta 1",
|
||||
"5001201": "5.0.12 Beta 2",
|
||||
"5001202": "5.0.12 Beta 3",
|
||||
"5001203": "5.0.12",
|
||||
"5001204": "5.0.12",
|
||||
"5001300": "5.0.13 Beta 1",
|
||||
"5001301": "5.0.13 Beta 2",
|
||||
"5001302": "5.0.13"
|
||||
}
|
||||
@@ -110,7 +110,7 @@ class Widgets extends EditorLocationsAbstract
|
||||
|
||||
if ( $area !== NULL )
|
||||
{
|
||||
return Module::get( $area[0], $area[1] );
|
||||
return Module::get( $area[0], $area[1],'front' );
|
||||
}
|
||||
|
||||
throw new LogicException;
|
||||
|
||||
@@ -65,7 +65,7 @@ class MoveComments extends QueueAbstract
|
||||
case 'forums':
|
||||
if ( isset( $data['categoryId'] ) )
|
||||
{
|
||||
$where = array( Db::i()->in( 'comment_record_id', iterator_to_array( Db::i()->select( 'record_id', "cms_custom_database_{$data['databaseId']}", array( "category_id=?", $data['categoryId'] ) ) ) ) );
|
||||
$where = array( Db::i()->in( 'comment_record_id', iterator_to_array( Db::i()->select( 'primary_id_field', "cms_custom_database_{$data['databaseId']}", array( "category_id=?", $data['categoryId'] ) ) ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -75,16 +75,6 @@ class RssImport extends RssImportAbstract
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show in the Admin CP?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function showInAdminCp(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return available options for a Form\Select
|
||||
*
|
||||
|
||||
@@ -35,6 +35,7 @@ class CopyTopicToDatabase extends Item
|
||||
$link = new Menu\Link( Url::internal( 'app=cms&module=database&controller=topic&id=' . $item->tid . '&_new=1', 'front', 'topic_copy', $item->title_seo ), 'copy_topic_to_database' );
|
||||
$link->opensDialog( 'copy_select_database', 'narrow', remoteSubmit: true );
|
||||
$link->position = 'delete';
|
||||
$link->icon = 'fa-solid fa-copy';
|
||||
$newLinks['cms'] = $link;
|
||||
}
|
||||
return $newLinks;
|
||||
|
||||
@@ -80,6 +80,7 @@ try
|
||||
Output::i()->sendHeader( "Content-Length: " . $file->filesize() );
|
||||
Output::i()->sendHeader( "Content-Security-Policy: default-src 'none'; sandbox" );
|
||||
Output::i()->sendHeader( "X-Content-Security-Policy: default-src 'none'; sandbox" );
|
||||
Output::i()->sendHeader( "Cross-Origin-Opener-Policy: same-origin" );
|
||||
|
||||
$file->printFile();
|
||||
exit;
|
||||
|
||||
@@ -74,6 +74,8 @@ class Databases extends MemberListenerType
|
||||
Db::i()->update( 'cms_custom_database_' . $field['field_database_id'], array( 'field_' . $field['field_id'] => implode( ',', $members ) ), array( 'primary_id_field=?', $record['primary_id_field'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
Db::i()->update( 'cms_page_revisions', [ 'revision_member_id' => $member->member_id ], [ 'revision_member_id=?', $member2->member_id ] );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -85,6 +87,7 @@ class Databases extends MemberListenerType
|
||||
public function onDelete( Member $member ) : void
|
||||
{
|
||||
Db::i()->update( 'cms_database_revisions', array( 'revision_member_id' => 0 ), array( 'revision_member_id=?', $member->member_id ) );
|
||||
Db::i()->update( 'cms_page_revisions', [ 'revision_member_id' => 0 ], [ 'revision_member_id=?', $member->member_id ] );
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -41,6 +41,7 @@ use OutOfRangeException;
|
||||
use function defined;
|
||||
use function in_array;
|
||||
use const IPS\Helpers\Table\SEARCH_NODE;
|
||||
use const IPS\Helpers\Table\SEARCH_NUMERIC_TEXT;
|
||||
use const IPS\Helpers\Table\SEARCH_SELECT;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -139,18 +140,13 @@ class records extends Controller
|
||||
Member::loggedIn()->language()->words['content_db_table_field_' . $database->field_title ] = Member::loggedIn()->language()->addToStack( 'content_db_table_title' );
|
||||
|
||||
$table->advancedSearch = array(
|
||||
'category_id' => array( SEARCH_NODE, array(
|
||||
'category_id' => [SEARCH_NODE, [
|
||||
'class' => '\IPS\cms\Categories' . $database->id,
|
||||
'disabled' => false,
|
||||
'zeroVal' => 'content_db_table_as_no_cat'
|
||||
),
|
||||
),
|
||||
'record_comments'=> array( SEARCH_SELECT, array( 'options' => array(
|
||||
'null' => 'content_db_table_as_comments_null',
|
||||
1 => 'content_db_table_as_comments_yes',
|
||||
2 => 'content_db_table_as_comments_no'
|
||||
)
|
||||
) ),
|
||||
],
|
||||
],
|
||||
'record_comments'=> [SEARCH_NUMERIC_TEXT, [] ],
|
||||
);
|
||||
|
||||
/* Buttons */
|
||||
|
||||
@@ -14,16 +14,21 @@ namespace IPS\cms\modules\admin\pages;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use DomainException;
|
||||
use IPS\cms\Pages\Folder;
|
||||
use IPS\cms\Pages\Page;
|
||||
use IPS\Data\Store;
|
||||
use IPS\DateTime;
|
||||
use IPS\Db;
|
||||
use IPS\Dispatcher;
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Helpers\Form\CheckboxSet;
|
||||
use IPS\Helpers\Form\Radio;
|
||||
use IPS\Helpers\Table\Db as TableDb;
|
||||
use IPS\Helpers\Tree\Tree;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
use IPS\Member\Group;
|
||||
use IPS\Node\Controller;
|
||||
use IPS\Node\Model;
|
||||
use IPS\Output;
|
||||
@@ -36,6 +41,7 @@ use UnderflowException;
|
||||
use function count;
|
||||
use function defined;
|
||||
use function strpos;
|
||||
use const IPS\REBUILD_QUICK;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
@@ -260,7 +266,7 @@ FILE;
|
||||
protected function form() : void
|
||||
{
|
||||
/* If this is a database page, redirect to database form */
|
||||
if( isset( static::$pageToDatabaseMap[ Request::i()->id ] ) )
|
||||
if( isset( static::$pageToDatabaseMap[ Request::i()->id ] ) and isset( Request::i()->subnode ) and Request::i()->subnode )
|
||||
{
|
||||
Output::i()->redirect( Url::internal( "app=cms&module=databases&controller=databases&do=form&id=" . static::$pageToDatabaseMap[ Request::i()->id ] ) );
|
||||
}
|
||||
@@ -317,9 +323,77 @@ FILE;
|
||||
*/
|
||||
protected function setAsDefault() : void
|
||||
{
|
||||
Session::i()->csrfCheck();
|
||||
Page::load( Request::i()->id )->setAsDefault();
|
||||
Output::i()->redirect( Url::internal( "app=cms&module=pages&controller=pages" ), 'saved' );
|
||||
$page = Page::load( Request::i()->id );
|
||||
|
||||
$defaults = Page::loadDefaultsPerGroup()[ $page->folder_id ] ?? [];
|
||||
$options = [];
|
||||
$selected = [];
|
||||
$descriptions = [];
|
||||
foreach( Group::groups() as $group )
|
||||
{
|
||||
$options[ $group->g_id ] = $group->name;
|
||||
if( isset( $defaults[ $group->g_id ] ) )
|
||||
{
|
||||
if( $defaults[ $group->g_id ] == $page->id )
|
||||
{
|
||||
$selected[] = $group->g_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$descriptions[ $group->g_id ] = Page::load( $defaults[ $group->g_id ] )->seo_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$form = new Form;
|
||||
$form->addMessage( 'set_page_default_info', 'info' );
|
||||
$form->add( new Form\YesNo( 'set_page_default', $page->default == Page::PAGE_DEFAULT, false, [
|
||||
'togglesOff' => [ 'set_group_defaults' ]
|
||||
] ) );
|
||||
$form->add( new CheckboxSet( 'set_group_defaults', $selected, false, [
|
||||
'options' => $options,
|
||||
'descriptions' => $descriptions,
|
||||
'noDefault' => true
|
||||
], function( $val ) use ( $page, $defaults ) {
|
||||
/* If this was the default page, make sure we don't leave any groups stranded! */
|
||||
if( $page->default == Page::PAGE_DEFAULT )
|
||||
{
|
||||
foreach( $defaults as $groupId => $groupPage )
|
||||
{
|
||||
try
|
||||
{
|
||||
$group = Group::load( $groupId );
|
||||
}
|
||||
catch( OutOfRangeException )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $groupPage == $page->id and !in_array( $groupId, $val ) )
|
||||
{
|
||||
throw new DomainException( Member::loggedIn()->language()->addToStack( 'err__no_page_default', true, [ 'sprintf' => [ $group->name ] ] ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}, id: 'set_group_defaults' ) );
|
||||
|
||||
if( $values = $form->values() )
|
||||
{
|
||||
if( $values['set_page_default'] )
|
||||
{
|
||||
$page->setAsDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
$page->setAsDefaultForGroups( $values['set_group_defaults'] );
|
||||
}
|
||||
|
||||
Session::i()->log( 'acplogs__cms_page_set_default', [ 'cms_page_' . $page->id => TRUE, $page->parent()?->_title ?? 'root' => FALSE ] );
|
||||
|
||||
Output::i()->redirect( Url::internal( "app=cms&module=pages&controller=pages" ), 'saved' );
|
||||
}
|
||||
|
||||
Output::i()->output = (string) $form;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -334,6 +408,84 @@ FILE;
|
||||
Output::i()->redirect( Url::internal( "app=cms&module=pages&controller=pages" ), 'saved' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all page history
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function history() : void
|
||||
{
|
||||
try
|
||||
{
|
||||
if( !isset( Request::i()->subnode ) or !Request::i()->subnode )
|
||||
{
|
||||
throw new OutOfRangeException;
|
||||
}
|
||||
|
||||
$page = Page::load( Request::i()->id );
|
||||
}
|
||||
catch( OutOfRangeException )
|
||||
{
|
||||
Output::i()->error( 'node_error', '3T260/2', 404 );
|
||||
}
|
||||
|
||||
$table = new TableDb( 'cms_page_revisions', $this->url->setQueryString( [ 'id' => $page->id, 'do' => 'history', 'subnode' => Request::i()->subnode ] ), [ [ 'revision_page_id=?', $page->id ] ] );
|
||||
$table->joins[] = [ 'from' => 'core_members', 'where' => 'revision_member_id=member_id' ];
|
||||
$table->sortBy = $table->sortBy ?: 'revision_date';
|
||||
$table->sortDirection = $table->sortDirection ?: 'desc';
|
||||
$table->include = [ 'revision_date', 'revision_member_id' ];
|
||||
$table->noSort = [ 'revision_member_id' ];
|
||||
|
||||
/* Filters */
|
||||
$table->filters = [
|
||||
'revision_page_manual' => [ '( revision_manual_save=1 )' ]
|
||||
];
|
||||
|
||||
try
|
||||
{
|
||||
$previousManualSave = Db::i()->select( 'revision_id', 'cms_page_revisions', [ 'revision_page_id=? AND revision_manual_save=1', $page->id ], 'revision_id DESC', [ 1,1 ] )->first();
|
||||
|
||||
if ( $previousManualSave > 0 )
|
||||
{
|
||||
$table->filters['revision_page_last_session'] = ['( revision_id > ' . $previousManualSave . ' )'];
|
||||
}
|
||||
}
|
||||
catch( UnderflowException $e )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
$table->parsers = [
|
||||
'revision_date' => function( $val, $row )
|
||||
{
|
||||
return Theme::i()->getTemplate( 'pages', 'cms', 'admin' )->revisionDate( DateTime::ts( $val ), $row['revision_manual_save'] );
|
||||
},
|
||||
'revision_member_id' => function( $val, $row )
|
||||
{
|
||||
$member = Member::constructFromData( $row );
|
||||
return Theme::i()->getTemplate( 'global', 'core' )->userLink( $member );
|
||||
}
|
||||
];
|
||||
|
||||
$table->rowButtons = function( $row ) use ( $page )
|
||||
{
|
||||
return [
|
||||
'view' => [
|
||||
'icon' => 'search',
|
||||
'title' => 'view_page_revision',
|
||||
'link' => $page->url()->setQueryString( 'version', $row['revision_id'] ),
|
||||
'target' => '_blank'
|
||||
]
|
||||
];
|
||||
};
|
||||
|
||||
Output::i()->title = $page->_title;
|
||||
Output::i()->breadcrumb[] = [ $this->url, Member::loggedIn()->language()->addToStack( 'menu__cms_pages_pages' ) ];
|
||||
Output::i()->breadcrumb[] = [ Url::internal('app=cms&module=pages&controller=pages&do=form&subnode=' . Request::i()->subnode . '&id=' . $page->_id ), $page->_title ];
|
||||
Output::i()->breadcrumb[] = [ null, Member::loggedIn()->language()->addToStack( 'content_page_history' ) ];
|
||||
Output::i()->output = (string) $table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tree Search
|
||||
*
|
||||
@@ -380,7 +532,21 @@ FILE;
|
||||
'sprintf' => array( Url::internal( "app=cms&module=databases&controller=databases&do=form&id=" . static::$pageToDatabaseMap[ $page->id ] ) )
|
||||
) );
|
||||
}
|
||||
return Theme::i()->getTemplate( 'trees', 'core' )->row( $url, $page->id, $page->seo_name, false, $page->getButtons( Url::internal('app=cms&module=pages&controller=pages'), true ), Member::loggedIn()->language()->addToStack( 'num_views_with_number', NULL, array( 'pluralize' => array( $page->views ) ) ), 'file-text-o', NULL, FALSE, NULL, NULL, $badge, FALSE, FALSE, FALSE );
|
||||
|
||||
$names = [];
|
||||
if( $page->default == Page::PAGE_DEFAULT_OVERRIDE and !empty( $page->group_defaults ) )
|
||||
{
|
||||
foreach( explode( ",", $page->group_defaults ) as $groupId )
|
||||
{
|
||||
try
|
||||
{
|
||||
$names[] = Group::load( $groupId )->name;
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
}
|
||||
}
|
||||
|
||||
return Theme::i()->getTemplate( 'trees', 'core' )->row( $url, $page->id, $page->seo_name, false, $page->getButtons( Url::internal('app=cms&module=pages&controller=pages'), true ), Member::loggedIn()->language()->addToStack( 'num_views_with_number', NULL, array( 'pluralize' => array( $page->views ) ) ), 'file-text-o', NULL, FALSE, NULL, NULL, $badge, FALSE, FALSE, FALSE, true, Theme::i()->getTemplate( 'pages' )->pageRowHtml( $page, implode( ", ", $names ) ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class templates extends Controller
|
||||
];
|
||||
foreach( Databases::$templateGroups as $key => $group )
|
||||
{
|
||||
$groups[ $key ] = Member::loggedIn()->language()->addToStack( 'cms_new_db_template_group_' . $key );
|
||||
$groups[ $group ] = Member::loggedIn()->language()->addToStack( 'cms_new_db_template_group_' . $key );
|
||||
}
|
||||
|
||||
/* Build a list of all custom directories */
|
||||
@@ -623,7 +623,7 @@ class templates extends Controller
|
||||
|
||||
try
|
||||
{
|
||||
$count = Db::i()->select( 'COUNT(*)', 'cms_templates', array( "LOWER(template_title)=?", mb_strtolower( str_replace( ' ', '_', $val ) ) ) )->first();
|
||||
$count = Db::i()->select( 'COUNT(*)', 'cms_templates', array( "LOWER(template_group)=?", mb_strtolower( str_replace( ' ', '_', $val ) ) ) )->first();
|
||||
|
||||
if ( $count )
|
||||
{
|
||||
|
||||
@@ -665,12 +665,6 @@ class category extends Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
Output::i()->metaTags['title'] = $category->metaTitle();
|
||||
Output::i()->metaTags['description'] = $category->metaDescription();
|
||||
Output::i()->metaTags['og:title'] = $category->metaTitle();
|
||||
Output::i()->metaTags['og:description'] = $category->metaDescription();
|
||||
Output::i()->linkTags['canonical'] = (string) $category->url();
|
||||
|
||||
/* Set breadcrumb */
|
||||
if ( $club = $category->_club )
|
||||
{
|
||||
@@ -687,6 +681,12 @@ class category extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
Output::i()->metaTags['title'] = $category->metaTitle();
|
||||
Output::i()->metaTags['description'] = $category->metaDescription();
|
||||
Output::i()->metaTags['og:title'] = $category->metaTitle();
|
||||
Output::i()->metaTags['og:description'] = $category->metaDescription();
|
||||
Output::i()->linkTags['canonical'] = (string) $category->url();
|
||||
|
||||
/* Node handler does not support keywords, so we need to do it manually */
|
||||
if ( $category->meta_keywords )
|
||||
{
|
||||
@@ -772,7 +772,6 @@ class category extends Controller
|
||||
}
|
||||
|
||||
$this->showClubHeader( $category );
|
||||
Output::i()->allowDefaultWidgets = FALSE;
|
||||
Output::i()->sidebar['enabled'] = FALSE;
|
||||
Output::i()->output = $form->customTemplate( array( \IPS\cms\Theme::i()->getTemplate( $database->template_form, 'cms', 'database' ), 'recordForm' ), NULL, $category, $database, Page::$currentPage, $title, $hasModOptions );
|
||||
Dispatcher::i()->output .= Output::i()->output;
|
||||
|
||||
@@ -88,6 +88,7 @@ class record extends Controller
|
||||
protected function manage() : mixed
|
||||
{
|
||||
/* Load record */
|
||||
/** @var Records $record */
|
||||
try
|
||||
{
|
||||
$record = parent::manage();
|
||||
@@ -318,11 +319,11 @@ class record extends Controller
|
||||
}
|
||||
|
||||
$logo = NULL;
|
||||
if( Theme::i()->logo['front'] )
|
||||
if( !empty( Theme::i()->logo['front']['url'] ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$logo = File::get( 'core_Theme', Theme::i()->logo['front']['url'] )->url;
|
||||
$logo = Theme::i()->logo['front']['url'];
|
||||
}
|
||||
/* File doesn't exist */
|
||||
catch ( RuntimeException | DomainException $e ){}
|
||||
@@ -795,7 +796,6 @@ class record extends Controller
|
||||
Output::i()->redirect( $record->url() );
|
||||
}
|
||||
|
||||
Output::i()->allowDefaultWidgets = FALSE;
|
||||
Output::i()->sidebar['enabled'] = FALSE;
|
||||
Output::i()->title = Member::loggedIn()->language()->addToStack( $title );
|
||||
Output::i()->cssFiles = array_merge( Output::i()->cssFiles, Theme::i()->css( 'records/form.css', 'cms', 'front' ) );
|
||||
|
||||
@@ -220,6 +220,7 @@ class topic extends Controller
|
||||
$fakeRecord->$titleField = $this->topic->mapped('title');
|
||||
$fakeRecord->$contentField = $this->topic->content();
|
||||
$fakeRecord->category_id = Request::i()->category_id;
|
||||
Request::i()->tags = $this->topic->tags();
|
||||
|
||||
if( $fakeRecord->_forum_record AND $fakeRecord->_forum_comments )
|
||||
{
|
||||
@@ -322,6 +323,12 @@ class topic extends Controller
|
||||
$obj->rebuildFirstAndLastCommentData();
|
||||
}
|
||||
|
||||
/* Remove tags from the original topic, so that we don't have duplicates on the tag page */
|
||||
$this->topic->setTags( [] );
|
||||
|
||||
/* Now we want to update the original topic in case we made any changes */
|
||||
$record->syncTopic();
|
||||
|
||||
try
|
||||
{
|
||||
/* If the database is on a page, go to the record */
|
||||
|
||||
@@ -16,6 +16,7 @@ use IPS\cms\Categories;
|
||||
use IPS\cms\Pages\Folder;
|
||||
use IPS\cms\Pages\Page;
|
||||
use IPS\cms\Records;
|
||||
use IPS\Content\Filter;
|
||||
use IPS\Db;
|
||||
use IPS\Patterns\ActiveRecordIterator;
|
||||
use IPS\Theme;
|
||||
@@ -69,19 +70,21 @@ class ajax extends \IPS\cms\modules\admin\pages\ajax
|
||||
{
|
||||
/* @var Categories $containerClass */
|
||||
$containerClass = 'IPS\cms\Categories' . Request::i()->navId;
|
||||
|
||||
try
|
||||
{
|
||||
$container = $containerClass::load( Request::i()->container );
|
||||
$items = [];
|
||||
foreach( $container->getContentItems( null, null ) as $item )
|
||||
{
|
||||
/* Only show items that we can actually see, and if they're not pending deletion */
|
||||
/* @var Records $item */
|
||||
if( $item->canView() and $item->hidden() !== -2 )
|
||||
{
|
||||
$items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
/* @var Records $itemClass */
|
||||
$itemClass = $containerClass::$contentItemClass;
|
||||
|
||||
$sort = ( $container::database()->field_sort ? $itemClass::$databaseTable . '.' . $itemClass::$databasePrefix . $container::database()->field_sort : 'record_last_comment' ) . ' ' . ( $container::database()->field_direction ?? 'desc' );
|
||||
|
||||
$items = iterator_to_array(
|
||||
$itemClass::getItemsWithPermission( [
|
||||
[ $itemClass::$databaseTable . '.category_id=?', $container->_id ]
|
||||
], $sort, null )
|
||||
);
|
||||
|
||||
Output::i()->sendOutput( Theme::i()->getTemplate( 'widgets', 'cms', 'front' )->databaseNavigationItems( $items ) );
|
||||
}
|
||||
|
||||
@@ -168,15 +168,7 @@ class builder extends widgets
|
||||
try
|
||||
{
|
||||
$block = Block::load( Request::i()->id );
|
||||
|
||||
try
|
||||
{
|
||||
$widget = $block->widget();
|
||||
}
|
||||
catch ( OutOfRangeException )
|
||||
{
|
||||
$widget = new Blocks( "", ['cms_widget_custom_block' => $block->key] );
|
||||
}
|
||||
$widget = new Blocks( "", ['cms_widget_custom_block' => $block->key] );
|
||||
Output::i()->json( [ "content" => (string) $widget, "configuration" => $widget->dataAttributes(), 'block_key' => $block->key ], 200 );
|
||||
}
|
||||
catch ( UnderFlowException|OutOfRangeException $e )
|
||||
|
||||
@@ -13,8 +13,10 @@ namespace IPS\cms\modules\front\pages;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Member;
|
||||
use IPS\cms\Databases\Dispatcher;
|
||||
use IPS\cms\Pages\Page as PageClass;
|
||||
use IPS\cms\Pages\Revision;
|
||||
use IPS\Dispatcher\Controller;
|
||||
use IPS\Http\Url;
|
||||
use IPS\IPS;
|
||||
@@ -46,9 +48,32 @@ class page extends Controller
|
||||
*/
|
||||
public function manage() : void
|
||||
{
|
||||
Output::i()->bodyAttributes['contentClass'] = PageClass::class;
|
||||
$this->view();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function storeRevision(): void
|
||||
{
|
||||
if( ! Member::loggedIn()->modPermission('can_manage_sidebar') )
|
||||
{
|
||||
Output::i()->error( 'content_err_page_403', '2T187/5', 403 );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$page = static::getPage();
|
||||
Revision::store( $page, true );
|
||||
Output::i()->json( [ 'result' => 'ok' ] );
|
||||
}
|
||||
catch( OutOfRangeException $e )
|
||||
{
|
||||
Output::i()->error( 'content_err_page_404', '2T187/6', 404 );
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Display a page. Sounds simple doesn't it? Well it's not.
|
||||
*
|
||||
@@ -57,6 +82,11 @@ class page extends Controller
|
||||
protected function view() : void
|
||||
{
|
||||
$page = $this::getPage();
|
||||
|
||||
if( isset( Request::i()->version ) and Member::loggedIn()->modPermission('can_manage_sidebar') )
|
||||
{
|
||||
$page->setVersion( Request::i()->version );
|
||||
}
|
||||
|
||||
/* Database specific checks */
|
||||
if ( isset( Request::i()->advancedSearchForm ) AND isset( Request::i()->d ) )
|
||||
@@ -150,7 +180,7 @@ class page extends Controller
|
||||
else if ( isset( Request::i()->path ) AND Request::i()->path != '/' )
|
||||
{
|
||||
/* Sort out pagination for pages */
|
||||
list( $path, $pageNumber ) = PageClass::getStrippedPagePath( Request::i()->path );
|
||||
[ $path, $pageNumber ] = PageClass::getStrippedPagePath( Request::i()->path );
|
||||
if( $pageNumber AND !Request::i()->page )
|
||||
{
|
||||
Request::i()->page = $pageNumber;
|
||||
@@ -183,7 +213,7 @@ class page extends Controller
|
||||
{
|
||||
try
|
||||
{
|
||||
$page = PageClass::getDefaultPage();
|
||||
$page = PageClass::getDefaultForMember();
|
||||
}
|
||||
catch ( OutOfRangeException $e )
|
||||
{
|
||||
@@ -211,6 +241,48 @@ class page extends Controller
|
||||
|
||||
return $page;
|
||||
}
|
||||
|
||||
/**
|
||||
* Revert a page to a specific version
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function revertToVersion() : void
|
||||
{
|
||||
Request::i()->confirmedDelete();
|
||||
|
||||
if( !\IPS\Dispatcher::i()->application->canManageWidgets() )
|
||||
{
|
||||
Output::i()->error( 'content_err_page_403', '2T187/8', 403 );
|
||||
}
|
||||
|
||||
$page = static::getPage();
|
||||
|
||||
$version = null;
|
||||
if( isset( Request::i()->version ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$version = Revision::load( Request::i()->version );
|
||||
}
|
||||
catch( OutOfRangeException )
|
||||
{
|
||||
Output::i()->error( 'content_err_page_404', '2T187/6', 404 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = Revision::previousVersion( $page );
|
||||
if( $version === null )
|
||||
{
|
||||
Output::i()->error( 'content_err_page_404', '2T187/7', 404 );
|
||||
}
|
||||
}
|
||||
|
||||
$version->revert();
|
||||
|
||||
Output::i()->redirect( $page->url() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Capture database specific things
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 5.0.0 Alpha 8 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 31 Jul 2024
|
||||
*/
|
||||
|
||||
namespace IPS\cms\setup\upg_5000011;
|
||||
|
||||
use IPS\cms\Databases;
|
||||
use IPS\Db;
|
||||
use function defined;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 5.0.0 Alpha 8 Upgrade Code
|
||||
*/
|
||||
class Upgrade
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
*
|
||||
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1() : bool|array
|
||||
{
|
||||
/* Add the offset field for each existing database */
|
||||
foreach( Databases::databases() as $db )
|
||||
{
|
||||
if( !Db::i()->checkForColumn( 'cms_custom_database_' . $db->id, 'record_image_offset' ) )
|
||||
{
|
||||
Db::i()->addColumn( 'cms_custom_database_' . $db->id, [
|
||||
'name' => 'record_image_offset',
|
||||
'type' => 'INT',
|
||||
'default' => 0
|
||||
] );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 5.0.0 Alpha 16 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 23 Sep 2024
|
||||
*/
|
||||
|
||||
namespace IPS\cms\setup\upg_5000024;
|
||||
|
||||
use IPS\cms\Databases;
|
||||
use IPS\Db;
|
||||
use function defined;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 5.0.0 Alpha 16 Upgrade Code
|
||||
*/
|
||||
class Upgrade
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
*
|
||||
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1() : bool|array
|
||||
{
|
||||
/* Make sure the assignment ID field is there */
|
||||
foreach( Databases::databases() as $db )
|
||||
{
|
||||
if( !Db::i()->checkForColumn( 'cms_custom_database_' . $db->id, 'record_assignment_id' ) )
|
||||
{
|
||||
Db::i()->addColumn( 'cms_custom_database_' . $db->id, [
|
||||
'name' => 'record_assignment_id',
|
||||
'type' => 'BIGINT',
|
||||
'length' => 20,
|
||||
'default' => 0,
|
||||
'unsigned' => false
|
||||
] );
|
||||
}
|
||||
|
||||
/* Populate existing assignments */
|
||||
foreach( Db::i()->select( '*', 'core_assignments', [ 'assign_item_class=?', 'IPS\cms\Records' . $db->id ] ) as $row )
|
||||
{
|
||||
Db::i()->update( 'cms_custom_database_' . $db->id, [ 'record_assignment_id' => $row['assign_id'] ], [ 'primary_id_field=?', $row['assign_item_id'] ] );
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
@@ -11,6 +11,9 @@
|
||||
|
||||
namespace IPS\cms\setup\upg_5000029;
|
||||
|
||||
use IPS\cms\Pages\Page;
|
||||
use IPS\Db;
|
||||
use IPS\Widget\Area;
|
||||
use function array_keys;
|
||||
use function array_merge;
|
||||
use function defined;
|
||||
@@ -38,67 +41,55 @@ class Upgrade
|
||||
public function step1() : bool|array
|
||||
{
|
||||
$areas = [];
|
||||
foreach( \IPS\Db::i()->select( '*', 'cms_page_widget_areas', [], 'area_page_id ASC' ) as $row )
|
||||
foreach( Db::i()->select( '*', 'cms_page_widget_areas', [], 'area_page_id ASC' ) as $row )
|
||||
{
|
||||
$areas[ $row['area_page_id'] ][ $row['area_area'] ] = $row;
|
||||
}
|
||||
|
||||
/* Now check to make sure that we have a col1 area and also that we don't have a database widget in header/footer/sidebar from v4 */
|
||||
/* Now check for a Database widget in the wrong area.
|
||||
We have to do this by database rows because if we try to build an area
|
||||
with an invalid widget (e.g. database in a protected area), it will just ignore the widget */
|
||||
foreach( $areas as $pageId => $areaRows )
|
||||
{
|
||||
if ( ! in_array( 'col1', array_keys( $areaRows ) ) )
|
||||
try
|
||||
{
|
||||
/* Insert one */
|
||||
\IPS\Db::i()->insert( 'cms_page_widget_areas', [
|
||||
'area_page_id' => $pageId,
|
||||
'area_widgets' => '[]',
|
||||
'area_area' => 'col1',
|
||||
'area_orientation' => 'vertical',
|
||||
'area_tree' => ''
|
||||
] );
|
||||
}
|
||||
$page = Page::load( $pageId );
|
||||
|
||||
/* Now check for a Database widget in the wrong area */
|
||||
foreach( [ 'header', 'footer', 'sidebar' ] as $protectedArea )
|
||||
{
|
||||
if ( in_array( $protectedArea, array_keys( $areaRows ) ) and $areaRows[ $protectedArea ]['area_widgets'] )
|
||||
foreach( [ 'header', 'footer', 'sidebar' ] as $protectedArea )
|
||||
{
|
||||
if( $widgets = json_decode( $areaRows[ $protectedArea ]['area_widgets'], true ) )
|
||||
if ( in_array( $protectedArea, array_keys( $areaRows ) ) and $areaRows[ $protectedArea ]['area_widgets'] )
|
||||
{
|
||||
$needsUpdating = false;
|
||||
$database = [];
|
||||
$newWidgets = [];
|
||||
foreach( $widgets as $widget )
|
||||
if( $widgets = json_decode( $areaRows[ $protectedArea ]['area_widgets'], true ) )
|
||||
{
|
||||
if ( $widget['app'] === 'cms' and $widget['key'] == 'Database' )
|
||||
foreach( $widgets as $idx => $widget )
|
||||
{
|
||||
/* Well, this shouldn't be here */
|
||||
$database = $widget;
|
||||
$needsUpdating = true;
|
||||
if ( $widget['app'] === 'cms' and $widget['key'] == 'Database' )
|
||||
{
|
||||
/* Let's load the main area for this page */
|
||||
$mainArea = $page->getAreasFromDatabase( 'col1' )['col1'] ?? new Area( [], 'col1' );
|
||||
$mainArea->addWidget( $widget );
|
||||
$page->saveArea( $mainArea, false );
|
||||
unset( $widgets[ $idx ] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
/* If there are no more widgets here, delete the area entirely */
|
||||
if( empty( $widgets ) )
|
||||
{
|
||||
$newWidgets[] = $widget;
|
||||
Db::i()->delete( 'cms_page_widget_areas', [ 'area_area=? and area_page_id=?', $protectedArea, $pageId ] );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $needsUpdating )
|
||||
{
|
||||
/* Get any existing from the database for col1 if it exists */
|
||||
if( $col1 = json_decode( $areaRows['col1']['area_widgets'], true ) )
|
||||
{
|
||||
$database = array_merge( [ $database ], $col1 );
|
||||
}
|
||||
|
||||
/* Update the existing area */
|
||||
\IPS\Db::i()->update( 'cms_page_widget_areas', [ 'area_widgets' => json_encode( $newWidgets ) ], [ 'area_page_id=? and area_area=?', $pageId, $protectedArea ] );
|
||||
|
||||
/* Move the database across */
|
||||
\IPS\Db::i()->update( 'cms_page_widget_areas', [ 'area_widgets' => json_encode( [ $database ] ) ], [ 'area_page_id=? and area_area=?', $pageId, 'col1' ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
/* Page doesn't exist, we can just delete it */
|
||||
Db::i()->delete( 'cms_page_widget_areas', [ 'area_page_id=?', $pageId ] );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000075,
|
||||
"name": "5.0.7 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"can_assign_record"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/clubs\/index",
|
||||
"front\/revisions\/table",
|
||||
"front\/submit\/createRecordForm"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000076,
|
||||
"name": "5.0.7 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000077,
|
||||
"name": "5.0.7 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000078,
|
||||
"name": "5.0.7 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000079,
|
||||
"name": "5.0.7 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000080,
|
||||
"name": "5.0.7",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000081,
|
||||
"name": "5.0.7",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000082,
|
||||
"name": "5.0.7",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000800,
|
||||
"name": "5.0.8 Alpha 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"content_block_php_disabled"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000801,
|
||||
"name": "5.0.8 Alpha 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000802,
|
||||
"name": "5.0.8 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000803,
|
||||
"name": "5.0.8 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000804,
|
||||
"name": "5.0.8 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000805,
|
||||
"name": "5.0.8",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000900,
|
||||
"name": "5.0.9 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"acplogs__cms_edited_record",
|
||||
"acplogs__cms_page_set_default"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": [
|
||||
"acplogs__cms_edited_recored"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/records\/categorySelector",
|
||||
"front\/submit\/createRecordForm"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000901,
|
||||
"name": "5.0.9 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000902,
|
||||
"name": "5.0.9 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000903,
|
||||
"name": "5.0.9 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000904,
|
||||
"name": "5.0.9",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000905,
|
||||
"name": "5.0.9",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000906,
|
||||
"name": "5.0.10 Beta 1",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"content_page_history",
|
||||
"revision_date",
|
||||
"revision_member_id",
|
||||
"view_page_revision",
|
||||
"revision_page_manual",
|
||||
"revision_manual_save",
|
||||
"revision_page_type_manual",
|
||||
"revision_page_type_auto",
|
||||
"revision_page_last_session",
|
||||
"viewing_page_revision",
|
||||
"page_version_use",
|
||||
"follow_button_notification_settings"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "createTable",
|
||||
"params": [
|
||||
{
|
||||
"name": "cms_page_revisions",
|
||||
"columns": {
|
||||
"revision_id": {
|
||||
"name": "revision_id",
|
||||
"type": "BIGINT",
|
||||
"length": "20",
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "ID Number",
|
||||
"unsigned": true,
|
||||
"auto_increment": true
|
||||
},
|
||||
"revision_date": {
|
||||
"name": "revision_date",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
},
|
||||
"revision_member_id": {
|
||||
"name": "revision_member_id",
|
||||
"type": "BIGINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
},
|
||||
"revision_page_id": {
|
||||
"name": "revision_page_id",
|
||||
"type": "BIGINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
},
|
||||
"revision_data": {
|
||||
"name": "revision_data",
|
||||
"type": "LONGTEXT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
},
|
||||
"revision_manual_save": {
|
||||
"name": "revision_manual_save",
|
||||
"type": "TINYINT",
|
||||
"length": 1,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"PRIMARY": {
|
||||
"type": "primary",
|
||||
"name": "PRIMARY",
|
||||
"columns": [
|
||||
"revision_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
},
|
||||
"revision_page_id": {
|
||||
"type": "key",
|
||||
"name": "revision_page_id",
|
||||
"columns": [
|
||||
"revision_page_id"
|
||||
],
|
||||
"length": [
|
||||
null
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [
|
||||
"front\/pages\/revision",
|
||||
"admin\/pages\/revisionDate"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000907,
|
||||
"name": "5.0.10 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000908,
|
||||
"name": "5.0.10 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000909,
|
||||
"name": "5.0.10 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000910,
|
||||
"name": "5.0.10 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000911,
|
||||
"name": "5.0.10 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000912,
|
||||
"name": "5.0.10 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000913,
|
||||
"name": "5.0.10 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000914,
|
||||
"name": "5.0.10",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000915,
|
||||
"name": "5.0.10",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000916,
|
||||
"name": "5.0.10",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000917,
|
||||
"name": "5.0.10",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000918,
|
||||
"name": "5.0.10",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000919,
|
||||
"name": "5.0.10",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5000920,
|
||||
"name": "5.0.10",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001100,
|
||||
"name": "5.0.11 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001101,
|
||||
"name": "5.0.11 Beta 1",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"err__no_page_default",
|
||||
"set_page_default",
|
||||
"set_page_default_desc",
|
||||
"group_defaults",
|
||||
"set_group_defaults",
|
||||
"default_page"
|
||||
],
|
||||
"edited": [
|
||||
"content_default_page"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"cms_pages",
|
||||
{
|
||||
"name": "page_group_defaults",
|
||||
"type": "VARCHAR",
|
||||
"length": 255,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": true,
|
||||
"default": null,
|
||||
"comment": "",
|
||||
"unsigned": false,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [
|
||||
"admin\/pages\/pageRowHtml"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001102,
|
||||
"name": "5.0.11 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"set_page_default_info"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001103,
|
||||
"name": "5.0.11",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001104,
|
||||
"name": "5.0.11",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001105,
|
||||
"name": "5.0.11",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001200,
|
||||
"name": "5.0.12 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"cms\/admin\/controllers\/templates\/ips.templates.fileEditor.js",
|
||||
"cms\/admin\/controllers\/templates\/ips.templates.main.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"global\/records\/youtube",
|
||||
"admin\/templates\/templates"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/records\/record.css"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001201,
|
||||
"name": "5.0.12 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001202,
|
||||
"name": "5.0.12 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001203,
|
||||
"name": "5.0.12",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001204,
|
||||
"name": "5.0.12",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001300,
|
||||
"name": "5.0.13 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/global\/embedRecordComment",
|
||||
"admin\/templates\/templates"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001301,
|
||||
"name": "5.0.13 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": [
|
||||
"follow_button_notification_settings"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"id": 5001302,
|
||||
"name": "5.0.13",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeeditor": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -531,14 +531,18 @@ EOF;
|
||||
$block_editor = ( isset( Request::i()->block_editor ) ) ? Request::i()->block_editor : ( $this->id ? $this->getConfig('editor') : null );
|
||||
$block_plugin = ( isset( Request::i()->block_plugin ) ) ? Request::i()->block_plugin : ( $this->id ? $this->plugin : null );
|
||||
|
||||
/* Build form */
|
||||
$form->addTab( 'content_block_form_tab__details' );
|
||||
|
||||
/* Double check that we didn't force the PHP blocks */
|
||||
if( $block_editor == 'php' and !Bridge::i()->featureIsEnabled( 'phpblocks' ) )
|
||||
{
|
||||
/* If PHP blocks are disabled, stop here */
|
||||
$form->addMessage( 'content_block_php_disabled', 'ipsMessage ipsMessage--warning' );
|
||||
|
||||
$block_editor = 'html';
|
||||
}
|
||||
|
||||
/* Build form */
|
||||
$form->addTab( 'content_block_form_tab__details' );
|
||||
|
||||
$form->add( new Translatable( 'block_name', NULL, TRUE, array(
|
||||
'app' => 'cms',
|
||||
'key' => ( $this->id ? "content_block_name_" . $this->id : NULL )
|
||||
@@ -1111,7 +1115,7 @@ EOF;
|
||||
}
|
||||
elseif( $widget['key'] == 'Codemirror' )
|
||||
{
|
||||
if( isset( $widget['configuration'] ) and $widget['configuration']['content'] )
|
||||
if( isset( $widget['configuration']['content'] ) )
|
||||
{
|
||||
preg_match_all( '/\{block="(.+?)"}/is', $widget['configuration']['content'], $matches );
|
||||
foreach( $matches[1] as $blockKey )
|
||||
|
||||
@@ -423,7 +423,18 @@ class Categories extends Model implements Permissions
|
||||
if( array_key_exists( 'page_can_view', $values ) )
|
||||
{
|
||||
$this->club_view_permission= implode( ",", $values['page_can_view'] );
|
||||
$values['club_node_public'] = intval( in_array( 'nonmember', $values['page_can_view'] ) or mb_strpos( '*', $this->club_view_permission ) !== false );
|
||||
if( !in_array( 'nonmember', $values['page_can_view'] ) and !in_array( 'member', $values['page_can_view'] ) )
|
||||
{
|
||||
$values['club_node_public'] = Club::NODE_MODERATORS;
|
||||
}
|
||||
elseif( in_array( 'nonmember', $values['page_can_view'] ) or mb_strpos( '*', $this->club_view_permission ) !== false )
|
||||
{
|
||||
$values['club_node_public'] = Club::NODE_PUBLIC;
|
||||
}
|
||||
else
|
||||
{
|
||||
$values['club_node_public'] = Club::NODE_PRIVATE;
|
||||
}
|
||||
unset( $values['page_can_view'] );
|
||||
}
|
||||
|
||||
@@ -2243,7 +2254,7 @@ class Categories extends Model implements Permissions
|
||||
*/
|
||||
public function metaDescription(): ?string
|
||||
{
|
||||
return $this->meta_description ?: static::database()->metaDescription();
|
||||
return $this->meta_description ?: parent::metaDescription();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2253,7 +2264,7 @@ class Categories extends Model implements Permissions
|
||||
*/
|
||||
public function metaTitle(): string
|
||||
{
|
||||
return $this->page_title ?: static::database()->metaTitle();
|
||||
return $this->page_title ?: parent::metaTitle();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1023,7 +1023,7 @@ class Databases extends Model implements Permissions
|
||||
/* Editor Areas */
|
||||
Member::loggedIn()->language()->words['editor__cms_Records' . $this->id ] = $this->_title;
|
||||
|
||||
foreach( array( 'pin', 'unpin', 'feature', 'unfeature', 'edit', 'hide', 'unhide', 'view_hidden', 'future_publish', 'view_future', 'move', 'lock', 'unlock', 'reply_to_locked', 'delete', 'feature_comments', 'unfeature_comments', 'add_item_message', 'edit_item_message', 'delete_item_message', 'view_reports' ) as $lang )
|
||||
foreach( array( 'pin', 'unpin', 'feature', 'unfeature', 'edit', 'hide', 'unhide', 'view_hidden', 'future_publish', 'view_future', 'move', 'lock', 'unlock', 'reply_to_locked', 'delete', 'feature_comments', 'unfeature_comments', 'add_item_message', 'edit_item_message', 'delete_item_message', 'view_reports', 'assign' ) as $lang )
|
||||
{
|
||||
Member::loggedIn()->language()->words['can_' . $lang . '_content_db_lang_sl_' . $this->id ] = Member::loggedIn()->language()->addToStack( 'can_' . $lang . '_record', FALSE, array( 'sprintf' => array( $this->recordWord(1) ) ) );
|
||||
Member::loggedIn()->language()->words['can_' . $lang . '_content_db_lang_su_' . $this->id ] = Member::loggedIn()->language()->addToStack( 'can_' . $lang . '_record', FALSE, array( 'sprintf' => array( $this->recordWord(1, TRUE) ) ) );
|
||||
|
||||
@@ -21,8 +21,10 @@ use IPS\cms\Records;
|
||||
use IPS\core\DataLayer;
|
||||
use IPS\Dispatcher as SystemDispatcher;
|
||||
use IPS\Dispatcher\Controller;
|
||||
use IPS\Dispatcher\Front;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Output;
|
||||
use IPS\Platform\Bridge;
|
||||
use IPS\Request;
|
||||
use IPS\Settings;
|
||||
use OutOfRangeException;
|
||||
@@ -52,7 +54,12 @@ class Dispatcher extends SystemDispatcher
|
||||
* @brief Controller location
|
||||
*/
|
||||
public string $controllerLocation = 'front';
|
||||
|
||||
|
||||
/**
|
||||
* Controller
|
||||
*/
|
||||
public ?string $controller = NULL;
|
||||
|
||||
/**
|
||||
* @brief Database Id
|
||||
*/
|
||||
@@ -198,7 +205,7 @@ class Dispatcher extends SystemDispatcher
|
||||
}
|
||||
}
|
||||
|
||||
list( $path, $pageNumber ) = Page::getStrippedPagePath( $path );
|
||||
[ $path, $pageNumber ] = Page::getStrippedPagePath( $path );
|
||||
|
||||
$this->databaseId = $database->id;
|
||||
|
||||
@@ -210,16 +217,16 @@ class Dispatcher extends SystemDispatcher
|
||||
/* Got a specific category ID? */
|
||||
if ( $this->categoryId !== NULL and ! $path and ( ( $database->use_categories and $database->cat_index_type !== 1 ) OR ( ! $database->use_categories and isset( Request::i()->do ) ) ) )
|
||||
{
|
||||
$this->module = 'category';
|
||||
$this->controller = 'category';
|
||||
}
|
||||
else if ( isset( Request::i()->c ) AND is_numeric( Request::i()->c ) )
|
||||
{
|
||||
$this->categoryId = Request::i()->c;
|
||||
$this->module = 'category';
|
||||
$this->controller = 'category';
|
||||
}
|
||||
else if ( empty( $path ) )
|
||||
{
|
||||
$this->module = 'index';
|
||||
$this->controller = 'index';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -322,18 +329,18 @@ class Dispatcher extends SystemDispatcher
|
||||
$this->_redirectToCorrectUrl( $record->url() );
|
||||
}
|
||||
|
||||
$this->module = 'record';
|
||||
$this->controller = 'record';
|
||||
}
|
||||
else
|
||||
{
|
||||
/* It's a category listing */
|
||||
$this->module = 'category';
|
||||
$this->controller = 'category';
|
||||
}
|
||||
}
|
||||
|
||||
$this->url = Url::internal( $url, 'front', 'content_page_path' );
|
||||
$className = '\\IPS\\cms\\modules\\front\\database\\' . $this->module;
|
||||
|
||||
$className = '\\IPS\\cms\\modules\\front\\database\\' . $this->controller;
|
||||
|
||||
/* Init class */
|
||||
if( !class_exists( $className ) )
|
||||
{
|
||||
@@ -372,7 +379,7 @@ class Dispatcher extends SystemDispatcher
|
||||
$controller->execute();
|
||||
|
||||
/* Data Layer Context */
|
||||
if ( $this->databaseId AND Settings::i()->core_datalayer_enabled )
|
||||
if ( $this->databaseId AND DataLayer::enabled() )
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -445,6 +452,25 @@ class Dispatcher extends SystemDispatcher
|
||||
*/
|
||||
public function finish() : void
|
||||
{
|
||||
Bridge::i()->frontDispatcherFinish();
|
||||
|
||||
if( $this->recordId )
|
||||
{
|
||||
Output::i()->bodyAttributes['contentClass'] = 'IPS\cms\Records' . $this->databaseId;
|
||||
}
|
||||
elseif( $this->categoryId )
|
||||
{
|
||||
Output::i()->bodyAttributes['contentClass'] = 'IPS\cms\Categories' . $this->databaseId;
|
||||
}
|
||||
else
|
||||
{
|
||||
Output::i()->bodyAttributes['contentClass'] = 'IPS\cms\Databases';
|
||||
}
|
||||
|
||||
/* Data Attributes */
|
||||
Output::i()->setBodyAttributes();
|
||||
Front::checkAlerts( $this );
|
||||
|
||||
Output::i()->output = $this->output ?: Output::i()->output;
|
||||
|
||||
/* Loader Extension */
|
||||
|
||||
@@ -1290,9 +1290,9 @@ class Fields extends CustomField implements Permissions
|
||||
/**
|
||||
* Get the "extra" field
|
||||
*
|
||||
* @return array
|
||||
* @return array|null
|
||||
*/
|
||||
public function get_extra(): mixed
|
||||
public function get_extra(): ?array
|
||||
{
|
||||
return isset( $this->_data['extra'] ) ? json_decode( $this->_data['extra'], TRUE ) : [];
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class Soundcloud extends Text
|
||||
* @param string|null $suffix HTML to show after input field
|
||||
* @param string|null $id The ID to add to the row
|
||||
*/
|
||||
public function __construct( string $name, mixed $defaultValue=NULL, bool $required=FALSE, array $options=array(), callable $customValidationCode=NULL, string $prefix=NULL, string $suffix=NULL, string $id=NULL )
|
||||
public function __construct( string $name, mixed $defaultValue=NULL, ?bool $required=FALSE, array $options=array(), callable $customValidationCode=NULL, string $prefix=NULL, string $suffix=NULL, string $id=NULL )
|
||||
{
|
||||
$this->childDefaultOptions['placeholder'] = Member::loggedIn()->language()->addToStack('field_placeholder_soundcloud');
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class Spotify extends Text
|
||||
* @param string|null $suffix HTML to show after input field
|
||||
* @param string|null $id The ID to add to the row
|
||||
*/
|
||||
public function __construct( string $name, mixed $defaultValue=null, bool $required=FALSE, array $options=array(), callable $customValidationCode=null, string $prefix=null, string $suffix=null, string $id=null )
|
||||
public function __construct( string $name, mixed $defaultValue=null, ?bool $required=FALSE, array $options=array(), callable $customValidationCode=null, string $prefix=null, string $suffix=null, string $id=null )
|
||||
{
|
||||
$this->childDefaultOptions['placeholder'] = Member::loggedIn()->language()->addToStack('field_placeholder_spotify');
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class Youtube extends Text
|
||||
* @param string|null $suffix HTML to show after input field
|
||||
* @param string|null $id The ID to add to the row
|
||||
*/
|
||||
public function __construct( string $name, mixed $defaultValue=NULL, bool $required=FALSE, array $options=array(), callable $customValidationCode=NULL, string $prefix=NULL, string $suffix=NULL, string $id=NULL )
|
||||
public function __construct( string $name, mixed $defaultValue=NULL, ?bool $required=FALSE, array $options=array(), callable $customValidationCode=NULL, string $prefix=NULL, string $suffix=NULL, string $id=NULL )
|
||||
{
|
||||
$this->childDefaultOptions['placeholder'] = Member::loggedIn()->language()->addToStack('field_placeholder_youtube');
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ class Page extends Model implements Permissions
|
||||
* @brief [ActiveRecord] Caches
|
||||
* @note Defined cache keys will be cleared automatically as needed
|
||||
*/
|
||||
protected array $caches = array( 'frontNavigation' );
|
||||
protected array $caches = array( 'frontNavigation', 'pageDefaults' );
|
||||
|
||||
/**
|
||||
* @brief [ActiveRecord] Database Table
|
||||
@@ -348,11 +348,11 @@ class Page extends Model implements Permissions
|
||||
/* @var $class Model */
|
||||
$folder = $class::load( $path, 'folder_path' );
|
||||
|
||||
static::$loadedPagesFromPath[ $path ] = static::getDefaultPage( $folder->id );
|
||||
static::$loadedPagesFromPath[ $path ] = static::getDefaultForMember( $folder->id );
|
||||
}
|
||||
else
|
||||
{
|
||||
static::$loadedPagesFromPath[ $path ] = static::getDefaultPage();
|
||||
static::$loadedPagesFromPath[ $path ] = static::getDefaultForMember();
|
||||
}
|
||||
}
|
||||
catch ( OutOfRangeException $e )
|
||||
@@ -474,6 +474,13 @@ class Page extends Model implements Permissions
|
||||
/* Still here? Consistent with AR pattern */
|
||||
throw new OutOfRangeException();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Constants for default page settings
|
||||
*/
|
||||
const PAGE_NODEFAULT = 0;
|
||||
const PAGE_DEFAULT = 1;
|
||||
const PAGE_DEFAULT_OVERRIDE = 2;
|
||||
|
||||
/**
|
||||
* Return the default page for this folder
|
||||
@@ -488,7 +495,7 @@ class Page extends Model implements Permissions
|
||||
/* Try the easiest method first */
|
||||
try
|
||||
{
|
||||
static::$defaultPage[ $folderId ] = Page::load( Db::i()->select( 'page_id', static::$databaseTable, array( 'page_default=? AND page_folder_id=?', 1, $folderId ) )->first() );
|
||||
static::$defaultPage[ $folderId ] = Page::load( Db::i()->select( 'page_id', static::$databaseTable, array( 'page_default=? AND page_folder_id=?', static::PAGE_DEFAULT, $folderId ) )->first() );
|
||||
}
|
||||
catch( Exception $ex )
|
||||
{
|
||||
@@ -510,6 +517,159 @@ class Page extends Model implements Permissions
|
||||
|
||||
return ( isset( static::$defaultPage[ $folderId ] ) ) ? static::$defaultPage[ $folderId ] : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a list of default pages for each group
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function loadDefaultsPerGroup() : array
|
||||
{
|
||||
try
|
||||
{
|
||||
return Store::i()->pageDefaults;
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
|
||||
$folderRoots = iterator_to_array(
|
||||
Db::i()->select( 'folder_id', 'cms_folders' )
|
||||
);
|
||||
array_unshift( $folderRoots, 0 );
|
||||
|
||||
$defaults = [];
|
||||
|
||||
foreach( $folderRoots as $folderId )
|
||||
{
|
||||
$defaults[ $folderId ] = [];
|
||||
foreach( Db::i()->select( 'page_id,page_group_defaults', static::$databaseTable, [ 'page_default=? and page_folder_id=?', static::PAGE_DEFAULT_OVERRIDE, $folderId ] ) as $row )
|
||||
{
|
||||
foreach( explode( ",", $row['page_group_defaults'] ) as $groupId )
|
||||
{
|
||||
$defaults[ $folderId ][ $groupId ] = $row['page_id'];
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$primaryDefault = static::getDefaultPage( $folderId );
|
||||
foreach( Group::groups() as $group )
|
||||
{
|
||||
if( !isset( $defaults[ $folderId ][ $group->g_id ] ) )
|
||||
{
|
||||
$defaults[ $folderId ][ $group->g_id ] = $primaryDefault->_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
}
|
||||
|
||||
Store::i()->pageDefaults = $defaults;
|
||||
return $defaults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the default application for this member
|
||||
*
|
||||
* @param int $folderId
|
||||
* @param Member|null $member
|
||||
* @return static
|
||||
*/
|
||||
public static function getDefaultForMember( int $folderId=0, ?Member $member=null ) : static
|
||||
{
|
||||
/* We're only going to use the primary group here */
|
||||
$member = $member ?? Member::loggedIn();
|
||||
|
||||
$pageId = static::loadDefaultsPerGroup()[ $folderId ][ $member->member_group_id ] ?? null;
|
||||
if( $pageId )
|
||||
{
|
||||
try
|
||||
{
|
||||
return static::load( $pageId );
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
}
|
||||
|
||||
return static::getDefaultPage( $folderId );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the page as a default for specific groups
|
||||
*
|
||||
* @param array $groups
|
||||
* @return void
|
||||
*/
|
||||
public function setAsDefaultForGroups( array $groups ) : void
|
||||
{
|
||||
$currentDefaults = static::loadDefaultsPerGroup();
|
||||
$newGroups = [];
|
||||
$pagesToUpdate = [];
|
||||
foreach( $groups as $group )
|
||||
{
|
||||
$groupId = ( $group instanceof Group ) ? $group->g_id : $group;
|
||||
$currentPage = $currentDefaults[ $this->folder_id ][ $groupId ] ?? null;
|
||||
if( $currentPage !== null and $currentPage != $this->id )
|
||||
{
|
||||
$pagesToUpdate[ $currentPage ] = [];
|
||||
foreach( $currentDefaults[ $this->folder_id ] as $k => $v )
|
||||
{
|
||||
if( $v == $currentPage and $k != $groupId )
|
||||
{
|
||||
$pagesToUpdate[ $currentPage ][] = $k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$newGroups[] = $groupId;
|
||||
}
|
||||
|
||||
/* Did we make this the default for all the groups? */
|
||||
if( count( $newGroups ) == count( Group::groups() ) )
|
||||
{
|
||||
$this->setAsDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( empty( $newGroups ) )
|
||||
{
|
||||
$this->default = static::PAGE_NODEFAULT;
|
||||
$this->group_defaults = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->default = static::PAGE_DEFAULT_OVERRIDE;
|
||||
$this->group_defaults = implode( ",", $newGroups );
|
||||
}
|
||||
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/* Now update any pages that need to be changed */
|
||||
foreach( $pagesToUpdate as $pageId => $_values )
|
||||
{
|
||||
try
|
||||
{
|
||||
$page = static::load( $pageId );
|
||||
|
||||
/* If it's set as default 1, we can leave that alone */
|
||||
if( $page->default == static::PAGE_DEFAULT_OVERRIDE )
|
||||
{
|
||||
$groupsToUse = array_diff( $_values, $newGroups );
|
||||
if( empty( $groupsToUse ) )
|
||||
{
|
||||
$page->default = static::PAGE_NODEFAULT;
|
||||
$page->group_defaults = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
$page->group_defaults = implode( ",", $groupsToUse );
|
||||
}
|
||||
|
||||
$page->save();
|
||||
}
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete compiled versions
|
||||
@@ -756,7 +916,7 @@ class Page extends Model implements Permissions
|
||||
|
||||
if ( $pageType == 'html' )
|
||||
{
|
||||
$return['tab_content'] = array( 'content_page_form_tab__content', NULL, NULL, 'ipsForm_vertical' );
|
||||
$return['tab_content'] = array( 'content_page_form_tab__content', NULL, NULL, 'ipsForm--vertical' );
|
||||
|
||||
$tagSource = Url::internal( "app=cms&module=pages&controller=ajax&do=loadTags" );
|
||||
if ( $item )
|
||||
@@ -809,7 +969,6 @@ class Page extends Model implements Permissions
|
||||
{
|
||||
$page = new self;
|
||||
$page->type = $pageType;
|
||||
$page->save();
|
||||
|
||||
$page->saveForm( $page->formatFormValues( $values ) );
|
||||
|
||||
@@ -1241,6 +1400,17 @@ class Page extends Model implements Permissions
|
||||
public function getAreasFromDatabase( ?string $area=null ) : array
|
||||
{
|
||||
$areas = array();
|
||||
|
||||
if( $this->_version !== null )
|
||||
{
|
||||
foreach( $this->_version->data['areas'] as $id => $tree )
|
||||
{
|
||||
$areas[ $id ] = new Area( $tree, $id );
|
||||
}
|
||||
|
||||
return $areas;
|
||||
}
|
||||
|
||||
$where = [ array( 'area_page_id=?', $this->id ) ];
|
||||
|
||||
if ( $area !== null )
|
||||
@@ -1267,10 +1437,23 @@ class Page extends Model implements Permissions
|
||||
* Save an area to the database and link it to the page
|
||||
*
|
||||
* @param Area $area
|
||||
* @param bool $backup Should we store a copy?
|
||||
* @return void
|
||||
*/
|
||||
public function saveArea( Area $area ) : void
|
||||
public function saveArea( Area $area, bool $backup=true ) : void
|
||||
{
|
||||
/* If we are viewing an old version, do nothing! These should be read-only */
|
||||
if( $this->_version !== null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create a backup before we do anything here */
|
||||
if( $backup )
|
||||
{
|
||||
Revision::store( $this );
|
||||
}
|
||||
|
||||
/* If we have no content, clear this out entirely */
|
||||
if( !$area->hasWidgets() )
|
||||
{
|
||||
@@ -1429,22 +1612,33 @@ class Page extends Model implements Permissions
|
||||
$return['edit'] = $buttons['edit'];
|
||||
}
|
||||
|
||||
if ( Member::loggedIn()->hasAcpRestriction( 'cms', 'pages', 'page_edit' ) and !$this->default )
|
||||
if ( Member::loggedIn()->hasAcpRestriction( 'cms', 'pages', 'page_edit' ) )
|
||||
{
|
||||
$return['default'] = array(
|
||||
'icon' => $this->default ? 'star' : 'regular fa-star',
|
||||
'title' => 'content_default_page',
|
||||
'link' => $url->setQueryString( array( 'id' => $this->id, 'subnode' => 1, 'do' => 'setAsDefault' ) )->csrf()
|
||||
);
|
||||
}
|
||||
$return['default'] = array(
|
||||
'icon' => ( $this->default == static::PAGE_DEFAULT ) ? 'star' : 'regular fa-star',
|
||||
'title' => 'content_default_page',
|
||||
'link' => $url->setQueryString( array( 'id' => $this->id, 'subnode' => 1, 'do' => 'setAsDefault' ) ),
|
||||
'data' => [ 'ipsDialog' => '', 'ipsDialog-title' => Member::loggedIn()->language()->addToStack( 'content_default_page' ) ]
|
||||
);
|
||||
|
||||
if ( Member::loggedIn()->hasAcpRestriction( 'cms', 'pages', 'page_edit' ) and $this->type !== 'builder' )
|
||||
{
|
||||
$return['default_error'] = array(
|
||||
'icon' => Settings::i()->cms_error_page == $this->id ? 'exclamation-circle' : 'exclamation',
|
||||
'title' => Settings::i()->cms_error_page == $this->id ? 'content_remove_error_page' : 'content_default_error_page',
|
||||
'link' => $url->setQueryString( array( 'id' => Settings::i()->cms_error_page ? 0 : $this->id, 'subnode' => 1, 'do' => 'toggleDefaultError' ) )->csrf()
|
||||
);
|
||||
if( $this->type !== 'builder' )
|
||||
{
|
||||
$return['default_error'] = array(
|
||||
'icon' => Settings::i()->cms_error_page == $this->id ? 'exclamation-circle' : 'exclamation',
|
||||
'title' => Settings::i()->cms_error_page == $this->id ? 'content_remove_error_page' : 'content_default_error_page',
|
||||
'link' => $url->setQueryString( array( 'id' => Settings::i()->cms_error_page ? 0 : $this->id, 'subnode' => 1, 'do' => 'toggleDefaultError' ) )->csrf()
|
||||
);
|
||||
}
|
||||
|
||||
/* Do we have at least one stored version? */
|
||||
if( $previous = Revision::previousVersion( $this ) )
|
||||
{
|
||||
$return['history'] = array(
|
||||
'icon' => 'history',
|
||||
'title' => 'content_page_history',
|
||||
'link' => $url->setQueryString( array( 'id' => $this->id, 'subnode' => 1, 'do' => 'history' ) )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$return['view'] = array(
|
||||
@@ -1587,6 +1781,12 @@ class Page extends Model implements Permissions
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/* If this is not a new page, store the current page in the history before we make any changes */
|
||||
if( !$isNew )
|
||||
{
|
||||
Revision::store( $this );
|
||||
}
|
||||
|
||||
if( isset( $values['page_name'] ) )
|
||||
{
|
||||
$_copied = $values['page_name'];
|
||||
@@ -1810,7 +2010,7 @@ class Page extends Model implements Permissions
|
||||
{
|
||||
if( $this->_url === NULL )
|
||||
{
|
||||
if ( Application::load('cms')->default AND $this->default AND ! $this->folder_id )
|
||||
if ( Application::load('cms')->default AND $this->default == static::PAGE_DEFAULT AND ! $this->folder_id )
|
||||
{
|
||||
/* No - that's easy */
|
||||
$this->_url = Url::internal( '', 'front' );
|
||||
@@ -1841,6 +2041,33 @@ class Page extends Model implements Permissions
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @var Revision|null
|
||||
*/
|
||||
protected ?Revision $_version = null;
|
||||
|
||||
/**
|
||||
* View as a specific version
|
||||
*
|
||||
* @param int|null $version
|
||||
* @return void
|
||||
*/
|
||||
public function setVersion( ?int $version=null ) : void
|
||||
{
|
||||
/* Clear it first */
|
||||
$this->_version = null;
|
||||
|
||||
try
|
||||
{
|
||||
$this->_version = Revision::load( $version );
|
||||
foreach( $this->_version->data['settings'] as $k => $v )
|
||||
{
|
||||
$this->_data[ $k ] = $v;
|
||||
}
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
}
|
||||
|
||||
/**
|
||||
* Map this database to a specific page
|
||||
*
|
||||
@@ -1951,6 +2178,9 @@ class Page extends Model implements Permissions
|
||||
|
||||
/* Remove any widgets for this page */
|
||||
Db::i()->delete( 'cms_page_widget_areas', array( 'area_page_id=?', $this->id ) );
|
||||
|
||||
/* Clear history */
|
||||
Db::i()->delete( 'cms_page_revisions', array( 'revision_page_id=?', $this->id ) );
|
||||
|
||||
parent::delete();
|
||||
|
||||
@@ -2020,10 +2250,22 @@ class Page extends Model implements Permissions
|
||||
*/
|
||||
public function save(): void
|
||||
{
|
||||
/* If we are viewing an older version, don't allow any changes */
|
||||
if( $this->_version !== null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $this->id )
|
||||
{
|
||||
static::deleteCompiled( $this->id );
|
||||
}
|
||||
|
||||
/* If this is not new and the folder changed, check defaults */
|
||||
if( !$this->_new and isset( $this->changed['folder_id'] ) )
|
||||
{
|
||||
$this->checkDefaultPage();
|
||||
}
|
||||
|
||||
parent::save();
|
||||
|
||||
@@ -2047,10 +2289,39 @@ class Page extends Model implements Permissions
|
||||
*/
|
||||
public function setAsDefault() : void
|
||||
{
|
||||
Db::i()->update( 'cms_pages', array( 'page_default' => 0 ), array( 'page_folder_id=?', $this->folder_id ) );
|
||||
Db::i()->update( 'cms_pages', array( 'page_default' => 1 ), array( 'page_id=?', $this->id ) );
|
||||
Db::i()->update( 'cms_pages', array( 'page_default' => static::PAGE_NODEFAULT, 'page_group_defaults' => null ), array( 'page_folder_id=? and page_default=?', $this->folder_id, static::PAGE_DEFAULT ) );
|
||||
Db::i()->update( 'cms_pages', array( 'page_default' => static::PAGE_DEFAULT, 'page_group_defaults' => null ), array( 'page_id=?', $this->id ) );
|
||||
|
||||
static::buildPageUrlStore();
|
||||
|
||||
unset( Store::i()->pageDefaults );
|
||||
}
|
||||
|
||||
/**
|
||||
* Make sure that we only have one default page per folder.
|
||||
* This is called only when the folder is changed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function checkDefaultPage() : void
|
||||
{
|
||||
if( $this->default == static::PAGE_DEFAULT )
|
||||
{
|
||||
try
|
||||
{
|
||||
$currentDefault = Db::i()->select( 'page_id', 'cms_pages', [ 'page_default=? and page_folder_id=? and page_id <> ?', static::PAGE_DEFAULT, $this->folder_id, (int) $this->_id ] )->first();
|
||||
|
||||
/* If we found a different default page, remove the default from this one */
|
||||
$this->default = static::PAGE_NODEFAULT;
|
||||
}
|
||||
catch( UnderflowException ){}
|
||||
}
|
||||
elseif( $this->default == static::PAGE_DEFAULT_OVERRIDE )
|
||||
{
|
||||
/* Group overrides are always removed when we move a page to another folder */
|
||||
$this->default = static::PAGE_NODEFAULT;
|
||||
$this->group_defaults = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2121,7 +2392,7 @@ class Page extends Model implements Permissions
|
||||
/* Make sure we initialize the main area */
|
||||
Output::i()->sidebar['widgets']['col1'] = [];
|
||||
|
||||
Output::i()->output = Theme::i()->getTemplate( 'pages' )->globalWrap( $nav, $this->getPageContent(), $this );
|
||||
Output::i()->output = Theme::i()->getTemplate( 'pages', 'cms' )->globalWrap( $nav, $this->getPageContent(), $this );
|
||||
|
||||
if ( isset( Settings::i()->cms_error_page ) and Settings::i()->cms_error_page and Settings::i()->cms_error_page == $this->id )
|
||||
{
|
||||
@@ -2138,7 +2409,7 @@ class Page extends Model implements Permissions
|
||||
}
|
||||
catch ( OutOfRangeException | OutOfBoundsException )
|
||||
{
|
||||
if ( !( Application::load( 'cms' )->default and !$this->folder_id and $this->default ) )
|
||||
if ( !( Application::load( 'cms' )->default and !$this->folder_id and $this->default == static::PAGE_DEFAULT ) )
|
||||
{
|
||||
Output::i()->breadcrumb['module'] = array( $this->url(), $this->_title );
|
||||
}
|
||||
@@ -2156,10 +2427,6 @@ class Page extends Model implements Permissions
|
||||
/* Send straight to the output engine */
|
||||
Output::i()->sendOutput( Theme::i()->getTemplate( 'global', 'core' )->globalTemplate( Output::i()->title, Output::i()->output, array( 'app' => Dispatcher::i()->application->directory, 'module' => Dispatcher::i()->module->key, 'controller' => Dispatcher::i()->controller ) ), ( $httpStatusCode ?: 200 ), 'text/html', ( $httpHeaders ?: array() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Output::i()->allowDefaultWidgets = FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2200,9 +2467,15 @@ class Page extends Model implements Permissions
|
||||
*/
|
||||
protected function getPageContent() : string
|
||||
{
|
||||
$content = '';
|
||||
if( $this->_version !== null )
|
||||
{
|
||||
Output::i()->customHeader .= Theme::i()->getTemplate( 'pages', 'cms' )->revision( $this->_version );
|
||||
}
|
||||
|
||||
if( $this->type == 'html' )
|
||||
{
|
||||
return $this->getHtmlContent();
|
||||
return $content . $this->getHtmlContent();
|
||||
}
|
||||
|
||||
$widgets = [];
|
||||
@@ -2216,6 +2489,15 @@ class Page extends Model implements Permissions
|
||||
}
|
||||
|
||||
$tree = $item['area_tree'] ? json_decode( $item['area_tree'], true ) : [];
|
||||
if( $this->_version !== null )
|
||||
{
|
||||
if ( isset( $this->_version->data['areas'][ $item['area_area'] ] ) )
|
||||
{
|
||||
/* We have a previous version we want to show */
|
||||
$tree = $this->_version->data['areas'][ $item['area_area'] ];
|
||||
}
|
||||
}
|
||||
|
||||
if ( empty( $tree ) )
|
||||
{
|
||||
/* If the tree is empty, generate one from the database rows */
|
||||
@@ -2242,7 +2524,7 @@ class Page extends Model implements Permissions
|
||||
$widgets['col1'] = new Area( [], 'col1' );
|
||||
}
|
||||
|
||||
return Theme::i()->getTemplate( 'pages', 'cms' )->mainArea( $this, $widgets );
|
||||
return $content . Theme::i()->getTemplate( 'pages', 'cms' )->mainArea( $this, $widgets );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,211 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @brief Revision
|
||||
* @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
|
||||
* @since 6/25/2025
|
||||
*/
|
||||
|
||||
namespace IPS\cms\Pages;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use IPS\Db;
|
||||
use IPS\Lang;
|
||||
use IPS\Member;
|
||||
use IPS\Patterns\ActiveRecord;
|
||||
use IPS\Widget\Area;
|
||||
use UnderflowException;
|
||||
use function count;
|
||||
use function is_array;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
class Revision extends ActiveRecord
|
||||
{
|
||||
/**
|
||||
* @brief Database Table
|
||||
*/
|
||||
public static ?string $databaseTable = 'cms_page_revisions';
|
||||
|
||||
/**
|
||||
* @brief Database Prefix
|
||||
*/
|
||||
public static string $databasePrefix = 'revision_';
|
||||
|
||||
/**
|
||||
* @brief Multiton Store
|
||||
*/
|
||||
protected static array $multitons;
|
||||
|
||||
/**
|
||||
* @return Page
|
||||
*/
|
||||
public function get_page() : Page
|
||||
{
|
||||
return Page::load( $this->page_id );
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function get_data() : array
|
||||
{
|
||||
return isset( $this->_data['data'] ) ? json_decode( $this->_data['data'], true ) : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $val
|
||||
* @return void
|
||||
*/
|
||||
public function set_data( mixed $val ) : void
|
||||
{
|
||||
$this->_data['data'] = ( is_array( $val ) and count( $val ) ) ? json_encode( $val ) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Member
|
||||
*/
|
||||
public function author() : Member
|
||||
{
|
||||
return Member::load( $this->member_id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a version of the page history
|
||||
*
|
||||
* @param Page $page
|
||||
* @param bool $manualSave Whether this is being called manually (e.g. from finish editing)
|
||||
* @return void
|
||||
*/
|
||||
public static function store( Page $page, bool $manualSave=false ) : void
|
||||
{
|
||||
$data = [
|
||||
'settings' => [
|
||||
'name' => Member::loggedIn()->language()->get( Page::$titleLangPrefix . $page->id ),
|
||||
'js_css_ids' => $page->js_css_ids,
|
||||
'wrapper_template' => $page->wrapper_template,
|
||||
'theme' => $page->theme,
|
||||
'template' => $page->template,
|
||||
'ipb_wrapper' => $page->ipb_wrapper,
|
||||
'default' => $page->default
|
||||
],
|
||||
'areas' => []
|
||||
];
|
||||
|
||||
if( $page->type == 'html' )
|
||||
{
|
||||
$data['settings']['content'] = $page->content;
|
||||
}
|
||||
|
||||
/* Now handle all the areas */
|
||||
foreach( $page->getAreasFromDatabase() as $area )
|
||||
{
|
||||
$data['areas'][ $area->id ] = $area->toArray();
|
||||
}
|
||||
|
||||
/* Get the latest revision; if nothing has changed, don't store it */
|
||||
if( $previous = static::previousVersion( $page ) )
|
||||
{
|
||||
if( ! $manualSave and ( $previous->data === $data ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$obj = new static;
|
||||
$obj->page_id = $page->id;
|
||||
$obj->data = $data;
|
||||
$obj->manual_save = (int) $manualSave;
|
||||
$obj->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Make this the latest version.
|
||||
* If no version is specified, just use the latest
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function revert() : void
|
||||
{
|
||||
/* @var Page $page */
|
||||
$page = $this->page;
|
||||
|
||||
/* First, store the current page as is */
|
||||
static::store( $page );
|
||||
|
||||
/* Now loop through the page configuration and set all properties */
|
||||
foreach( $this->data['settings'] as $k => $v )
|
||||
{
|
||||
$page->$k = $v;
|
||||
if( $k == 'name' )
|
||||
{
|
||||
Lang::saveCustom( 'cms', Page::$titleLangPrefix . $page->id, $v );
|
||||
}
|
||||
}
|
||||
$page->save();
|
||||
|
||||
/* Load the current areas, in case we need to remove one */
|
||||
$currentAreas = $page->getAreasFromDatabase();
|
||||
|
||||
/* Now the areas */
|
||||
$newAreas = [];
|
||||
foreach( $this->data['areas'] as $id => $tree )
|
||||
{
|
||||
$newAreas[] = $id;
|
||||
$area = new Area( $tree, $id );
|
||||
$page->saveArea( $area, false );
|
||||
}
|
||||
|
||||
/* Remove any areas that we no longer need */
|
||||
foreach( $currentAreas as $area )
|
||||
{
|
||||
if( !in_array( $area->id, $newAreas ) )
|
||||
{
|
||||
Db::i()->delete( 'cms_page_widget_areas', [ 'area_area=? and area_page_id=?', $area->id, $page->id ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the previously saved version
|
||||
*
|
||||
* @param Page $page
|
||||
* @return static|null
|
||||
*/
|
||||
public static function previousVersion( Page $page ) : static|null
|
||||
{
|
||||
try
|
||||
{
|
||||
$row = Db::i()->select( '*', static::$databaseTable, [ 'revision_page_id=?', $page->id ], 'revision_date desc', [ 0, 1 ] )->first();
|
||||
return static::constructFromData( $row );
|
||||
}
|
||||
catch( UnderflowException ){}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Changed Columns
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function save() : void
|
||||
{
|
||||
if( $this->_new )
|
||||
{
|
||||
$this->member_id = Member::loggedIn()->member_id;
|
||||
$this->date = time();
|
||||
}
|
||||
|
||||
parent::save();
|
||||
}
|
||||
}
|
||||
Loaded 100 of 1407 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user