From 199c5d9f1838a3a19c9ad913e80120fd03be61ed Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 14 Apr 2015 16:31:05 +0000 Subject: [PATCH] Display Search&Replace icons only if JS_SEARCHREPLACE is true git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@9668 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/editpage.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/editpage.php b/lib/editpage.php index 0e8569e42..f9d8a6e9c 100644 --- a/lib/editpage.php +++ b/lib/editpage.php @@ -774,17 +774,19 @@ msg_repl_close = '" . _("Close") . "' if (defined('TOOLBAR_IMAGE_PULLDOWN') and TOOLBAR_IMAGE_PULLDOWN) { $toolbar->pushContent($this->imagePulldown()); } - $toolbar->pushContent(HTML::img(array('src' => $WikiTheme->getImageURL("ed_replace.png"), - 'class' => 'toolbar', - 'alt' => _('Search & Replace'), - 'title' => _('Search & Replace'), - 'onclick' => "replace();"))); - $toolbar->pushContent(HTML::img(array('src' => $WikiTheme->getImageURL("ed_undo_d.png"), - 'class' => 'toolbar', - 'id' => 'sr_undo', - 'alt' => _('Undo Search & Replace'), - 'title' => _('Undo Search & Replace'), - 'onclick' => "do_undo();"))); + if (defined('JS_SEARCHREPLACE') and JS_SEARCHREPLACE) { + $toolbar->pushContent(HTML::img(array('src' => $WikiTheme->getImageURL("ed_replace.png"), + 'class' => 'toolbar', + 'alt' => _('Search & Replace'), + 'title' => _('Search & Replace'), + 'onclick' => "replace();"))); + $toolbar->pushContent(HTML::img(array('src' => $WikiTheme->getImageURL("ed_undo_d.png"), + 'class' => 'toolbar', + 'id' => 'sr_undo', + 'alt' => _('Undo Search & Replace'), + 'title' => _('Undo Search & Replace'), + 'onclick' => "do_undo();"))); + } return HTML($toolbar, $textarea); } else { return $textarea; -- 2.45.0