summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-03-27 16:11:01 +0000
committerlsces <lester@lsces.co.uk>2026-03-27 16:11:01 +0000
commitcb8a70fed8e6667a3b6f61e090786b6cd2f67216 (patch)
tree0b07a945fc28350b70981be89ae7df924ca04482 /templates
parentc8bec0f289beac93a88fe41408d1958d9232244d (diff)
downloadliberty-cb8a70fed8e6667a3b6f61e090786b6cd2f67216.tar.gz
liberty-cb8a70fed8e6667a3b6f61e090786b6cd2f67216.tar.bz2
liberty-cb8a70fed8e6667a3b6f61e090786b6cd2f67216.zip
Figured what has been causing a problem with using && and || in smarty templates and related to mistake in processing {2} elements that should use curly brackets and not revert to square ones.
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/admin_plugins.tpl4
-rwxr-xr-xtemplates/comments.tpl6
-rw-r--r--templates/comments_display_option_bar.tpl2
-rwxr-xr-xtemplates/comments_post_inc.tpl10
-rwxr-xr-xtemplates/content_permissions.tpl2
-rw-r--r--templates/content_permissions_inc.tpl2
-rwxr-xr-xtemplates/content_role_permissions.tpl2
-rw-r--r--templates/content_role_permissions_inc.tpl2
-rwxr-xr-xtemplates/display_comment.tpl2
-rwxr-xr-xtemplates/display_content.tpl2
-rwxr-xr-xtemplates/display_structure.tpl4
-rwxr-xr-xtemplates/edit_content_owner_inc.tpl2
-rwxr-xr-xtemplates/edit_content_status_inc.tpl2
-rwxr-xr-xtemplates/edit_format.tpl20
-rw-r--r--templates/edit_primary_attachment_inc.tpl4
-rwxr-xr-xtemplates/edit_services_inc.tpl2
-rwxr-xr-xtemplates/edit_storage.tpl6
-rwxr-xr-xtemplates/edit_storage_list.tpl4
-rw-r--r--templates/libertypagination.tpl2
-rwxr-xr-xtemplates/list_content.tpl2
-rwxr-xr-xtemplates/list_content_inc.tpl2
-rwxr-xr-xtemplates/mime/audio/attachment.tpl2
-rwxr-xr-xtemplates/mime/audio/player.tpl2
-rwxr-xr-xtemplates/mime/default/attachment.tpl6
-rw-r--r--templates/mime/default/inline.tpl2
-rw-r--r--templates/mime/default/storage.tpl2
-rwxr-xr-xtemplates/mime/image/admin.tpl4
-rwxr-xr-xtemplates/mime/image/attachment.tpl2
-rwxr-xr-xtemplates/mime/video/attachment.tpl2
-rwxr-xr-xtemplates/mime_meta_inc.tpl2
-rwxr-xr-xtemplates/mime_view.tpl2
-rwxr-xr-xtemplates/plugins/data_quote.tpl2
-rwxr-xr-xtemplates/service_content_body_inc.tpl2
-rwxr-xr-xtemplates/service_content_edit_tab_inc.tpl2
-rwxr-xr-xtemplates/service_content_icon_inc.tpl4
-rw-r--r--templates/services_inc.tpl4
-rw-r--r--templates/storage_thumbs.tpl2
-rw-r--r--templates/structure_display.tpl4
38 files changed, 65 insertions, 65 deletions
diff --git a/templates/admin_plugins.tpl b/templates/admin_plugins.tpl
index 069e9f3..45a0091 100755
--- a/templates/admin_plugins.tpl
+++ b/templates/admin_plugins.tpl
@@ -36,7 +36,7 @@
<div class="checkbox" for="{$guid}"><label><strong>
{if $plugin.is_active == 'x'}
[Missing]
- {elseif $plugin.plugin_type == 'mime' and $guid == $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER}
+ {elseif $plugin.plugin_type == 'mime' && $guid == $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER}
<input type="checkbox" checked value="y" disabled>
<input type="hidden" name="PLUGINS[{$guid}][]" checked id="{$guid}" value="y">
{else}
@@ -51,7 +51,7 @@
{if $plugin.is_active == 'y'}<label><input type="radio" value="{$guid}" name="default_format" {if $gBitSystem->getConfig('default_format')==$guid}checked{/if}> <em class="small">{tr}Default{/tr}</em></label>{/if}
</div>
{/if}
- {if $plugin.plugin_type == 'mime' and $guid == $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER}<strong>{tr}DEFAULT{/tr}</strong>{/if} {$plugin.description}
+ {if $plugin.plugin_type == 'mime' && $guid == $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER}<strong>{tr}DEFAULT{/tr}</strong>{/if} {$plugin.description}
{if !empty($plugin.requirements.output)}
{formfeedback hash=$plugin.requirements.output}
{/if}
diff --git a/templates/comments.tpl b/templates/comments.tpl
index de5a166..963e037 100755
--- a/templates/comments.tpl
+++ b/templates/comments.tpl
@@ -1,4 +1,4 @@
-{if $gBitUser->hasPermission('p_liberty_post_comments') or $gBitUser->hasPermission('p_liberty_read_comments')}
+{if $gBitUser->hasPermission('p_liberty_post_comments') || $gBitUser->hasPermission('p_liberty_read_comments')}
{strip}
<div class="display comment">
{if $comments}
@@ -7,14 +7,14 @@
</div>
{/if}
- <div class="body"{if !( $post_comment_request or $post_comment_preview )} id="editcomments"{/if}>
+ <div class="body"{if !( $post_comment_request || $post_comment_preview )} id="editcomments"{/if}>
<div id="edit_comments" {if $gBitSystem->isFeatureActive('comments_ajax')}style="display:none"{/if}>
{include file="bitpackage:liberty/comments_post_inc.tpl" post_title="Post Comment"}
</div>
{include file="bitpackage:liberty/comments_display_option_bar.tpl"}
- {if $gBitSystem->isFeatureActive('comments_ajax') and $gBitUser->hasPermission( 'p_liberty_post_comments' )}
+ {if $gBitSystem->isFeatureActive('comments_ajax') && $gBitUser->hasPermission( 'p_liberty_post_comments' )}
<div class="form-group">
<input type="submit" class="btn btn-default" name="post_comment_request" value="{tr}Add Comment{/tr}" onclick="LibertyComment.attachForm('comment_{$gContent->mContentId}', '{$gContent->mContentId}', {if $gContent->mContentId}{$gContent->mContentId}{elseif $commentsParentId}{$commentsParentId}{else}null{/if})"/>
</div>
diff --git a/templates/comments_display_option_bar.tpl b/templates/comments_display_option_bar.tpl
index 3c37c23..6f19551 100644
--- a/templates/comments_display_option_bar.tpl
+++ b/templates/comments_display_option_bar.tpl
@@ -1,4 +1,4 @@
- {if $comments and $gBitSystem->isFeatureActive('comments_display_option_bar')}
+ {if $comments && $gBitSystem->isFeatureActive('comments_display_option_bar')}
{form action="`$comments_return_url`#editcomments"}
<input type="hidden" name="post_comment_reply_id" value="{$post_comment_reply_id}" />
<input type="hidden" name="post_comment_id" value="{$post_comment_id}" />
diff --git a/templates/comments_post_inc.tpl b/templates/comments_post_inc.tpl
index 171e898..7caf4fb 100755
--- a/templates/comments_post_inc.tpl
+++ b/templates/comments_post_inc.tpl
@@ -1,7 +1,7 @@
-{if !$hide or $post_comment_request or $smarty.request.post_comment_preview}
+{if !$hide || $post_comment_request || $smarty.request.post_comment_preview}
<a name="editcomments"></a>
- {if $post_comment_preview and !$preview_override}
+ {if $post_comment_preview && !$preview_override}
<h2>{tr}{$post_title} Preview{/tr}</h2>
<div class="preview">
{include file='bitpackage:liberty/display_comment.tpl' comment=$postComment}
@@ -12,7 +12,7 @@
{formfeedback hash=$formfeedback}
- {if $post_comment_request or $smarty.request.post_comment_preview|default:false or $gBitSystem->isFeatureActive('comments_ajax')}
+ {if $post_comment_request || $smarty.request.post_comment_preview|default:false || $gBitSystem->isFeatureActive('comments_ajax')}
{legend legend=$post_title}
<input type="hidden" name="post_comment_reply_id" value="{$post_comment_reply_id}" />
<input type="hidden" name="post_comment_id" value="{$post_comment_id}" />
@@ -20,7 +20,7 @@
{* This is a little extra value for the funky case when bw learns browser has js at the same time a preview is asked for
This will keep comment in non-js mode until previewing is done. Things get messy without this *}
- {if !$gBitThemes->isJavascriptEnabled() or $no_js_preview == "y"}
+ {if !$gBitThemes->isJavascriptEnabled() || $no_js_preview == "y"}
<input type="hidden" name="no_js_preview" value="y" />
{/if}
@@ -65,7 +65,7 @@
{textarea id="commentpost" name="comment_data" rows=$gBitSystem->getConfig('comments_default_post_lines',6) edit=$postComment.data|default:''}
{* @TODO perm check more accurately should be on root content object *}
- {if $gBitSystem->isFeatureActive( 'comments_allow_attachments' ) and $gBitUser->hasPermission('p_liberty_attach_attachments') }
+ {if $gBitSystem->isFeatureActive( 'comments_allow_attachments' ) && $gBitUser->hasPermission('p_liberty_attach_attachments') }
{* @TODO make edit_storage_list.tpl work with comments attachments - it is nested in edit_storage.tpl - for now bypass it, remove mime code when edit_storage.tpl can be used directly*}
{* include file="bitpackage:liberty/edit_storage.tpl" *}
{if $gLibertySystem->isPluginActive( $smarty.const.LIBERTY_DEFAULT_MIME_HANDLER )}
diff --git a/templates/content_permissions.tpl b/templates/content_permissions.tpl
index 3c3d1ec..4120bac 100755
--- a/templates/content_permissions.tpl
+++ b/templates/content_permissions.tpl
@@ -10,7 +10,7 @@
{formfeedback warning="No Individual permissions set. Global Permissions apply."}
{/if}
- {if $contentPerms.assigned or $gBitThemes->isJavascriptEnabled()}
+ {if $contentPerms.assigned || $gBitThemes->isJavascriptEnabled()}
{smartlink ititle="Clear all custom content permissions" action=expunge content_id=$gContent->mContentId}
{/if}
diff --git a/templates/content_permissions_inc.tpl b/templates/content_permissions_inc.tpl
index b29cfb5..fccff6f 100644
--- a/templates/content_permissions_inc.tpl
+++ b/templates/content_permissions_inc.tpl
@@ -20,7 +20,7 @@
{assign var=icon value="icons/media-playback-stop"}
{assign var=action value="assign"}
{foreach from=$contentPerms.assigned item=ass}
- {if $ass.group_id == $group.group_id and $ass.perm_name == $perm.perm_name}
+ {if $ass.group_id == $group.group_id && $ass.perm_name == $perm.perm_name}
{assign var=icon value="icons/dialog-ok"}
{assign var=action value="remove"}
{/if}
diff --git a/templates/content_role_permissions.tpl b/templates/content_role_permissions.tpl
index 1d82b4c..0f215cd 100755
--- a/templates/content_role_permissions.tpl
+++ b/templates/content_role_permissions.tpl
@@ -10,7 +10,7 @@
{formfeedback warning="No Individual permissions set. Global Permissions apply."}
{/if}
- {if $contentPerms.assigned or $gBitThemes->isJavascriptEnabled()}
+ {if $contentPerms.assigned || $gBitThemes->isJavascriptEnabled()}
{smartlink ititle="Clear all custom content permissions" action=expunge content_id=$gContent->mContentId}
{/if}
diff --git a/templates/content_role_permissions_inc.tpl b/templates/content_role_permissions_inc.tpl
index 2c90d16..27724b6 100644
--- a/templates/content_role_permissions_inc.tpl
+++ b/templates/content_role_permissions_inc.tpl
@@ -20,7 +20,7 @@
{assign var=icon value="icons/media-playback-stop"}
{assign var=action value="assign"}
{foreach from=$contentPerms.assigned item=ass}
- {if $ass.role_id == $role.role_id and $ass.perm_name == $perm.perm_name}
+ {if $ass.role_id == $role.role_id && $ass.perm_name == $perm.perm_name}
{assign var=icon value="icons/dialog-ok"}
{assign var=action value="remove"}
{/if}
diff --git a/templates/display_comment.tpl b/templates/display_comment.tpl
index 4126050..ae63af7 100755
--- a/templates/display_comment.tpl
+++ b/templates/display_comment.tpl
@@ -1,5 +1,5 @@
{strip}
-{if $comments_style eq 'threaded' and $comment.level}
+{if $comments_style eq 'threaded' && $comment.level}
<div class="threaded">
{else}
<div class="">
diff --git a/templates/display_content.tpl b/templates/display_content.tpl
index bd63b4f..690b955 100755
--- a/templates/display_content.tpl
+++ b/templates/display_content.tpl
@@ -11,7 +11,7 @@
<div class="header">
<h1>{$gContent->mInfo.title|default:"No Title"}</h1>
{* creator_user not yet forced by liberty so check. *}
- {if !$preview and !empty($gContent->mInfo.creator_user)}
+ {if !$preview && !empty($gContent->mInfo.creator_user)}
<div class="date">
{tr}Created by {displayname user=$gContent->mInfo.creator_user user_id=$gContent->mInfo.creator_user_id real_name=$gContent->mInfo.creator_real_name}, Last modification by {displayname user=$gContent->mInfo.modifier_user user_id=$gContent->mInfo.modifier_user_id real_name=$gContent->mInfo.modifier_real_name} on {$gContent->mInfo.last_modified|bit_long_datetime}{/tr}
</div>
diff --git a/templates/display_structure.tpl b/templates/display_structure.tpl
index f7e6f8e..42527f4 100755
--- a/templates/display_structure.tpl
+++ b/templates/display_structure.tpl
@@ -19,7 +19,7 @@
{if $gBitSystem->isFeatureActive( 'wiki_book_show_navigation' )}
<div class="navigation">
<span class="left">
- {if $structureInfo.prev and $structureInfo.prev.structure_id}
+ {if $structureInfo.prev && $structureInfo.prev.structure_id}
<a href="index.php?structure_id={$structureInfo.prev.structure_id}">
{if $wikibook_use_icons eq 'y'}
{booticon iname="icon-arrow-left" ipackage="icons" iexplain=Previous}
@@ -31,7 +31,7 @@
</span>
<span class="right">
- {if $structureInfo.next and $structureInfo.next.structure_id}
+ {if $structureInfo.next && $structureInfo.next.structure_id}
<a href="index.php?structure_id={$structureInfo.next.structure_id}">
{if $wikibook_use_icons eq 'y'}
{biticon ipackage="icons" iname="go-next" iexplain=Next}
diff --git a/templates/edit_content_owner_inc.tpl b/templates/edit_content_owner_inc.tpl
index 6addf58..39aeaa5 100755
--- a/templates/edit_content_owner_inc.tpl
+++ b/templates/edit_content_owner_inc.tpl
@@ -1,4 +1,4 @@
-{if $gBitSystem->isFeatureActive('liberty_allow_change_owner') and $gBitUser->hasPermission('p_liberty_edit_content_owner')}
+{if $gBitSystem->isFeatureActive('liberty_allow_change_owner') && $gBitUser->hasPermission('p_liberty_edit_content_owner')}
<div class="form-group">
{formlabel label="Owner"}
{forminput}
diff --git a/templates/edit_content_status_inc.tpl b/templates/edit_content_status_inc.tpl
index ac72340..5d9651c 100755
--- a/templates/edit_content_status_inc.tpl
+++ b/templates/edit_content_status_inc.tpl
@@ -1,7 +1,7 @@
{if $gBitSystem->isFeatureActive( 'liberty_display_status' ) and
$gBitSystem->isFeatureActive( 'liberty_display_status_menu' ) and
$gContent->getAvailableContentStatuses() &&
- ($gBitUser->hasPermission('p_liberty_edit_content_status') or $gBitUser->hasPermission('p_liberty_edit_all_status'))
+ ($gBitUser->hasPermission('p_liberty_edit_content_status') || $gBitUser->hasPermission('p_liberty_edit_all_status'))
}
<div class="form-group">
{formlabel label="Status" for="content_status_id"}
diff --git a/templates/edit_format.tpl b/templates/edit_format.tpl
index 6ea2201..33e6bd3 100755
--- a/templates/edit_format.tpl
+++ b/templates/edit_format.tpl
@@ -1,6 +1,6 @@
{strip}
{* comment or content @TODO pass in as a var in includes *}
-{if ( $post_comment_request or $post_comment_preview or $gBitSystem->isFeatureActive('comments_ajax') ) and $gComment}
+{if ( $post_comment_request || $post_comment_preview || $gBitSystem->isFeatureActive('comments_ajax') ) && $gComment}
{assign var=contentObject value=$gComment}
{else}
{assign var=contentObject value=$gContent}
@@ -16,7 +16,7 @@
{/if}
<select name="i18n[lang_code]" id="lang_code">
{foreach from=$translationsList key=codeKey item=lang}
- <option value="{$codeKey}" {if $smarty.request.i18n.lang_code==$codeKey or $langCode==$codeKey or ($codeKey==$gBitSystem->getConfig('bitlanguage') and !$smarty.request.i18n.lang_code and !$langCode)}selected="selected" {/if}>{$lang.native_name}</option>
+ <option value="{$codeKey}" {if $smarty.request.i18n.lang_code==$codeKey || $langCode==$codeKey || ($codeKey==$gBitSystem->getConfig('bitlanguage') && !$smarty.request.i18n.lang_code && !$langCode)}selected="selected" {/if}>{$lang.native_name}</option>
{/foreach}
</select>
{formhelp note="The language of this page"}
@@ -27,7 +27,7 @@
{* We have to count these first because of the tikiwiki format options which may show even if it is the only format option. *}
{assign var=numformat value=0}
{foreach name=formatPlugins from=$gLibertySystem->mPlugins item=plugin key=guid}
- {if $plugin.is_active eq 'y' and $plugin.edit_field|default:false and $plugin.plugin_type eq 'format'}
+ {if $plugin.is_active eq 'y' && $plugin.edit_field|default:false && $plugin.plugin_type eq 'format'}
{assign var=numformat value=$numformat+1}
{if $plugin.plugin_guid == "tikiwiki"}
{assign var=format_options value=true}
@@ -36,24 +36,24 @@
{assign var=singleplugin value=$plugin}
{/if}
{/foreach}
-{if $numformat > 1 or $format_options}
+{if $numformat > 1 || $format_options}
<div class="form-group">
{formfeedback error=$errors.format}
{formlabel label="Content Format"}
{foreach name=formatPlugins from=$gLibertySystem->mPlugins item=plugin key=guid}
- {if $plugin.is_active eq 'y' and $plugin.edit_field|default:false and $plugin.plugin_type eq 'format'}
+ {if $plugin.is_active eq 'y' && $plugin.edit_field|default:false && $plugin.plugin_type eq 'format'}
{forminput label="radio"}
{if $numformat > 1}
<input type="radio" name="{$format_guid_variable|default:"format_guid"}" value="{$plugin.edit_field|default:false}"
{if $formatGuid eq $plugin.plugin_guid} checked="checked"
- {elseif !$formatGuid and $plugin.plugin_guid eq $gBitSystem->getConfig('default_format', 'tikiwiki')} checked="checked" {assign var=formatGuid value='tikiwiki'}
+ {elseif !$formatGuid && $plugin.plugin_guid eq $gBitSystem->getConfig('default_format', 'tikiwiki')} checked="checked" {assign var=formatGuid value='tikiwiki'}
{/if} onclick="
{if $gBitSystem->isPackageActive('ckeditor')}
if($(this).val() == 'bithtml') { createCkEditor('{$textarea_id}'); } else { destroyCkEditor('{$textarea_id}'); }
{/if}
{if $gBitSystem->isPackageActive('quicktags')}
{foreach from=$gLibertySystem->mPlugins item=tag key=guid}
- {if $tag.is_active eq 'y' and $tag.edit_field|default:false and $tag.plugin_type eq 'format'}
+ {if $tag.is_active eq 'y' && $tag.edit_field|default:false && $tag.plugin_type eq 'format'}
{if $tag.plugin_guid eq $plugin.plugin_guid}
BitBase.showById
{else}
@@ -70,9 +70,9 @@
{/if}
{if $plugin.plugin_guid == "tikiwiki"}
{if !$gBitSystem->isFeatureActive('content_force_allow_html')}
- {if $gBitUser->hasPermission( 'p_liberty_enter_html' ) or $gBitSystem->isFeatureActive('content_allow_html')}
+ {if $gBitUser->hasPermission( 'p_liberty_enter_html' ) || $gBitSystem->isFeatureActive('content_allow_html')}
<label class="inline-block checkbox"><input type="checkbox" name="preferences[content_enter_html]" value="y" id="{$textarea_id}-html" {if $contentObject->mPrefs.content_enter_html}{if $gBitSystem->isPackageActive('ckeditor')}contenteditable="true"{/if} checked="checked" {/if} {*if $gBitSystem->isPackageActive('ckeditor')}onclick="if($(this).is(':checked')) createCkEditor('{$textarea_id}'); else destroyCkEditor('{$textarea_id}');{/if*}"/> {tr}Allow HTML{/tr}</label>
- {elseif is_object($contentObject) and $contentObject->getPreference( 'content_enter_html' )}
+ {elseif is_object($contentObject) && $contentObject->getPreference( 'content_enter_html' )}
[ {tr}HTML will remain as HTML{/tr} ]
{else}
[ {tr}HTML will be escaped{/tr} ]
@@ -104,7 +104,7 @@
<input type="hidden" name="{$format_guid_variable|default:"format_guid"}" value="{if $numformat eq 1}{$singleplugin.edit_field|default:false}{else}{$gBitSystem->getConfig('default_format','tikiwiki')}{/if}" />
{/if}
-{if $gBitSystem->isPackageActive('ckeditor') and ($formatGuid=='bithtml')}{* or (is_object($contentObject) and $formatGuid=='tikiwiki' and $contentObject->getPreference('content_enter_html')))} *}
+{if $gBitSystem->isPackageActive('ckeditor') && ($formatGuid=='bithtml')}{* || (is_object($contentObject) && $formatGuid=='tikiwiki' && $contentObject->getPreference('content_enter_html')))} *}
<script>
$(document).ready( function() {
createCkEditor('{$textarea_id}');
diff --git a/templates/edit_primary_attachment_inc.tpl b/templates/edit_primary_attachment_inc.tpl
index 3e7e577..20b6b1d 100644
--- a/templates/edit_primary_attachment_inc.tpl
+++ b/templates/edit_primary_attachment_inc.tpl
@@ -21,9 +21,9 @@
{/if}
{* $no_plugins is set by the including template *}
-{if $gBitUser->hasPermission('p_liberty_attach_attachments') and !$no_plugins}
+{if $gBitUser->hasPermission('p_liberty_attach_attachments') && !$no_plugins}
{foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
- {if $plugin.is_active eq 'y' and $plugin.primary_edit_field and $plugin.plugin_type eq 'storage'}
+ {if $plugin.is_active eq 'y' && $plugin.primary_edit_field && $plugin.plugin_type eq 'storage'}
<div class="form-group">
{assign var=label value="Upload $label"}
{formlabel label=$label|default:"Upload new Attachment" for=""}
diff --git a/templates/edit_services_inc.tpl b/templates/edit_services_inc.tpl
index b2f9778..ac787c1 100755
--- a/templates/edit_services_inc.tpl
+++ b/templates/edit_services_inc.tpl
@@ -1,6 +1,6 @@
{if !empty($translateFrom)}
{foreach from=$gLibertySystem->mServices item=service key=service_guid}
- {if !empty($service.services.$serviceFile) and (empty($gContent) or $gContent->hasService( $service_guid ))}
+ {if !empty($service.services.$serviceFile) && (empty($gContent) || $gContent->hasService( $service_guid ))}
{if strpos($serviceFile,'mini')}<div class="service">{/if}
{include file=$service.services.$serviceFile edit_content_status_tpl=$edit_content_status_tpl}
{if strpos($serviceFile,'mini')}</div>{/if}
diff --git a/templates/edit_storage.tpl b/templates/edit_storage.tpl
index fca825c..1284b1a 100755
--- a/templates/edit_storage.tpl
+++ b/templates/edit_storage.tpl
@@ -18,12 +18,12 @@
{* this condition is a temporary hack to disable ajax uploads on new content to avoid bogus entires in liberty_attachments.
* we all want to see this working asap and are thinking of the best way to fix this - xing - Wednesday Nov 14, 2007 18:38:18 CET *}
- {if $gBitSystem->getConfig('liberty_attachment_style') != 'ajax' or $gContent->isValid()}
+ {if $gBitSystem->getConfig('liberty_attachment_style') != 'ajax' || $gContent->isValid()}
{if $gBitUser->hasPermission('p_liberty_attach_attachments') }
{foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
{* $no_plugins is set by the including template *}
- {if $plugin.is_active eq 'y' and $plugin.edit_field and $plugin.plugin_type eq 'storage' and !$no_plugins}
+ {if $plugin.is_active eq 'y' && $plugin.edit_field && $plugin.plugin_type eq 'storage' && !$no_plugins}
<div class="form-group">
{formlabel label=$plugin.edit_label}
{forminput}
@@ -41,7 +41,7 @@
{if $gBitUser->hasPermission('p_liberty_attach_attachments') }
{foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
{* $no_plugins is set by the including template *}
- {if $plugin.is_active eq 'y' and $plugin.edit_field and $plugin.plugin_type eq 'storage' and !$no_plugins}
+ {if $plugin.is_active eq 'y' && $plugin.edit_field && $plugin.plugin_type eq 'storage' && !$no_plugins}
<div class="form-group">
{formlabel label=$plugin.edit_label}
{forminput}
diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl
index 04ca73c..eaedc7f 100755
--- a/templates/edit_storage_list.tpl
+++ b/templates/edit_storage_list.tpl
@@ -64,9 +64,9 @@ window.attachmentUrls["{$storage.attachment_id}"]["original"] = "{$storage.sourc
</div>
</div>
<div class="col-xs-1">
- {if $gBitUser->isAdmin() or ($storage.user_id == $gBitUser->mUserId) }
+ {if $gBitUser->isAdmin() || ($storage.user_id == $gBitUser->mUserId) }
{capture name=urlArgs}{$attachmentBaseArgs}content_id={$gContent->mContentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&amp;STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}{/capture}
- {if $libertyUploader or $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'}
+ {if $libertyUploader || $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'}
<a href="javascript:void(0);" onclick="
BitAjax.updater('edit_storage_list_tab_{$form_id}', '{$smarty.const.LIBERTY_PKG_URL}ajax_edit_storage.php', '{$smarty.capture.urlArgs}&amp;deleteAttachment={$attachmentId}&amp;form_id={$form_id}');
BitAjax.updater('edit_storage_list_{$form_id}', '{$smarty.const.LIBERTY_PKG_URL}ajax_edit_storage.php', '{$smarty.capture.urlArgs}&amp;form_id={$form_id}');">
diff --git a/templates/libertypagination.tpl b/templates/libertypagination.tpl
index 62220d0..ba84c94 100644
--- a/templates/libertypagination.tpl
+++ b/templates/libertypagination.tpl
@@ -25,7 +25,7 @@
{* MSIE dies when we use a form in the pagination when doing ajax stuff *}
{counter start=1 print=0 name=pgcount assign=pgcount}
- {if $gBitSystem->isFeatureActive( 'site_direct_pagination' ) or $ajaxId}
+ {if $gBitSystem->isFeatureActive( 'site_direct_pagination' ) || $ajaxId}
{foreach from=$pgnPages item=link}
{counter print=0 name=pgcount}
{$link}&nbsp;{if $pgcount > 20}{counter start=1 print=0 name=pgcount assign=pgcount}<br/>{/if}
diff --git a/templates/list_content.tpl b/templates/list_content.tpl
index b1354f4..827900f 100755
--- a/templates/list_content.tpl
+++ b/templates/list_content.tpl
@@ -8,7 +8,7 @@
<div class="input-append pull-right">
{html_options onchange="submit();" options=$contentTypes name=content_type_guid id=content_type selected=$contentSelect}
- {if $gBitSystem->isFeatureActive( 'liberty_display_status' ) and $gBitUser->hasPermission( 'p_liberty_view_all_status' )}
+ {if $gBitSystem->isFeatureActive( 'liberty_display_status' ) && $gBitUser->hasPermission( 'p_liberty_view_all_status' )}
{html_options options=$content_statuses values=$content_statuses name=content_status_id id=content_status_id class="input-xs" selected=$smarty.request.content_status_id|default:''}
{formhelp note="Limit selection to a given status."}
{/if}
diff --git a/templates/list_content_inc.tpl b/templates/list_content_inc.tpl
index edf0043..15c5dd2 100755
--- a/templates/list_content_inc.tpl
+++ b/templates/list_content_inc.tpl
@@ -13,7 +13,7 @@
<form id="bulkcontentform" action="{$smarty.const.LIBERTY_PKG_URL}list_content.php?{$smarty.server.QUERY_STRING}" method="POST">
{/if}
-{assign var=showStatus value=($gBitSystem->isFeatureActive( 'liberty_display_status' ) and $gBitUser->hasPermission( 'p_liberty_view_all_status' ))}
+{assign var=showStatus value=($gBitSystem->isFeatureActive( 'liberty_display_status' ) && $gBitUser->hasPermission( 'p_liberty_view_all_status' ))}
<table class="table data clear">
<caption>{tr}Available Content{/tr} <span class="total">[ {$listInfo.total_records} ]</span></caption>
<tr>
diff --git a/templates/mime/audio/attachment.tpl b/templates/mime/audio/attachment.tpl
index 08f6400..844e71a 100755
--- a/templates/mime/audio/attachment.tpl
+++ b/templates/mime/audio/attachment.tpl
@@ -1,5 +1,5 @@
{strip}
-{if $wrapper.output == 'desc' or $wrapper.output == 'description'}
+{if $wrapper.output == 'desc' || $wrapper.output == 'description'}
{if $attachment.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url|default:$attachment.display_url}">{/if}
{$wrapper.description_parsed|default:$attachment.filename}
{if $attachment.display_url}</a>{/if}
diff --git a/templates/mime/audio/player.tpl b/templates/mime/audio/player.tpl
index a37fc2e..18701f3 100755
--- a/templates/mime/audio/player.tpl
+++ b/templates/mime/audio/player.tpl
@@ -13,7 +13,7 @@
{/if}
<div id="{$id}"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this video.</div>
<script>/* <![CDATA[ */
- {if !$attachment.thumbnail_is_mime and $attachment.thumbnail_url.medium}
+ {if !$attachment.thumbnail_is_mime && $attachment.thumbnail_url.medium}
var so = new SWFObject('{$smarty.const.UTIL_PKG_URL}javascript/flv_player/mediaplayer.swf','mpl','{$width}','{$height}','7');
so.addVariable("image","{$attachment.thumbnail_url.medium}");
{else}
diff --git a/templates/mime/default/attachment.tpl b/templates/mime/default/attachment.tpl
index b31c677..f5272c8 100755
--- a/templates/mime/default/attachment.tpl
+++ b/templates/mime/default/attachment.tpl
@@ -1,5 +1,5 @@
{strip}
-{if $wrapper.output == 'desc' or $wrapper.output == 'description'}
+{if $wrapper.output == 'desc' || $wrapper.output == 'description'}
{if $attachment.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url|default:$attachment.display_url}">{/if}
{$wrapper.description_parsed|default:$attachment.filename|strip_tags}
{if $attachment.display_url}</a>{/if}
@@ -7,9 +7,9 @@
<{$wrapper.wrapper|default:'span'} class="{$wrapper.class|default:'att-plugin'}"{if $wrapper.style} style="{$wrapper.style|default:'display:inline-block'}{/if}">
{if $wrapper.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url}">{/if}
{if $thumbsize == 'original'}
- <img class="img-responsive" src="{$attachment.source_url}" alt="{$wrapper.alt|default:$wrapper.description|default:$attachment.filename|replace:"\r":""|replace:"\n":" "|escape}" title="{$wrapper.description|default:$wrapper.alt|default:$attachment.filename|replace:"\r":""|replace:"\n":" "|escape}" {if !empty($height) or !empty($width)} style="{if !empty($height)}height:{$height};{/if}{if !empty($width)}width:{$width}{/if}"{/if} />
+ <img class="img-responsive" src="{$attachment.source_url}" alt="{$wrapper.alt|default:$wrapper.description|default:$attachment.filename|replace:"\r":""|replace:"\n":" "|escape}" title="{$wrapper.description|default:$wrapper.alt|default:$attachment.filename|replace:"\r":""|replace:"\n":" "|escape}" {if !empty($height) || !empty($width)} style="{if !empty($height)}height:{$height};{/if}{if !empty($width)}width:{$width}{/if}"{/if} />
{elseif $attachment.thumbnail_url.$thumbsize}
- <img class="img-responsive" src="{$attachment.thumbnail_url.$thumbsize}" alt="{$wrapper.alt|default:$wrapper.description|default:$attachment.filename|replace:"\r":""|replace:"\n":" "|escape}" title="{$wrapper.description|default:$wrapper.alt|default:$attachment.filename|replace:"\r":""|replace:"\n":" "|escape}" {if !empty($height) or !empty($width)} style="{if !empty($height)}height:{$height};{/if}{if !empty($width)}width:{$width}{/if}"{/if}/>
+ <img class="img-responsive" src="{$attachment.thumbnail_url.$thumbsize}" alt="{$wrapper.alt|default:$wrapper.description|default:$attachment.filename|replace:"\r":""|replace:"\n":" "|escape}" title="{$wrapper.description|default:$wrapper.alt|default:$attachment.filename|replace:"\r":""|replace:"\n":" "|escape}" {if !empty($height) || !empty($width)} style="{if !empty($height)}height:{$height};{/if}{if !empty($width)}width:{$width}{/if}"{/if}/>
{/if}
{if $wrapper.description_parsed}
<div class="caption">{$wrapper.description_parsed}</div>
diff --git a/templates/mime/default/inline.tpl b/templates/mime/default/inline.tpl
index 3823b81..d9992bc 100644
--- a/templates/mime/default/inline.tpl
+++ b/templates/mime/default/inline.tpl
@@ -2,7 +2,7 @@
<div class="item">
{assign var=thumbsize value=$thumbsize|default:'small'}
{if $attachment.thumbnail_url.$thumbsize}
- {if !$attachment.is_primary or ( $attachment.is_primary and !$hideprimary )}
+ {if !$attachment.is_primary || ( $attachment.is_primary && !$hideprimary )}
<a href="{$attachment.display_url}">
<img class="img-responsive" src="{$attachment.thumbnail_url.$thumbsize}" alt="{$attachment.filename}" title="{$attachment.filename}"/>
</a>
diff --git a/templates/mime/default/storage.tpl b/templates/mime/default/storage.tpl
index 3823b81..d9992bc 100644
--- a/templates/mime/default/storage.tpl
+++ b/templates/mime/default/storage.tpl
@@ -2,7 +2,7 @@
<div class="item">
{assign var=thumbsize value=$thumbsize|default:'small'}
{if $attachment.thumbnail_url.$thumbsize}
- {if !$attachment.is_primary or ( $attachment.is_primary and !$hideprimary )}
+ {if !$attachment.is_primary || ( $attachment.is_primary && !$hideprimary )}
<a href="{$attachment.display_url}">
<img class="img-responsive" src="{$attachment.thumbnail_url.$thumbsize}" alt="{$attachment.filename}" title="{$attachment.filename}"/>
</a>
diff --git a/templates/mime/image/admin.tpl b/templates/mime/image/admin.tpl
index 8da6d45..ffeabcd 100755
--- a/templates/mime/image/admin.tpl
+++ b/templates/mime/image/admin.tpl
@@ -8,14 +8,14 @@
<div class="body">
{form legend="Image specific settings"}
{foreach from=$settings key=feature item=output}
- {if $feature == 'mime_image_panoramas' and $image_processor_warning}
+ {if $feature == 'mime_image_panoramas' && $image_processor_warning}
{formfeedback warning="This feature is only available when using the magickwand image processor."}
{/if}
<div class="form-group">
{formlabel label=`$output.label` for=$feature}
{forminput}
{if $output.type == 'checkbox'}
- {if $feature == 'mime_image_panoramas' and $image_processor_warning}
+ {if $feature == 'mime_image_panoramas' && $image_processor_warning}
{html_checkboxes name="$feature" values="y" labels=false id=$feature disabled="disabled"}
{else}
{html_checkboxes name="$feature" values="y" checked=$gBitSystem->getConfig($feature) labels=false id=$feature}
diff --git a/templates/mime/image/attachment.tpl b/templates/mime/image/attachment.tpl
index b9713de..96451db 100755
--- a/templates/mime/image/attachment.tpl
+++ b/templates/mime/image/attachment.tpl
@@ -1,6 +1,6 @@
{strip}
{if $attachment.thumbnail_url.panorama}
- {if $wrapper.output == 'desc' or $wrapper.output == 'description'}
+ {if $wrapper.output == 'desc' || $wrapper.output == 'description'}
{if $attachment.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url|default:$attachment.display_url}">{/if}
{$wrapper.description_parsed|default:$attachment.filename}
{if $attachment.display_url}</a>{/if}
diff --git a/templates/mime/video/attachment.tpl b/templates/mime/video/attachment.tpl
index bd52c64..485bfff 100755
--- a/templates/mime/video/attachment.tpl
+++ b/templates/mime/video/attachment.tpl
@@ -1,5 +1,5 @@
{strip}
-{if $wrapper.output == 'desc' or $wrapper.output == 'description'}
+{if $wrapper.output == 'desc' || $wrapper.output == 'description'}
{if $attachment.display_url}<a {$wrapper.href_class} href="{$wrapper.display_url|default:$attachment.display_url}">{/if}
{$wrapper.description_parsed|default:$attachment.filename}
{if $attachment.display_url}</a>{/if}
diff --git a/templates/mime_meta_inc.tpl b/templates/mime_meta_inc.tpl
index 88b0329..2bb3235 100755
--- a/templates/mime_meta_inc.tpl
+++ b/templates/mime_meta_inc.tpl
@@ -6,7 +6,7 @@
{/forminput}
</div>
-{if $display and $attachment.display_url}
+{if $display && $attachment.display_url}
<div class="form-group">
{formlabel label="View" for=""}
{forminput}
diff --git a/templates/mime_view.tpl b/templates/mime_view.tpl
index deaec4b..36f8a1f 100755
--- a/templates/mime_view.tpl
+++ b/templates/mime_view.tpl
@@ -9,7 +9,7 @@
{include file=$view_template preferences=$attachment.preferences}
{/legend}
- {if ( $gBitUser->isAdmin() or $gBitUser->mUserId == $attachment.user_id ) and $edit_template}
+ {if ( $gBitUser->isAdmin() || $gBitUser->mUserId == $attachment.user_id ) && $edit_template}
{form legend="Edit File Details"}
{formfeedback hash=$feedback}
{include file=$edit_template preferences=$attachment.preferences}
diff --git a/templates/plugins/data_quote.tpl b/templates/plugins/data_quote.tpl
index 65a5927..861ad7a 100755
--- a/templates/plugins/data_quote.tpl
+++ b/templates/plugins/data_quote.tpl
@@ -4,7 +4,7 @@
{tr}In{/tr} <a href="{$quote.cite_url}" title="{$quote.title}">{$quote.title}</a> ({$quote.created|reltime:short})
{/if}
- {if $quote.user_url and $quote.user_display_name}
+ {if $quote.user_url && $quote.user_display_name}
<a href="{$quote.user_url}" title="{$quote.user_display_name}">{$quote.user_display_name}</a>
{else}
{$quote.login}
diff --git a/templates/service_content_body_inc.tpl b/templates/service_content_body_inc.tpl
index 23cb496..776b7d4 100755
--- a/templates/service_content_body_inc.tpl
+++ b/templates/service_content_body_inc.tpl
@@ -1,4 +1,4 @@
-{if $gBitSystem->isFeatureActive( 'liberty_display_status' ) and ($gBitUser->hasPermission('p_liberty_edit_content_status') or $gBitUser->hasPermission('p_liberty_edit_all_status')) and !is_null($serviceHash.content_status_id) and $serviceHash.content_status_id != 50}
+{if $gBitSystem->isFeatureActive( 'liberty_display_status' ) && ($gBitUser->hasPermission('p_liberty_edit_content_status') || $gBitUser->hasPermission('p_liberty_edit_all_status')) && !is_null($serviceHash.content_status_id) && $serviceHash.content_status_id != 50}
{assign var=contentStatusId value=$serviceHash.content_status_id}
<p class="liberty_status">{booticon iname="fa-triangle-exclamation" iexplain="Warning"} {tr}The status of this content is{/tr} <strong>{$gContent->getContentStatusName($contentStatusId)}</strong>.</p>
{/if}{$gContent->mInfo.content_status_name}
diff --git a/templates/service_content_edit_tab_inc.tpl b/templates/service_content_edit_tab_inc.tpl
index a416c21..667ebc5 100755
--- a/templates/service_content_edit_tab_inc.tpl
+++ b/templates/service_content_edit_tab_inc.tpl
@@ -1,3 +1,3 @@
-{if $gBitSystem->isFeatureActive( 'site_edit_help' ) and $display_help_tab == 1} {* $display_help_tab is set in {textarea} plugin *}
+{if $gBitSystem->isFeatureActive( 'site_edit_help' ) && $display_help_tab == 1} {* $display_help_tab is set in {textarea} plugin *}
{include file="bitpackage:liberty/edit_help_inc.tpl"}
{/if}
diff --git a/templates/service_content_icon_inc.tpl b/templates/service_content_icon_inc.tpl
index c3944df..c74062d 100755
--- a/templates/service_content_icon_inc.tpl
+++ b/templates/service_content_icon_inc.tpl
@@ -1,6 +1,6 @@
{strip}
{if !empty($gContent)}
- {if $gBitSystem->isFeatureActive( 'liberty_cache' ) and $gContent and $gContent->isCached( $serviceHash.content_id ) and $gBitUser->hasPermission( 'p_users_view_icons_and_tools' )}
+ {if $gBitSystem->isFeatureActive( 'liberty_cache' ) && $gContent && $gContent->isCached( $serviceHash.content_id ) && $gBitUser->hasPermission( 'p_users_view_icons_and_tools' )}
{assign var=url value=$gContent->getDisplayUrl()|default:$serviceHash.display_url}
{if (not empty($url)) and strstr($url, "?") }
{assign var="amp" value="&amp;"}
@@ -11,7 +11,7 @@
{booticon iname="fa-recycle" iexplain="Refresh cache"}
</a>
{/if}
- {if $gBitUser->hasPermission( 'p_liberty_assign_content_perms' ) and $serviceHash.content_id}
+ {if $gBitUser->hasPermission( 'p_liberty_assign_content_perms' ) && $serviceHash.content_id}
{if $gContent->hasUserPermissions()}
{assign var=iconClass value="highlight"}
{else}
diff --git a/templates/services_inc.tpl b/templates/services_inc.tpl
index c95bbf9..3f38aaf 100644
--- a/templates/services_inc.tpl
+++ b/templates/services_inc.tpl
@@ -2,13 +2,13 @@
{assign var=serviceLocTpls value=$gLibertySystem->getServiceValues("content_`$serviceLocation`_tpl")}
{if $serviceLocTpls|@count > 0}
{if !empty($liberty_service_content)}
- {if $serviceLocTpls and ( $serviceLocation == 'nav' or $serviceLocation == 'view' )}
+ {if $serviceLocTpls && ( $serviceLocation == 'nav' || $serviceLocation == 'view' )}
<div class="services-{$serviceLocation}">
{/if}
{foreach from=$serviceLocTpls key=serviceName item=template}
{include file=$template serviceHash=$serviceHash}
{/foreach}
- {if $serviceLocTpls and ( $serviceLocation == 'nav' or $serviceLocation == 'view' )}
+ {if $serviceLocTpls && ( $serviceLocation == 'nav' || $serviceLocation == 'view' )}
</div>
{/if}
{/if}
diff --git a/templates/storage_thumbs.tpl b/templates/storage_thumbs.tpl
index 8b4f277..26c7cc1 100644
--- a/templates/storage_thumbs.tpl
+++ b/templates/storage_thumbs.tpl
@@ -61,7 +61,7 @@
{capture name="popup"}{include file="bitpackage:kernel/popup_box.tpl" content="`$attachment.filename`<br />{tr}Size{/tr}: `$smarty.capture.size`" noclose=true}{/capture}
{if $attachment.thumbnail_url.$thumbsize}
{* by setting hideprimary, you can hide the primary thumbnail * }
- {if !$attachment.is_primary or ( $attachment.is_primary and !$hideprimary )}
+ {if !$attachment.is_primary || ( $attachment.is_primary && !$hideprimary )}
<div class="item">
<h3>
{if $attachment.source_url}<a href="{$attachment.source_url}">{/if}
diff --git a/templates/structure_display.tpl b/templates/structure_display.tpl
index 8bac238..685de14 100644
--- a/templates/structure_display.tpl
+++ b/templates/structure_display.tpl
@@ -19,7 +19,7 @@
{if $gBitSystem->isFeatureActive( 'wiki_book_show_navigation' )}
<div class="navigation">
<span class="left">
- {if $structureInfo.prev and $structureInfo.prev.structure_id}
+ {if $structureInfo.prev && $structureInfo.prev.structure_id}
<a href="index.php?structure_id={$structureInfo.prev.structure_id}">
{if $wikibook_use_icons eq 'y'}
{booticon iname="fa-arrow-left" iexplain=Previous}
@@ -31,7 +31,7 @@
</span>
<span class="right">
- {if $structureInfo.next and $structureInfo.next.structure_id}
+ {if $structureInfo.next && $structureInfo.next.structure_id}
<a href="index.php?structure_id={$structureInfo.next.structure_id}">
{if $wikibook_use_icons eq 'y'}
{biticon ipackage="icons" iname="go-next" iexplain=Next}