diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2024-04-28 07:57:28 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2024-04-28 07:57:28 +0000 |
commit | 46c04e185294bb225785929476d4a4f16cc6d34a (patch) | |
tree | 5c28ea91e9f057ebf209b00c7f3ec9f1726952ae | |
parent | d76bf03f2ae9ffaa8c3ff65220f6ab752c00870a (diff) | |
download | pmwiki.svn-46c04e185294bb225785929476d4a4f16cc6d34a.tar.bz2 |
$GUIButtons remove invalid elements.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4704 524c5546-5005-0410-9a3e-e25e191bd360
-rw-r--r-- | scripts/guiedit.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/guiedit.php b/scripts/guiedit.php index 7af62b70..b8a59c58 100644 --- a/scripts/guiedit.php +++ b/scripts/guiedit.php @@ -1,5 +1,5 @@ <?php if (!defined('PmWiki')) exit(); -/* Copyright 2004-2022 Patrick R. Michaud (pmichaud@pobox.com) +/* Copyright 2004-2024 Patrick R. Michaud (pmichaud@pobox.com) This file is part of PmWiki; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or @@ -67,6 +67,11 @@ if(IsEnabled($EnableGUIButtons,0)) { function GUIButtonCode() { global $GUIButtons; extract($GLOBALS["MarkupToHTML"]); # get $pagename + + foreach($GUIButtons as $k=>&$a) { + if (!$a || count($a)<4 ) unset($GUIButtons[$k]); + else $a[0] = floatval($a[0]); + } usort($GUIButtons, 'cb_gbcompare'); |