From e11d4f00990e6c1d1faec01794b1374ef47d7149 Mon Sep 17 00:00:00 2001 From: lsces Date: Fri, 8 May 2026 14:08:32 +0100 Subject: Check values exist before using, and add tk token manually as the smarty added on is not currently working --- templates/center_user_wiki_page.tpl | 6 +++--- templates/change_password.tpl | 4 ++-- templates/edit_personal_page.tpl | 19 ++++++++++--------- 3 files changed, 15 insertions(+), 14 deletions(-) (limited to 'templates') diff --git a/templates/center_user_wiki_page.tpl b/templates/center_user_wiki_page.tpl index 58f5ec6..ec2104b 100644 --- a/templates/center_user_wiki_page.tpl +++ b/templates/center_user_wiki_page.tpl @@ -7,10 +7,10 @@ {if $gBitSystem->isPackageActive( 'bitcommerce' ) && $gBitUser->hasPermission( 'p_commerce_admin' )} {smartlink ipackage=bitcommerce ifile="admin/list_orders.php" user_id=$userInfo.user_id ititle="Orders" booticon="fa-shopping-cart"} {/if} - {smartlink ipackage=users ifile="admin/index.php" assume_user=$userInfo.user_id ititle="Assume user identity" booticon="fa-user-doctor"} + {smartlink ipackage=users ifile="admin/index.php" assume_user=$userInfo.user_id tk=$gBitUser->mTicket ititle="Assume user identity" booticon="fa-user-doctor"} {smartlink ipackage=users ifile="admin/assign_user.php" assign_user=$userInfo.user_id ititle="Assign Group" booticon="fa-key"} {smartlink ipackage=users ifile="admin/user_activity.php" user_id=$userInfo.user_id ititle="User Activity" booticon="fa-bolt"} - {if $users[user].user_id != $smarty.const.ANONYMOUS_USER_ID} + {if $userInfo.user_id != $smarty.const.ANONYMOUS_USER_ID} {smartlink ipackage=liberty ifile="list_content.php" user_id=$userInfo.user_id ititle="User Content" booticon="fa-square-list"} {smartlink ipackage=users ifile="admin/index.php" action=delete user_id=$userInfo.user_id ititle="Remove" booticon="fa-trash"} {/if} @@ -28,7 +28,7 @@ {/if} {/if} - {if $userInfo.logo_url} + {if !empty($userInfo.logo_url)}
{$gBitUser->getDisplayName()} {tr}Logo{/tr}
diff --git a/templates/change_password.tpl b/templates/change_password.tpl index 01a9f39..ba5d6a0 100644 --- a/templates/change_password.tpl +++ b/templates/change_password.tpl @@ -8,7 +8,7 @@
{form ipackage=users ifile="change_password.php" secure=$gBitSystem->isFeatureActive("site_https_login_required")} - {if $userInfo.provpass} + {if !empty($userInfo.provpass)} {/if} @@ -19,7 +19,7 @@ {/forminput}
- {if !$userInfo.provpass} + {if empty($userInfo.provpass)}
{formlabel label="Old Password" for="oldpass"} {forminput} diff --git a/templates/edit_personal_page.tpl b/templates/edit_personal_page.tpl index 5c8cfbb..1bfcee6 100644 --- a/templates/edit_personal_page.tpl +++ b/templates/edit_personal_page.tpl @@ -7,7 +7,7 @@

{* this weird dual assign thing is cause smarty wont interpret backticks to object in assign tag - spiderr *} {assign var=conDescr value=$gContent->getContentTypeName()} - {if $pageInfo.page_id} + {if !empty($pageInfo.page_id )} {assign var=editLabel value="{tr}Edit{/tr} $conDescr"} {tr}{tr}Edit{/tr} {$pageInfo.original_title}{/tr} {else} @@ -18,7 +18,7 @@

{* Check to see if there is an editing conflict *} - {if $errors.edit_conflict} + {if !empty($errors.edit_conflict)} @@ -26,7 +26,7 @@ {/if}
- {if $translateFrom} + {if !empty($translateFrom)}
{if $translateFrom->mInfo.google_guess} @@ -59,7 +59,7 @@
{/if} - {if $page eq 'SandBox'} + {if $page ?? '' eq 'SandBox'}
{tr}The SandBox is a page where you can practice your editing skills, use the preview feature to preview the appeareance of the page, no versions are stored for this page.{/tr}
{/if} @@ -67,10 +67,11 @@ {jstabs} {jstab title="$editLabel Body"} {legend legend="`$editLabel` Body"} - + +
- {formfeedback warning=$errors.title} + {formfeedback warning=$errors.title ?? ''} {formlabel label="$conDescr Title" for="title"} {forminput} {if $gBitUser->hasPermission( 'p_wiki_rename_page' ) || !$pageInfo.page_id} @@ -91,7 +92,7 @@
{/if} - {if $pageInfo.edit_section == 1} + {if $pageInfo.edit_section ?? 0 == 1} {/if} @@ -107,11 +108,11 @@
{/if} - {if $page ne 'SandBox'} + {if $page ?? '' ne 'SandBox'}
{formlabel label="Comment" for="edit_comment"} {forminput} - + {formhelp note="Add a comment to illustrate your most recent changes."} {/forminput}
-- cgit v1.3