Changeset 3250


Ignore:
Timestamp:
08/31/10 21:50:29 (18 months ago)
Author:
ShadowJumper
Message:

Update PMA to 3.3.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/tools/pma/js/functions.js

    r2840 r3250  
    153153        } // end if 
    154154 
    155         // Confirms a "DROP/DELETE/ALTER" statement 
     155        // Confirms a "DROP/DELETE/ALTER/TRUNCATE" statement 
    156156        // 
    157157        // TODO: find a way (if possible) to use the parser-analyser 
     
    163163        var do_confirm_re_1 = new RegExp('^\\s*ALTER\\s+TABLE\\s+((`[^`]+`)|([A-Za-z0-9_$]+))\\s+DROP\\s', 'i'); 
    164164        var do_confirm_re_2 = new RegExp('^\\s*DELETE\\s+FROM\\s', 'i'); 
     165        var do_confirm_re_3 = new RegExp('^\\s*TRUNCATE\\s', 'i'); 
     166 
    165167        if (do_confirm_re_0.test(sqlQuery1.value) 
    166168            || do_confirm_re_1.test(sqlQuery1.value) 
    167             || do_confirm_re_2.test(sqlQuery1.value)) { 
     169            || do_confirm_re_2.test(sqlQuery1.value) 
     170            || do_confirm_re_3.test(sqlQuery1.value)) { 
    168171            var message      = (sqlQuery1.value.length > 100) 
    169172                             ? sqlQuery1.value.substr(0, 100) + '\n    ...' 
    170173                             : sqlQuery1.value; 
    171174            var is_confirmed = confirm(PMA_messages['strDoYouReally'] + ' :\n' + message); 
    172             // drop/delete/alter statement is confirmed -> update the 
     175            // statement is confirmed -> update the 
    173176            // "is_js_confirmed" form field so the confirm test won't be 
    174177            // run on the server side and allows to submit the form 
     
    177180                return true; 
    178181            } 
    179             // "DROP/DELETE/ALTER" statement is rejected -> do not submit 
    180             // the form 
     182            // statement is rejected -> do not submit the form 
    181183            else { 
    182184                window.focus(); 
Note: See TracChangeset for help on using the changeset viewer.