summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-03-27 16:21:27 +0000
committerlsces <lester@lsces.co.uk>2026-03-27 16:21:27 +0000
commit64ca99495659cc85c522398ce89169ac7bb76acf (patch)
tree3e2884e36dc462e0ee576a673d3a097ca97990f4
parent3f9237878b44bf3f4e7a09c148d54c3fbe5c7d8d (diff)
downloadwiki-64ca99495659cc85c522398ce89169ac7bb76acf.tar.gz
wiki-64ca99495659cc85c522398ce89169ac7bb76acf.tar.bz2
wiki-64ca99495659cc85c522398ce89169ac7bb76acf.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.
-rwxr-xr-xtemplates/edit_page.tpl4
-rwxr-xr-xtemplates/html_head_inc.tpl4
-rwxr-xr-xtemplates/menu_wiki.tpl6
-rwxr-xr-xtemplates/page_action_bar.tpl10
-rwxr-xr-xtemplates/page_display.tpl2
-rwxr-xr-xtemplates/page_header.tpl2
-rwxr-xr-xtemplates/page_icons.tpl16
-rwxr-xr-xtemplates/show_page.tpl6
8 files changed, 25 insertions, 25 deletions
diff --git a/templates/edit_page.tpl b/templates/edit_page.tpl
index f14ec1c..d1dd433 100755
--- a/templates/edit_page.tpl
+++ b/templates/edit_page.tpl
@@ -70,7 +70,7 @@
{/if}
{formlabel label="$conDescr Title"}
{forminput}
- {if $gBitUser->hasPermission( 'p_wiki_rename_page' ) or !$gContent->mInfo.page_id}
+ {if $gBitUser->hasPermission( 'p_wiki_rename_page' ) || !$gContent->mInfo.page_id}
<input type="text" class="form-control" maxlength="200" name="title" id="title" value="{$gContent->mInfo.title|default:$pageInfo.title|escape}" />
{else}
{$page} {$gContent->mInfo.title|default:''|escape}
@@ -139,7 +139,7 @@
{include file="bitpackage:liberty/edit_services_inc.tpl" serviceFile="content_edit_tab_tpl"}
- {if $gBitSystem->isFeatureActive( 'wiki_attachments' ) and $gBitUser->hasPermission('p_liberty_attach_attachments')}
+ {if $gBitSystem->isFeatureActive( 'wiki_attachments' ) && $gBitUser->hasPermission('p_liberty_attach_attachments')}
{jstab title="Attachments"}
{legend legend="Attachments"}
{include file="bitpackage:liberty/edit_storage.tpl"}
diff --git a/templates/html_head_inc.tpl b/templates/html_head_inc.tpl
index 1c204e5..c271386 100755
--- a/templates/html_head_inc.tpl
+++ b/templates/html_head_inc.tpl
@@ -1,8 +1,8 @@
{strip}
-{if $gBitSystem->isPackageActive( 'rss' ) and $gBitSystem->isFeatureActive( 'wiki_rss' ) and $gBitSystem->getActivePackage() eq 'wiki' and $gBitUser->hasPermission( 'p_wiki_view_page' )}
+{if $gBitSystem->isPackageActive( 'rss' ) && $gBitSystem->isFeatureActive( 'wiki_rss' ) && $gBitSystem->getActivePackage() eq 'wiki' && $gBitUser->hasPermission( 'p_wiki_view_page' )}
<link rel="alternate" type="application/rss+xml"
title="{$gBitSystem->getConfig('fisheye_rss_title',"Wiki RSS")}"
href="{$smarty.const.WIKI_PKG_URL}wiki_rss.php?version={$gBitSystem->getConfig('rssfeed_default_version',0)}
- {if $gBitSystem->getConfig( 'rssfeed_httpauth' ) and $gBitUser->isRegistered()} &httpauth=y{/if}" />
+ {if $gBitSystem->getConfig( 'rssfeed_httpauth' ) && $gBitUser->isRegistered()} &httpauth=y{/if}" />
{/if}
{/strip}
diff --git a/templates/menu_wiki.tpl b/templates/menu_wiki.tpl
index e7f51f5..0ec8306 100755
--- a/templates/menu_wiki.tpl
+++ b/templates/menu_wiki.tpl
@@ -10,16 +10,16 @@
{if $gBitUser->hasPermission( 'p_wiki_create_page' )}
<li><a class="item" href="{$smarty.const.WIKI_PKG_URL}edit.php">{booticon iname="fa-file" iexplain="Create Page" ilocation=menu}</a></li>
{/if}
- {if $gBitUser->hasPermission( 'p_wiki_list_pages' ) and $gBitSystem->isFeatureActive( 'wiki_books' )}
+ {if $gBitUser->hasPermission( 'p_wiki_list_pages' ) && $gBitSystem->isFeatureActive( 'wiki_books' )}
<li><a class="item" href="{$smarty.const.WIKI_PKG_URL}books.php">{booticon iname="fa-book" iexplain="`$smarty.const.WIKI_PKG_DIR|ucwords` Books" ilocation=menu}</a></li>
{/if}
{if $gBitSystem->isFeatureActive( 'wiki_books' ) && $gBitUser->hasPermission( 'p_wiki_create_book' )}
<li><a class="item" href="{$smarty.const.WIKI_PKG_URL}edit_book.php">{booticon iname="fa-book-open" iexplain="Create Book" ilocation=menu}</a></li>
{/if}
- {if $gBitSystem->isFeatureActive( 'wiki_list_orphans' ) and $gBitUser->hasPermission( 'p_wiki_view_page' )}
+ {if $gBitSystem->isFeatureActive( 'wiki_list_orphans' ) && $gBitUser->hasPermission( 'p_wiki_view_page' )}
<li><a class="item" href="{$smarty.const.WIKI_PKG_URL}orphan_pages.php">{booticon iname="fa-magnifying-glass" iexplain="Orphan Pages" ilocation=menu}</a></li>
{/if}
- {if $gBitSystem->isFeatureActive( 'wiki_multiprint' ) and $gBitUser->hasPermission( 'p_wiki_view_page' )}
+ {if $gBitSystem->isFeatureActive( 'wiki_multiprint' ) && $gBitUser->hasPermission( 'p_wiki_view_page' )}
<li><a class="item" href="{$smarty.const.WIKI_PKG_URL}print_pages.php">{booticon iname="fa-print" iexplain="Print" ilocation=menu}</a></li>
{/if}
{if $gBitUser->hasPermission( 'p_wiki_list_pages' )}
diff --git a/templates/page_action_bar.tpl b/templates/page_action_bar.tpl
index 068673e..ca7c244 100755
--- a/templates/page_action_bar.tpl
+++ b/templates/page_action_bar.tpl
@@ -3,7 +3,7 @@
{if !$gContent->isLocked()}
{assign var=format_guid value=$gContent->mInfo.format_guid}
{if $gLibertySystem->mPlugins.$format_guid.is_active eq 'y'}
- {if $gContent->hasUpdatePermission() or $page eq 'SandBox'}
+ {if $gContent->hasUpdatePermission() || $page eq 'SandBox'}
<li><a href="{$smarty.const.WIKI_PKG_URL}edit.php?page_id={$gContent->mInfo.page_id}">{tr}Edit{/tr}</a></li>
{/if}
{/if}
@@ -12,7 +12,7 @@
{/if}
{/if}
{if $page ne 'SandBox'}
- {if $gBitUser->hasPermission( 'p_wiki_admin' ) or ($gBitUser->mUserId and ($gBitUser->mUserId eq $gContent->mInfo.modifier_user_id) and ($gBitUser->hasPermission( 'p_wiki_lock_page' )) and ($gBitSystem->isFeatureActive( 'wiki_usrlock' )))}
+ {if $gBitUser->hasPermission( 'p_wiki_admin' ) || ($gBitUser->mUserId && ($gBitUser->mUserId eq $gContent->mInfo.modifier_user_id) && ($gBitUser->hasPermission( 'p_wiki_lock_page' )) && ($gBitSystem->isFeatureActive( 'wiki_usrlock' )))}
{if $gContent->isLocked()}
<li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&amp;action=unlock">{tr}Unlock{/tr}</a></li>
{else}
@@ -22,14 +22,14 @@
{if $gBitUser->hasPermission( 'p_wiki_admin' )}
<li><a href="{$smarty.const.WIKI_PKG_URL}page_permissions.php?page_id={$gContent->mInfo.page_id}">{tr}Permissions{/tr}</a></li>
{/if}
- {if $gBitSystem->isFeatureActive( 'wiki_history' ) and $gContent->hasUserPermission('p_wiki_view_history')}
+ {if $gBitSystem->isFeatureActive( 'wiki_history' ) && $gContent->hasUserPermission('p_wiki_view_history')}
<li><a href="{$smarty.const.WIKI_PKG_URL}page_history.php?page_id={$gContent->mInfo.page_id}" rel="nofollow">{tr}History{/tr}</a></li>
{/if}
{/if}
{if $gBitSystem->isFeatureActive( 'wiki_like_pages' )}
<li><a href="{$smarty.const.WIKI_PKG_URL}like_pages.php?page_id={$gContent->mInfo.page_id}">{tr}Similar{/tr}</a></li>
{/if}
- {if $gBitSystem->isFeatureActive( 'wiki_undo' ) and !$gContent->isLocked() and $gContent->hasUserPermission('p_wiki_rollback')}
+ {if $gBitSystem->isFeatureActive( 'wiki_undo' ) && !$gContent->isLocked() && $gContent->hasUserPermission('p_wiki_rollback')}
<li><a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&amp;undo=1">{tr}Undo{/tr}</a></li>
{/if}
{if $gBitSystem->isFeatureActive( 'wiki_uses_slides' )}
@@ -42,7 +42,7 @@
{if $gBitUser->hasPermission( 'p_wiki_admin' )}
<li><a href="{$smarty.const.WIKI_PKG_URL}export_wiki_pages.php?page_id={$gContent->mInfo.page_id}">{tr}Export{/tr}</a></li>
{/if}
- {if $gBitSystem->isFeatureActive( 'users_watches' ) and $gContent->hasUserPermission('p_users_admin')}
+ {if $gBitSystem->isFeatureActive( 'users_watches' ) && $gContent->hasUserPermission('p_users_admin')}
<li><a href="{$smarty.const.WIKI_PKG_URL}page_watches.php?page_id={$gContent->mInfo.page_id}">{tr}Watches{/tr}</a></li>
{/if}
{/strip}{/capture}
diff --git a/templates/page_display.tpl b/templates/page_display.tpl
index b411d76..6e22dc9 100755
--- a/templates/page_display.tpl
+++ b/templates/page_display.tpl
@@ -1,5 +1,5 @@
{strip}
-<div class="body"{if $gBitUser->getPreference( 'users_double_click' ) and $gContent->hasUpdatePermission()} ondblclick="location.href='{$smarty.const.WIKI_PKG_URL}edit.php?page_id={$gContent->mInfo.page_id}';"{/if}>
+<div class="body"{if $gBitUser->getPreference( 'users_double_click' ) && $gContent->hasUpdatePermission()} ondblclick="location.href='{$smarty.const.WIKI_PKG_URL}edit.php?page_id={$gContent->mInfo.page_id}';"{/if}>
<div class="content">
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo}
{$gContent->mInfo.parsed_data|highlight}
diff --git a/templates/page_header.tpl b/templates/page_header.tpl
index d358562..5e37b2a 100755
--- a/templates/page_header.tpl
+++ b/templates/page_header.tpl
@@ -2,7 +2,7 @@
{if $gBitSystem->isFeatureActive( 'wiki_page_title' )}
<h1>{$gContent->mInfo.title|escape}</h1>
{/if}
- {if $gBitSystem->isFeatureActive( 'wiki_description' ) and $gContent->mInfo.summary}
+ {if $gBitSystem->isFeatureActive( 'wiki_description' ) && $gContent->mInfo.summary}
<p>{$gContent->mInfo.summary|escape}</p>
{/if}
{/strip}{/capture}
diff --git a/templates/page_icons.tpl b/templates/page_icons.tpl
index 06c92cd..54c0738 100755
--- a/templates/page_icons.tpl
+++ b/templates/page_icons.tpl
@@ -8,27 +8,27 @@
{/if}
{if $gContent->isLocked()}
- {if $gContent->hasAdminPermission() or ($gContent->isOwner() and $gContent->hasUserPermission( 'p_wiki_lock_page' ) and $gBitSystem->isFeatureActive( 'wiki_usrlock' ))}
+ {if $gContent->hasAdminPermission() || ($gContent->isOwner() && $gContent->hasUserPermission( 'p_wiki_lock_page' ) && $gBitSystem->isFeatureActive( 'wiki_usrlock' ))}
<a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&amp;action=unlock">{booticon iname="fa-lock" iexplain="Unlock this page"}</a>
{else}
{booticon iname="fa-lock" iexplain="Locked"}
{/if}
{else}
{assign var=format_guid value=$gContent->mInfo.format_guid}
- {if $gLibertySystem->mPlugins.$format_guid.is_active eq 'y' or $gContent->hasAdminPermission()}
+ {if $gLibertySystem->mPlugins.$format_guid.is_active eq 'y' || $gContent->hasAdminPermission()}
{if $gContent->hasUpdatePermission()}
- {if $gContent->hasAdminPermission() or ($gContent->isOwner() and $gContent->hasUserPermission( 'p_wiki_lock_page' ) and $gBitSystem->isFeatureActive( 'wiki_usrlock' ))}
+ {if $gContent->hasAdminPermission() || ($gContent->isOwner() && $gContent->hasUserPermission( 'p_wiki_lock_page' ) && $gBitSystem->isFeatureActive( 'wiki_usrlock' ))}
<a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&amp;action=lock">{booticon iname="fa-unlock" iexplain="Lock this page"}</a>
{/if}
<a href="{$smarty.const.WIKI_PKG_URL}edit.php?page_id={$gContent->mInfo.page_id}">{booticon iname="fa-pen-to-square" iexplain="Edit"}</a>
{/if}
{/if}
- {if $gBitSystem->isFeatureActive( 'wiki_undo' ) and $gContent->hasUserPermission('p_wiki_rollback')}
+ {if $gBitSystem->isFeatureActive( 'wiki_undo' ) && $gContent->hasUserPermission('p_wiki_rollback')}
<a href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&amp;undo=1">{booticon ipackage=icons iname="fa-undo" iexplain="Undo last edit"}</a>
{/if}
- {if $gBitSystem->isFeatureActive( 'wiki_history' ) and $gContent->hasUserPermission('p_wiki_view_history')}
+ {if $gBitSystem->isFeatureActive( 'wiki_history' ) && $gContent->hasUserPermission('p_wiki_view_history')}
<a href="{$smarty.const.WIKI_PKG_URL}page_history.php?page_id={$gContent->mInfo.page_id}" rel="nofollow">{booticon iname="fa-clock" iexplain=History}</a>
{/if}
{/if}
@@ -39,7 +39,7 @@
<a href="{$smarty.const.WIKI_PKG_URL}edit_book.php?content_id={$gContent->mContentId}">{booticon iname="fa-gears" iexplain="Edit book"}</a>
{/if}
- {if $gBitUser->isRegistered() and $gBitUser->mUserId && $gBitSystem->isFeatureActive( 'users_watches' ) }
+ {if $gBitUser->isRegistered() && $gBitUser->mUserId && $gBitSystem->isFeatureActive( 'users_watches' ) }
{if $user_watching_page eq 'y'}
<a title="{tr}stop monitoring this page{/tr}" href="{$smarty.const.WIKI_PKG_URL}index.php?page_id={$gContent->mInfo.page_id}&amp;watch_event=wiki_page_changed&amp;watch_object={$gContent->mInfo.page_id}&amp;watch_action=remove">{booticon iname="fa-eye-slash" iexplain="Stop monitoring"}</a>
{else}
@@ -47,7 +47,7 @@
{/if}
{/if}
- {if $gBitSystem->isFeatureActive( 'users_watches' ) and $gContent->hasUserPermission('p_users_admin')}
+ {if $gBitSystem->isFeatureActive( 'users_watches' ) && $gContent->hasUserPermission('p_users_admin')}
<a href="{$smarty.const.WIKI_PKG_URL}page_watches.php?page_id={$gContent->mInfo.page_id}">{booticon iname="fa-user" iexplain="Watches"}</a>
{/if}
@@ -71,7 +71,7 @@
{/if}
{/if}
- {if $gBitSystem->isFeatureActive( 'wiki_backlinks' ) and $backlinks}
+ {if $gBitSystem->isFeatureActive( 'wiki_backlinks' ) && $backlinks}
<div class="btn-group">
<button class="btn btn-xs dropdown-toggle" data-toggle="dropdown">
{booticon iname="fa-link"}
diff --git a/templates/show_page.tpl b/templates/show_page.tpl
index ce55e92..67b2791 100755
--- a/templates/show_page.tpl
+++ b/templates/show_page.tpl
@@ -1,6 +1,6 @@
{if empty($comments_at_top_of_page)}{assign var=comments_at_top_of_page value=false}{/if}
{if empty($print_page)}{assign var=print_page value=false}{/if}
-{if $comments_at_top_of_page and !$print_page and $gBitSystem->isFeatureActive( 'wiki_comments' )}
+{if $comments_at_top_of_page && !$print_page && $gBitSystem->isFeatureActive( 'wiki_comments' )}
{include file="bitpackage:wiki/page_header.tpl"}
{include file="bitpackage:liberty/comments.tpl"}
{/if}
@@ -19,7 +19,7 @@
{include file="bitpackage:wiki/page_display.tpl"}
- {if !empty($pages) and $pages > 1}
+ {if !empty($pages) && $pages > 1}
<div class="pagination">
{*<a title="{tr}First page{/tr}" href="index.php?page_id={$gContent->mInfo.page_id}&amp;pagenum={$first_page}">&laquo; &laquo;</a>*}
<a title="{tr}Previous page{/tr}" href="index.php?page_id={$gContent->mInfo.page_id}&amp;pagenum={$prev_page}">&laquo;</a>
@@ -49,6 +49,6 @@
{include file="bitpackage:liberty/services_inc.tpl" serviceLocation='view' serviceHash=$gContent->mInfo}
-{if !$comments_at_top_of_page and !$print_page and $gBitSystem->isFeatureActive( 'wiki_comments' )}
+{if !$comments_at_top_of_page && !$print_page && $gBitSystem->isFeatureActive( 'wiki_comments' )}
{include file="bitpackage:liberty/comments.tpl"}
{/if}