diff --git a/build.xml b/build.xml index 62273df2e8..ad4dc40597 100644 --- a/build.xml +++ b/build.xml @@ -46,6 +46,7 @@ @@ -61,7 +62,7 @@ '; + echo ''; } echo __('Rename database to') . ':'; ?> @@ -434,8 +433,7 @@ if (($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) && ! $db_is_info
'; + echo ''; } echo __('Remove database'); ?> @@ -481,8 +479,7 @@ echo __('Remove database'); '; + echo ''; } echo __('Copy database to') . ':'; $drop_clause = 'DROP TABLE / DROP VIEW'; @@ -546,8 +543,7 @@ echo __('Remove database'); . '
' . "\n" . ' '; if ($cfg['PropertiesIconic']) { - echo ''; + echo ''; } echo ' ' . "\n" . ' ' . "\n" @@ -594,8 +590,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?> */ echo ''; } // end if diff --git a/db_structure.php b/db_structure.php index 000ab6afbf..d1ffdc3b77 100644 --- a/db_structure.php +++ b/db_structure.php @@ -284,9 +284,9 @@ foreach ($tables as $keyname => $each_table) { $tracking_icon = ''; if (PMA_Tracker::isActive()) { if (PMA_Tracker::isTracked($GLOBALS["db"], $truename)) { - $tracking_icon = '' . __('Tracking is active.') . ''; + $tracking_icon = '' . __('Tracking is active.') . ''; } elseif (PMA_Tracker::getVersion($GLOBALS["db"], $truename) > 0) { - $tracking_icon = '' . __('Tracking is not active.') . ''; + $tracking_icon = '' . __('Tracking is not active.') . ''; } } @@ -341,7 +341,7 @@ foreach ($tables as $keyname => $each_table) { - ' : ''. $do ? ' REPLICATED' : ''; ?> + ' : ''. $do ? ' REPLICATED' : ''; ?> @@ -548,15 +548,13 @@ PMA_listNavigator($total_num_tables, $pos, $_url_params, 'db_structure.php', 'fr echo '

'; echo ''; if ($cfg['PropertiesIconic']) { - echo ''; + echo ''; } echo __('Print view') . ' '; echo ''; if ($cfg['PropertiesIconic']) { - echo ''; + echo ''; } echo __('Data Dictionary') . ''; echo '

'; diff --git a/db_tracking.php b/db_tracking.php index 3a9b6954b7..38a231d4e0 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -98,7 +98,7 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) { $drop_image_or_text = ''; if (true == $GLOBALS['cfg']['PropertiesIconic']) { - $drop_image_or_text .= '' . __('Delete tracking data for this table') . ''; + $drop_image_or_text .= '' . __('Delete tracking data for this table') . ''; } if ('both' === $GLOBALS['cfg']['PropertiesIconic'] || false === $GLOBALS['cfg']['PropertiesIconic']) { $drop_image_or_text .= __('Drop'); @@ -198,7 +198,7 @@ if (isset($my_tables)) { $my_link = ''; if ($cfg['PropertiesIconic']) { - $my_link .= '' . __('Track table') . ' '; + $my_link .= '' . __('Track table') . ' '; } $my_link .= __('Track table') . ''; ?> diff --git a/import.php b/import.php index afc513ce3c..b9b7d150bc 100644 --- a/import.php +++ b/import.php @@ -264,7 +264,7 @@ if ($import_file != 'none' && !$error) { $file_to_unlink = $import_file_new; } - $size = filesize($import_file); + $size = filesize($import_file); } } diff --git a/js/db_search.js b/js/db_search.js index 0cb04b7f28..72b30463d4 100644 --- a/js/db_search.js +++ b/js/db_search.js @@ -87,7 +87,7 @@ $(document).ready(function() { }); /** Hide the table link in the initial search result */ - $("#table-info").prepend('').hide(); + $("#table-info").prepend('').hide(); /** Hide the browse and deleted results in the new search criteria */ $('#buttonGo').click(function(){ diff --git a/js/db_structure.js b/js/db_structure.js index 1f2d0e6395..efc8f2ad2d 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -57,10 +57,10 @@ $(document).ready(function() { * @uses PMA_ajaxShowMessage() * @see $cfg['AjaxEnable'] */ - var currrent_insert_table; + var current_insert_table; $("td.insert_table a.ajax").live('click', function(event){ event.preventDefault(); - currrent_insert_table = $(this); + current_insert_table = $(this); var $url = $(this).attr("href"); if ($url.substring(0, 15) == "tbl_change.php?") { $url = $url.substring(15); @@ -144,7 +144,7 @@ $(document).ready(function() { $("#insert_table_dialog").dialog("close").remove(); } /**Update the row count at the tableForm*/ - currrent_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count); + current_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count); }) // end $.post() }) // end insert table button "Go" @@ -170,7 +170,7 @@ $(document).ready(function() { } if (selected_after_insert == "new_insert") { /**Trigger the insert dialog for new_insert option*/ - currrent_insert_table.trigger('click'); + current_insert_table.trigger('click'); } } else { @@ -180,7 +180,7 @@ $(document).ready(function() { $("#insert_table_dialog").dialog("close").remove(); } /**Update the row count at the tableForm*/ - currrent_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count); + current_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count); }) // end $.post() }); @@ -218,7 +218,7 @@ $(document).ready(function() { PMA_ajaxShowMessage(data.message); //Fetch inner span of this anchor //and replace the icon with its disabled version - var span = $this_anchor.html().replace(/b_empty.png/, 'bd_empty.png'); + var span = $this_anchor.html().replace(/ic_b_empty/, 'ic_bd_empty'); PMA_adjustTotals($this_anchor); //To disable further attempts to truncate the table, diff --git a/js/functions.js b/js/functions.js index eff67591ec..dbb962d32e 100644 --- a/js/functions.js +++ b/js/functions.js @@ -135,14 +135,13 @@ function displayPasswordGenerateButton() { * * @param object $this_element a jQuery object pointing to the element */ -function PMA_addDatepicker($this_element) { +function PMA_addDatepicker($this_element, options) { var showTimeOption = false; if ($this_element.is('.datetimefield')) { showTimeOption = true; } - - $this_element - .datepicker({ + + var defaultOptions = { showOn: 'button', buttonImage: themeCalendarImage, // defined in js/messages.php buttonImageOnly: true, @@ -164,7 +163,9 @@ function PMA_addDatepicker($this_element) { },0); }, constrainInput: false - }); + }; + + $this_element.datepicker($.extend(defaultOptions, options)); } /** @@ -2409,7 +2410,7 @@ $(function() { }); var img = topmenu.find('li:first-child img'); if (img.length) { - img.clone().attr('src', img.attr('src').replace(/\/[^\/]+$/, '/b_more.png')).prependTo(link); + img.clone().attr('class', 'icon ic_b_more').prependTo(link); } var submenu = $('
  • ', {'class': 'submenu'}) .append(link) diff --git a/js/makegrid.js b/js/makegrid.js index a5bbdb89cf..00d839f9ce 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -70,8 +70,9 @@ dragMove: function(e) { if (this.colRsz) { var dx = e.pageX - this.colRsz.x0; - if (this.colRsz.objWidth + dx > this.minColWidth) + if (this.colRsz.objWidth + dx > this.minColWidth) { $(this.colRsz.obj).css('left', this.colRsz.objLeft + dx + 'px'); + } } else if (this.colMov) { // dragged column animation var dx = e.pageX - this.colMov.x0; diff --git a/js/navigation.js b/js/navigation.js index 20aea18bd4..167eb3725c 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -28,13 +28,13 @@ function toggle(id, only_open) { if (el.style.display == 'none' || only_open) { el.style.display = ''; if (img) { - img.src = image_minus; + img.className = 'icon ic_b_minus'; img.alt = '-'; } } else { el.style.display = 'none'; if (img) { - img.src = image_plus; + img.className = 'icon ic_b_plus'; img.alt = '+'; } } diff --git a/js/server_privileges.js b/js/server_privileges.js index d5729d98d8..35c34aa34e 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -210,7 +210,7 @@ $(document).ready(function() { /* post request for get the updated userForm table */ $.post($form.attr('action' ), url, function(priv_data) { - /*Remove the old userForm table*/ + /*Remove the old userForm table*/ if ($('#userFormDiv').length != 0) { $('#userFormDiv').remove(); } else { diff --git a/js/server_status.js b/js/server_status.js index 2fda29f784..ac4071c3f6 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -439,7 +439,7 @@ $(function() { }); $('#serverstatusqueriesdetails tr:first th') - .append(''); + .append(''); break; @@ -453,7 +453,7 @@ $(function() { }); $('#serverstatusvariables tr:first th') - .append(''); + .append(''); break; } @@ -942,9 +942,9 @@ $(function() { $('a[href="#pauseCharts"]').click(function() { runtime.redrawCharts = ! runtime.redrawCharts; if(! runtime.redrawCharts) - $(this).html(' ' + PMA_messages['strResumeMonitor']); + $(this).html(' ' + PMA_messages['strResumeMonitor']); else { - $(this).html(' ' + PMA_messages['strPauseMonitor']); + $(this).html(' ' + PMA_messages['strPauseMonitor']); if(runtime.charts == null) { initGrid(); $('a[href="#settingsPopup"]').show(); @@ -968,7 +968,7 @@ $(function() { $.get('server_status.php?' + url_query, vars, function(data) { var logVars = $.parseJSON(data), - icon = 's_success.png', msg='', str=''; + icon = 'ic_s_success', msg='', str=''; if(logVars['general_log'] == 'ON') { if(logVars['slow_query_log'] == 'ON') @@ -982,26 +982,26 @@ $(function() { } if(msg.length == 0) { - icon = 's_error.png'; + icon = 'ic_s_error'; msg = PMA_messages['strBothLogOff']; } str = '' + PMA_messages['strCurrentSettings'] + '
    '; - str += ' ' + msg + '
    '; + str += ' ' + msg + '
    '; if(logVars['log_output'] != 'TABLE') - str += ' ' + PMA_messages['strLogOutNotTable'] + '
    '; + str += ' ' + PMA_messages['strLogOutNotTable'] + '
    '; else - str += ' ' + PMA_messages['strLogOutIsTable'] + '
    '; + str += ' ' + PMA_messages['strLogOutIsTable'] + '
    '; if(logVars['slow_query_log'] == 'ON') { if(logVars['long_query_time'] > 2) - str += ' ' + str += ' ' + $.sprintf(PMA_messages['strSmallerLongQueryTimeAdvice'], logVars['long_query_time']) + '
    '; if(logVars['long_query_time'] < 2) - str += ' ' + str += ' ' + $.sprintf(PMA_messages['strLongQueryTimeSet'], logVars['long_query_time']) + '
    '; } @@ -1261,27 +1261,47 @@ $(function() { $('#logAnalyseDialog').html( '

    ' + PMA_messages['strSelectedTimeRange'] - + Highcharts.dateFormat('%H:%M:%S',new Date(min)) + ' - ' - + Highcharts.dateFormat('%H:%M:%S',new Date(max)) + '

    ' + + ' - ' + + '

    ' + '' + '' + PMA_messages['strLogAnalyseInfo'] ); + PMA_addDatepicker($('#logAnalyseDialog').find('input[name="dateStart"],input[name="dateEnd"]'), { + showOn: 'focus', + beforeShow: function() { + // Fix wrong timepicker z-index, doesn't work without timeout + setTimeout(function() { + $('#ui-timepicker-div').css('z-index',$('#ui-datepicker-div').css('z-index')) + },0); + } + }); + var dlgBtns = { }; dlgBtns[PMA_messages['strFromSlowLog']] = function() { + var dateStart = Date.parse($('#logAnalyseDialog input[name="dateStart"]').attr('value')) || min; + var dateEnd = Date.parse($('#logAnalyseDialog input[name="dateEnd"]').attr('value')) || max; + loadLogStatistics( - { src: 'slow', start: min, end: max, groupInserts: $('input#groupInserts').attr('checked') } + { src: 'slow', start: dateStart, end: dateEnd, groupInserts: $('input#groupInserts').attr('checked') } ); + + $('#logAnalyseDialog').find('dateStart,dateEnd').datepicker('destroy'); $(this).dialog("close"); } dlgBtns[PMA_messages['strFromGeneralLog']] = function() { + var dateStart = Date.parse($('#logAnalyseDialog input[name="dateStart"]').attr('value')) || min; + var dateEnd = Date.parse($('#logAnalyseDialog input[name="dateEnd"]').attr('value')) || max; + loadLogStatistics( - { src: 'general', start: min, end: max, groupInserts: $('input#groupInserts').attr('checked') } + { src: 'general', start: dateStart, end: dateEnd, groupInserts: $('input#groupInserts').attr('checked') } ); + + $('#logAnalyseDialog').find('dateStart,dateEnd').datepicker('destroy'); $(this).dialog("close"); } @@ -1508,14 +1528,16 @@ $(function() { tableStr += '' + formatValue(cols[j], rows[i][cols[j]]) + ''; tableStr += ''; } - - tableStr+=''; - + + tableStr += ''; + tableStr += 'Sum of grouped rows: '+ data.numRows +'Total:' + data.sum.TOTAL + ''; + tableStr += ''; + $('#logTable').html(tableStr); // Append a tooltip to the count column, if there exist one if($('#logTable th:last').html() == '#') { - $('#logTable th:last').append(' '); + $('#logTable th:last').append(' '); var qtipContent = PMA_messages['strCountColumnExplanation']; if(groupInserts) qtipContent += '

    ' + PMA_messages['strMoreCountColumnExplanation'] + '

    '; @@ -1533,13 +1555,15 @@ $(function() { }) } + + $('div#logTable table').tablesorter({ sortList: [[0,1]], widgets: ['zebra'] }); $('div#logTable table thead th') - .append(''); + .append(''); $('#loadingLogsDialog').html('

    ' + PMA_messages['strLogDataLoaded'] + '

    '); @@ -1549,6 +1573,64 @@ $(function() { $('#loadingLogsDialog').append(key + ': ' + value + '
    '); }); + if(data.numRows > 12) { + $('div#logTable').prepend( + '
    ' + + ' Filters' + + '
    ' + + ' ' + + ' ' + + ((data.numRows > 250) ? ' ' : '') + + '
    ' + + '
    ' + ); + + if(data.numRows > 250) { + $('div#logTable button#startFilterQueryText').click(filterQueries); + } else { + $('div#logTable input#filterQueryText').keyup(filterQueries); + } + + function filterQueries() { + var odd_row=false, cell, textFilter; + var val = $('div#logTable input#filterQueryText').val(); + + if(val.length == 0) textFilter = null; + else textFilter = new RegExp(val, 'i'); + + var rowSum = 0, totalSum = 0; + + $('div#logTable table tbody tr').each(function() { + // We just assume the sql text is always in the second last column + cell = $(this).children(':nth-child(' + (cols.length - 1) + ')'); + + if(textFilter==null || textFilter.exec(cell.text())) { + // And that total count is right of the sql text + totalSum += parseInt(cell.next().text()); + rowSum ++; + + odd_row = !odd_row; + $(this).css('display',''); + if(odd_row) { + $(this).addClass('odd'); + $(this).removeClass('even'); + } else { + $(this).addClass('even'); + $(this).removeClass('odd'); + } + } else { + $(this).css('display','none'); + } + }); + + + $('div#logTable table tfoot tr') + .html('Sum of grouped rows: '+ rowSum +'Total:' + + totalSum + ''); + }; + } + var dlgBtns = {}; dlgBtns[PMA_messages['strJumpToTable']] = function() { $(this).dialog("close"); diff --git a/js/server_synchronize.js b/js/server_synchronize.js index e1645aecae..1dfd3d2387 100644 --- a/js/server_synchronize.js +++ b/js/server_synchronize.js @@ -96,7 +96,8 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem insert_rows.align = "center"; var tick_image = document.createElement("img"); - tick_image.src = pmaThemeImage + "s_success.png"; + tick_image.src = 'themes/dot.gif'; + tick_image.className = "icon ic_s_success"; if (update_size == '' && insert_size == '' && remove_size == '') { /** diff --git a/js/server_variables.js b/js/server_variables.js index e7e469c0e0..e9bc1cf817 100644 --- a/js/server_variables.js +++ b/js/server_variables.js @@ -54,9 +54,9 @@ $(function() { var charWidth; // Global vars - editLink = ' '+PMA_messages['strEdit']+''; - saveLink = ' '+PMA_messages['strSave']+' '; - cancelLink = ' '+PMA_messages['strCancel']+' '; + editLink = ' '+PMA_messages['strEdit']+''; + saveLink = ' '+PMA_messages['strSave']+' '; + cancelLink = ' '+PMA_messages['strCancel']+' '; $.ajaxSetup({ diff --git a/js/sql.js b/js/sql.js index 90f843d328..fb24f5da66 100644 --- a/js/sql.js +++ b/js/sql.js @@ -65,8 +65,8 @@ function appendInlineAnchor() { var $img_object = $cloned_anchor.find('img').attr('title', PMA_messages['strInlineEdit']); if ($img_object.length != 0) { - var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit'); - $img_object.attr('src', img_src); + var img_class = $img_object.attr('class').replace(/b_edit/,'b_inline_edit'); + $img_object.attr('class', img_class); $cloned_anchor.find('a').attr('href', '#'); var $edit_span = $cloned_anchor.find('span:contains("' + PMA_messages['strEdit'] + '")'); var $span = $cloned_anchor.find('a').find('span'); @@ -85,8 +85,8 @@ function appendInlineAnchor() { // the link was too big so is there $img_object = $cloned_anchor.find('input:image').attr('title', PMA_messages['strInlineEdit']); if ($img_object.length > 0) { - var img_src = $img_object.attr('src').replace(/b_edit/,'b_inline_edit'); - $img_object.attr('src', img_src); + var img_class = $img_object.attr('class').replace(/b_edit/,'b_inline_edit'); + $img_object.attr('class', img_class); } $cloned_anchor .find('.clickprevimage') @@ -143,7 +143,7 @@ $(document).ready(function() { .parent() .toggle($(this).attr('value').length > 0); }).trigger('keyup'); - + /** * Attach the {@link appendInlineAnchor} function to a custom event, which * will be triggered manually everytime the table of results is reloaded @@ -152,7 +152,7 @@ $(document).ready(function() { $("#sqlqueryresults").live('appendAnchor',function() { appendInlineAnchor(); }) - + /** * Attach the {@link makegrid} function to a custom event, which will be * triggered manually everytime the table of results is reloaded @@ -161,7 +161,7 @@ $(document).ready(function() { $("#sqlqueryresults").live('makegrid', function() { $('#table_results').makegrid(); }) - + /** * Attach the {@link refreshgrid} function to a custom event, which will be * triggered manually everytime the table of results is manipulated (e.g., by inline edit) @@ -281,10 +281,11 @@ $(document).ready(function() { if ($zero_row_results.length > 0) { $('#sqlquery').val($zero_row_results.val()); } else { - $sqlqueryresults.show(); - $sqlqueryresults.html(data); - $sqlqueryresults.trigger('appendAnchor'); - $sqlqueryresults.trigger('makegrid'); + $sqlqueryresults + .show() + .html(data) + .trigger('appendAnchor') + .trigger('makegrid'); $('#togglequerybox').show(); if ($("#togglequerybox").siblings(":visible").length > 0) { $("#togglequerybox").trigger('click'); @@ -320,14 +321,13 @@ $(document).ready(function() { */ var $form = $(this).parent("form"); - var $sqlqueryresults = $("#sqlqueryresults"); - PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize(), function(data) { - $sqlqueryresults.html(data); - $sqlqueryresults.trigger('appendAnchor'); - $sqlqueryresults.trigger('makegrid'); + $("#sqlqueryresults") + .html(data) + .trigger('appendAnchor') + .trigger('makegrid'); PMA_init_slider(); PMA_ajaxRemoveMessage($msgbox); @@ -341,22 +341,23 @@ $(document).ready(function() { * @see $cfg['AjaxEnable'] */ $("#pageselector").live('change', function(event) { - var $the_form = $(this).parent("form"); + var $form = $(this).parent("form"); if ($(this).hasClass('ajax')) { event.preventDefault(); var $msgbox = PMA_ajaxShowMessage(); - $.post($the_form.attr('action'), $the_form.serialize() + '&ajax_request=true', function(data) { - $("#sqlqueryresults").html(data); - $("#sqlqueryresults").trigger('appendAnchor'); - $("#sqlqueryresults").trigger('makegrid'); + $.post($form.attr('action'), $form.serialize() + '&ajax_request=true', function(data) { + $("#sqlqueryresults") + .html(data) + .trigger('appendAnchor') + .trigger('makegrid'); PMA_init_slider(); PMA_ajaxRemoveMessage($msgbox); }) // end $.post() } else { - $the_form.submit(); + $form.submit(); } })// end Paginate results with Page Selector @@ -444,8 +445,8 @@ $(document).ready(function() { // If icons are displayed. See $cfg['PropertiesIconic'] if ($img_object.length > 0) { $img_object.attr('title', PMA_messages['strSave']); - var img_src = $img_object.attr('src').replace(/b_inline_edit/,'b_save'); - $img_object.attr('src', img_src); + var img_class = $img_object.attr('class').replace(/b_inline_edit/,'b_save'); + $img_object.attr('class', img_class); $this_children.prepend($img_object); } @@ -464,8 +465,8 @@ $(document).ready(function() { // If icons are displayed. See $cfg['PropertiesIconic'] if ($img_object.length > 0) { $img_object.attr('title', PMA_messages['strHide']); - var img_src = $img_object.attr('src').replace(/b_save/,'b_close'); - $img_object.attr('src', img_src); + var img_class = $img_object.attr('class').replace(/b_save/,'b_close'); + $img_object.attr('class', img_class); $hide_span.prepend($img_object); } @@ -496,7 +497,7 @@ $(document).ready(function() { $(this).prev().prev().remove(); $(this).prev().remove(); $(this).remove(); - + // refresh the grid $("#sqlqueryresults").trigger('refreshgrid'); }); @@ -710,10 +711,10 @@ $(document).ready(function() { $this_field.data('original_data', 'NULL'); } }); - + // refresh the grid $("#sqlqueryresults").trigger('refreshgrid'); - + }) // End On click, replace the current field with an input/textarea /** @@ -985,7 +986,7 @@ $(document).ready(function() { }); /** - * Click action for "Go" button in ajax dialog insertForm -> insertRowTable + * Click action for "Go" button in ajax dialog insertForm -> insertRowTable */ $("#insertForm .insertRowTable.ajax input[value=Go]").live('click', function(event) { event.preventDefault(); @@ -1230,7 +1231,9 @@ $(document).ready(function() { * Profiling Chart */ function createProfilingChart() { - if($('#profilingchart').length==0) return; + if ($('#profilingchart').length == 0) { + return; + } var cdata = new Array(); $.each(jQuery.parseJSON($('#profilingchart').html()),function(key,value) { diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index 2f3323ec54..9360b9aae0 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -131,7 +131,7 @@ function PMA_auth() // Defines the charset to be used header('Content-Type: text/html; charset=utf-8'); // Defines the "item" image depending on text direction - $item_img = $GLOBALS['pmaThemeImage'] . 'item_' . $GLOBALS['text_dir'] . '.png'; + $item_img = 'ic_item_' . $GLOBALS['text_dir']; /* HTML header; do not show here the PMA version to improve security */ $page_title = 'phpMyAdmin '; @@ -198,7 +198,7 @@ if (top != self) { echo ''; if ($GLOBALS['cfg']['ReplaceHelpImg']) { - echo '' . __('phpMyAdmin documentation') . ''; + echo '' . __('phpMyAdmin documentation') . ''; } else { echo '(*)'; } diff --git a/libraries/common.lib.php b/libraries/common.lib.php index b7df61a270..f710b80c4f 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -97,9 +97,9 @@ function PMA_getIcon($icon, $alternate = '', $container = false, $force_text = f $button .= ''; if ($include_icon) { - $button .= '' . $alternate . ''; + . ' class="icon ic_' . str_replace('.png','',$icon) . '" />'; } if ($include_icon && $include_text) { @@ -393,9 +393,9 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju if ($just_open) { return ''; } elseif ($big_icon) { - return '' . __('Documentation') . ''; + return '' . __('Documentation') . ''; } elseif ($GLOBALS['cfg']['ReplaceHelpImg']) { - return '' . __('Documentation') . ''; + return '' . __('Documentation') . ''; } else { return '[' . __('Documentation') . ']'; } @@ -412,7 +412,7 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju */ function PMA_showDocu($anchor) { if ($GLOBALS['cfg']['ReplaceHelpImg']) { - return '' . __('Documentation') . ''; + return '' . __('Documentation') . ''; } else { return '[' . __('Documentation') . ']'; } @@ -430,7 +430,7 @@ function PMA_showPHPDocu($target) { $url = PMA_getPHPDocLink($target); if ($GLOBALS['cfg']['ReplaceHelpImg']) { - return '' . __('Documentation') . ''; + return '' . __('Documentation') . ''; } else { return '[' . __('Documentation') . ']'; } @@ -474,8 +474,7 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice') // footnotemarker used in js/tooltip.js return '' . $nr . '' . - ''; + ''; } /** @@ -1506,7 +1505,7 @@ function PMA_localisedDate($timestamp = -1, $format = '') * @return string html code for one tab, a link if valid otherwise a span * @access public */ -function PMA_generate_html_tab($tab, $url_params = array()) +function PMA_generate_html_tab($tab, $url_params = array(), $base_dir='') { // default values $defaults = array( @@ -1568,8 +1567,8 @@ function PMA_generate_html_tab($tab, $url_params = array()) // avoid generating an alt tag, because it only illustrates // the text that follows and if browser does not display // images, the text is duplicated - $image = '%2$s'; + $image = '%2$s'; $tab['text'] = sprintf($image, htmlentities($tab['icon']), $tab['text']); } // check to not display an empty link-text @@ -1604,7 +1603,7 @@ function PMA_generate_html_tab($tab, $url_params = array()) * @param string $url_params * @return string html-code for tab-navigation */ -function PMA_generate_html_tabs($tabs, $url_params) +function PMA_generate_html_tabs($tabs, $url_params, $base_dir='') { $tag_id = 'topmenu'; $tab_navigation = @@ -1612,7 +1611,7 @@ function PMA_generate_html_tabs($tabs, $url_params) .'