fix htmlentities bug in message with multi-action
authorioguix <ioguix>
Wed, 17 Oct 2007 21:40:19 +0000 (21:40 +0000)
committerioguix <ioguix>
Wed, 17 Oct 2007 21:40:19 +0000 (21:40 +0000)
all_db.php
tables.php

index 6e34ad2ad2245671c1455c95556e6bfbab9a53c1..bb79cf95aa6021c02826f34e3611fb6537401fbc 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage databases within a server
         *
-        * $Id: all_db.php,v 1.58 2007/10/17 20:56:28 ioguix Exp $
+        * $Id: all_db.php,v 1.59 2007/10/17 21:40:19 ioguix Exp $
         */
 
        // Include application functions
                 foreach($_REQUEST['dropdatabase'] as $d) {
                                        $status = $data->dropDatabase($d);
                                        if ($status == 0)
-                                               $msg.= sprintf('%s: %s<br />', $d, $lang['strdatabasedropped']);
+                                               $msg.= sprintf('%s: %s<br />', htmlentities($d), $lang['strdatabasedropped']);
                                        else {
-                                               doDefault(sprintf('%s%s: %s<br />', $msg, $d, $lang['strdatabasedroppedbad']));
+                                               doDefault(sprintf('%s%s: %s<br />', $msg, htmlentities($d), $lang['strdatabasedroppedbad']));
                                                return;
                                        }
                                }// Everything went fine, back to Default page...
index 0d53f60984ec79f3665f585bced592a8dee9469f..b50eace943174c84e782126123ada2ef9e8c55ce 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.105 2007/10/17 20:56:28 ioguix Exp $
+        * $Id: tables.php,v 1.106 2007/10/17 21:40:19 ioguix Exp $
         */
 
        // Include application functions
                                foreach($_REQUEST['table'] as $t) {
                                        $status = $data->emptyTable($t);
                                        if ($status == 0)
-                                               $msg.= sprintf('%s: %s<br />', $t, $lang['strtableemptied']);
+                                               $msg.= sprintf('%s: %s<br />', htmlentities($t), $lang['strtableemptied']);
                                        else {
-                                               doDefault(sprintf('%s%s: %s<br />', $msg, $t, $lang['strtableemptiedbad']));
+                                               doDefault(sprintf('%s%s: %s<br />', $msg, htmlentities($t), $lang['strtableemptiedbad']));
                                                return;
                                        }
                                }
                                foreach($_REQUEST['table'] as $t) {
                                        $status = $data->dropTable($t, isset($_POST['cascade']));
                                        if ($status == 0)
-                                               $msg.= sprintf('%s: %s<br />', $t, $lang['strtabledropped']);
+                                               $msg.= sprintf('%s: %s<br />', htmlentities($t), $lang['strtabledropped']);
                                        else {
-                                               doDefault(sprintf('%s%s: %s<br />', $msg, $t, $lang['strtabledroppedbad']));
+                                               doDefault(sprintf('%s%s: %s<br />', $msg, htmlentities($t), $lang['strtabledroppedbad']));
                                                return;
                                        }
                                }
                                foreach($_REQUEST['table'] as $t) {
                                        $status = $data->vacuumDB($t, isset($_REQUEST['vacuum_analyze']), isset($_REQUEST['vacuum_full']), '');
                                        if ($status == 0)
-                                               $msg.= sprintf('%s: %s<br />', $t, $lang['strvacuumgood']);
+                                               $msg.= sprintf('%s: %s<br />', htmlentities($t), $lang['strvacuumgood']);
                                        else {
-                                               doDefault(sprintf('%s%s: %s<br />', $msg, $t, $lang['strvacuumbad']));
+                                               doDefault(sprintf('%s%s: %s<br />', $msg, htmlentities($t), $lang['strvacuumbad']));
                                                return;
                                        }
                                }
                                foreach($_REQUEST['table'] as $t) {
                                        $status = $data->analyzeDB($t);
                                        if ($status == 0)
-                                               $msg.= sprintf('%s: %s<br />', $t, $lang['stranalyzegood']);
+                                               $msg.= sprintf('%s: %s<br />', htmlentities($t), $lang['stranalyzegood']);
                                        else {
-                                               doDefault(sprintf('%s%s: %s<br />', $msg, $t, $lang['stranalyzebad']));
+                                               doDefault(sprintf('%s%s: %s<br />', $msg, htmlentities($t), $lang['stranalyzebad']));
                                                return;
                                        }
                                }