/**
 * The javascript function used to confirm events (e.g. deleting elements).
 */

/**
 * The function is part of the functions.js that phpMyAdmin contains
 *
 * This function is called to ensure that an action (e.g. deleting elements) is really wanted.
 *
 * @param   object   the link
 * @param   object   the confirm box message
 *
 * @return  boolean  whether to run the query or not
 */
function confirmLink(theLink, theMsg)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (theMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm( theMsg );
    if (is_confirmed) {
        theLink.href += '&isConfirmed=1';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function