Leading ./ paths for links and favicons can be omitted, part 1

This commit is contained in:
Jo Michael 2012-03-16 23:04:12 +01:00
parent af0e6c71e7
commit 3b56f6a53b
23 changed files with 43 additions and 43 deletions

View File

@ -5,8 +5,8 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
version="-//W3C//DTD XHTML 1.1//EN" dir="ltr">
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta charset="utf-8" />
<title>phpMyAdmin 4.0.0-dev - Documentation</title>
<link rel="stylesheet" type="text/css" href="docs.css" />

View File

@ -558,7 +558,7 @@ echo __('Remove database');
if ($GLOBALS['cfg']['AjaxEnable']) {
echo ' class="ajax" ';
}
echo 'method="post" action="./db_operations.php">'
echo 'method="post" action="db_operations.php">'
. PMA_generate_common_hidden_inputs($db, $table)
. '<fieldset>' . "\n"
. ' <legend>';

View File

@ -644,7 +644,7 @@ echo '<p>';
echo '<a href="db_printview.php?' . $url_query . '">';
echo PMA_getIcon('b_print.png', __('Print view'), true) . '</a>';
echo '<a href="./db_datadict.php?' . $url_query . '">';
echo '<a href="db_datadict.php?' . $url_query . '">';
echo PMA_getIcon('b_tblanalyse.png', __('Data Dictionary'), true) . '</a>';
echo '</p>';

View File

@ -78,8 +78,8 @@ require './libraries/header_http.inc.php';
lang="<?php echo $lang_iso_code; ?>"
dir="<?php echo $GLOBALS['text_dir']; ?>">
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>phpMyAdmin <?php echo PMA_VERSION; ?> -
<?php echo htmlspecialchars($HTTP_HOST); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

View File

@ -198,7 +198,7 @@ if (top != self) {
<legend>
<?php
echo __('Log in');
echo '<a href="./Documentation.html" target="documentation" ' .
echo '<a href="Documentation.html" target="documentation" ' .
'title="' . __('phpMyAdmin documentation') . '"> ';
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
echo PMA_getImage('b_help.png', __('phpMyAdmin documentation'));

View File

@ -115,7 +115,7 @@ function Swekey_auth_error()
if (count($_SESSION['SWEKEY']['VALID_SWEKEYS']) == 0)
return sprintf(__('File %s does not contain any key id'), $GLOBALS['cfg']['Server']['auth_swekey_config']);
include_once "./libraries/auth/swekey/swekey.php";
include_once "libraries/auth/swekey/swekey.php";
Swekey_SetCheckServer($_SESSION['SWEKEY']['CONF_SERVER_CHECK']);
Swekey_SetRndTokenServer($_SESSION['SWEKEY']['CONF_SERVER_RNDTOKEN']);

View File

@ -146,7 +146,7 @@ function PMA_buildHtmlForDb($current, $is_superuser, $checkall, $url_query, $col
$out .= '<td class="tool">'
. '<a onclick="'
. 'if (window.parent.setDb) window.parent.setDb(\'' . PMA_jsFormat($current['SCHEMA_NAME']) . '\');'
. '" href="./server_privileges.php?' . $url_query
. '" href="server_privileges.php?' . $url_query
. '&amp;checkprivs=' . urlencode($current['SCHEMA_NAME'])
. '" title="' . sprintf(__('Check privileges for database &quot;%s&quot;.'), htmlspecialchars($current['SCHEMA_NAME']))
. '">'

View File

@ -929,7 +929,7 @@ function PMA_removeBackquote($a_name)
*/
function PMA_whichCrlf()
{
// The 'PMA_USR_OS' constant is defined in "./libraries/Config.class.php"
// The 'PMA_USR_OS' constant is defined in "libraries/Config.class.php"
// Win case
if (PMA_USR_OS == 'Win') {
$the_crlf = "\r\n";
@ -2500,7 +2500,7 @@ function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_cou
. $frame . '">' . $caption2 . '</a>';
}
echo "\n", '<form action="./', basename($script), '" method="post" target="', $frame, '">', "\n";
echo "\n", '<form action="', basename($script), '" method="post" target="', $frame, '">', "\n";
echo PMA_generate_common_hidden_inputs($_url_params);
echo PMA_pageselector(
$max_count,

View File

@ -704,9 +704,9 @@ function PMA_linkURL($url)
function PMA_includeJS($url)
{
if (strpos($url, '?') === false) {
return '<script src="./js/' . $url . '?ts=' . filemtime('./js/' . $url) . '" type="text/javascript"></script>' . "\n";
return '<script src="js/' . $url . '?ts=' . filemtime('./js/' . $url) . '" type="text/javascript"></script>' . "\n";
} else {
return '<script src="./js/' . $url . '" type="text/javascript"></script>' . "\n";
return '<script src="js/' . $url . '" type="text/javascript"></script>' . "\n";
}
}

View File

@ -35,8 +35,8 @@ if ($GLOBALS['text_dir'] == 'ltr') {
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
<head>
<meta charset="utf-8" />
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title><?php
if (!empty($page_title)) {
echo htmlspecialchars($page_title);

View File

@ -43,8 +43,8 @@ if ($text_dir == 'ltr') {
<head>
<meta charset="utf-8" />
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title><?php echo __('SQL result'); ?> - phpMyAdmin <?php echo PMA_VERSION ?></title>
<link rel="stylesheet" type="text/css" href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&amp;js_frame=print&amp;nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
<?php

View File

@ -502,7 +502,7 @@ class PMA_User_Schema
{
global $with_field_names, $db;
?>
<script type="text/javascript" src="./js/dom-drag.js"></script>
<script type="text/javascript" src="js/dom-drag.js"></script>
<form method="post" action="schema_edit.php" name="dragdrop">
<input type="button" name="dragdrop" value="<?php echo __('Toggle scratchboard'); ?>" onclick="ToggleDragDrop('pdflayout');" />
<input type="button" name="dragdropreset" value="<?php echo __('Reset'); ?>" onclick="resetDrag();" />
@ -613,7 +613,7 @@ class PMA_User_Schema
PMA_DBI_select_db($db);
include "./libraries/schema/" . ucfirst($export_type) . "_Relation_Schema.class.php";
include "libraries/schema/" . ucfirst($export_type) . "_Relation_Schema.class.php";
$obj_schema = eval("new PMA_" . ucfirst($export_type) . "_Relation_Schema();");
}

View File

@ -387,11 +387,11 @@ function PMA_sqlQueryFormBookmark()
echo '<div class="formelement">' . "\n";
echo __('Variable');
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
echo ' <a href="./Documentation.html#faqbookmark"'
echo ' <a href="Documentation.html#faqbookmark"'
.' target="documentation">'
. PMA_getImage('b_help.png', __('Documentation')) . '</a>';
} else {
echo ' (<a href="./Documentation.html#faqbookmark"'
echo ' (<a href="Documentation.html#faqbookmark"'
.' target="documentation">' . __('Documentation') . '</a>): ';
}
echo '<input type="text" name="bookmark_variable" class="textfield"'

View File

@ -64,7 +64,7 @@ function PMA_validateSQL($sql)
if ($cfg['SQLValidator']['use']) {
if (isset($GLOBALS['sqlvalidator_error'])
&& $GLOBALS['sqlvalidator_error']) {
$str = sprintf(__('The SQL validator could not be initialized. Please check if you have installed the necessary PHP extensions as described in the %sdocumentation%s.'), '<a href="./Documentation.html#faqsqlvalidator" target="documentation">', '</a>');
$str = sprintf(__('The SQL validator could not be initialized. Please check if you have installed the necessary PHP extensions as described in the %sdocumentation%s.'), '<a href="Documentation.html#faqsqlvalidator" target="documentation">', '</a>');
} else {
// create new class instance
$srv = new PMA_SQLValidator();

View File

@ -549,7 +549,7 @@ for ($i = 0; $i < $num_fields; $i++) {
} // end for
?>
<script src="./js/keyhandler.js" type="text/javascript"></script>
<script src="js/keyhandler.js" type="text/javascript"></script>
<script type="text/javascript">
// <![CDATA[
var switch_movement = 0;

View File

@ -95,8 +95,8 @@ require_once './libraries/header_http.inc.php';
dir="<?php echo $GLOBALS['text_dir']; ?>">
<head>
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<title>phpMyAdmin</title>
<meta charset="utf-8" />
<base target="frame_content" />

View File

@ -21,7 +21,7 @@ $cfgRelation = PMA_getRelationsParam();
require_once './libraries/transformations.lib.php';
require_once './libraries/Index.class.php';
require_once "./libraries/schema/Export_Relation_Schema.class.php";
require_once "libraries/schema/Export_Relation_Schema.class.php";
/**
* get all the export options and verify
@ -38,5 +38,5 @@ $path = PMA_securePath(ucfirst($export_type));
if (!file_exists('./libraries/schema/' . $path . '_Relation_Schema.class.php')) {
PMA_Export_Relation_Schema::dieSchema($_POST['chpage'], $export_type, __('File doesn\'t exist'));
}
require "./libraries/schema/".$path."_Relation_Schema.class.php";
require "libraries/schema/".$path."_Relation_Schema.class.php";
$obj_schema = eval("new PMA_".$path."_Relation_Schema();");

View File

@ -130,7 +130,7 @@ if ($pos > 0) {
$this_url_params['pos'] = $pos - $GLOBALS['cfg']['MaxRows'];
}
echo '<a href="./server_binlog.php' . PMA_generate_common_url($this_url_params) . '"';
echo '<a href="server_binlog.php' . PMA_generate_common_url($this_url_params) . '"';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
echo ' title="' . _pgettext('Previous page', 'Previous') . '">';
} else {
@ -146,7 +146,7 @@ if ($pos > 0) {
if ($dontlimitchars) {
unset($this_url_params['dontlimitchars']);
?>
<a href="./server_binlog.php<?php echo PMA_generate_common_url($this_url_params); ?>"
<a href="server_binlog.php<?php echo PMA_generate_common_url($this_url_params); ?>"
title="<?php __('Truncate Shown Queries'); ?>">
<img src="<?php echo $pmaThemeImage; ?>s_partialtext.png"
alt="<?php echo __('Truncate Shown Queries'); ?>" /></a>
@ -154,7 +154,7 @@ if ($dontlimitchars) {
} else {
$this_url_params['dontlimitchars'] = 1;
?>
<a href="./server_binlog.php<?php echo PMA_generate_common_url($this_url_params); ?>"
<a href="server_binlog.php<?php echo PMA_generate_common_url($this_url_params); ?>"
title="<?php __('Show Full Queries'); ?>">
<img src="<?php echo $pmaThemeImage; ?>s_fulltext.png"
alt="<?php echo __('Show Full Queries'); ?>" /></a>
@ -165,7 +165,7 @@ if ($dontlimitchars) {
if ($num_rows >= $GLOBALS['cfg']['MaxRows']) {
$this_url_params = $url_params;
$this_url_params['pos'] = $pos + $GLOBALS['cfg']['MaxRows'];
echo ' - <a href="./server_binlog.php' . PMA_generate_common_url($this_url_params) . '"';
echo ' - <a href="server_binlog.php' . PMA_generate_common_url($this_url_params) . '"';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
echo ' title="' . _pgettext('Next page', 'Next') . '">';
} else {

View File

@ -161,7 +161,7 @@ if ($databases_count > 0) {
$_url_params['pos'] = $pos;
echo '<form action="./server_databases.php" method="post" name="dbStatsForm" id="dbStatsForm">' . "\n"
echo '<form action="server_databases.php" method="post" name="dbStatsForm" id="dbStatsForm">' . "\n"
. PMA_generate_common_hidden_inputs($_url_params);
$_url_params['sort_by'] = 'SCHEMA_NAME';
@ -171,7 +171,7 @@ if ($databases_count > 0) {
. '<thead>' . "\n"
. '<tr>' . "\n"
. ($is_superuser || $cfg['AllowUserDropDatabase'] ? ' <th></th>' . "\n" : '')
. ' <th><a href="./server_databases.php' . PMA_generate_common_url($_url_params) . '">' . "\n"
. ' <th><a href="server_databases.php' . PMA_generate_common_url($_url_params) . '">' . "\n"
. ' ' . __('Database') . "\n"
. ($sort_by == 'SCHEMA_NAME' ? ' ' . PMA_getImage('s_' . $sort_order . '.png', ($sort_order == 'asc' ? __('Ascending') : __('Descending'))) . "\n" : '')
. ' </a></th>' . "\n";
@ -188,7 +188,7 @@ if ($databases_count > 0) {
$_url_params['sort_by'] = $stat_name;
$_url_params['sort_order'] = ($sort_by == $stat_name && $sort_order == 'desc') ? 'asc' : 'desc';
echo ' <th' . $colspan . '>'
.'<a href="./server_databases.php' . PMA_generate_common_url($_url_params) . '">' . "\n"
.'<a href="server_databases.php' . PMA_generate_common_url($_url_params) . '">' . "\n"
.' ' . $stat['disp_name'] . "\n"
.($sort_by == $stat_name ? ' ' . PMA_getImage('s_' . $sort_order . '.png', ($sort_order == 'asc' ? __('Ascending') : __('Descending'))) . "\n" : '')
.' </a></th>' . "\n";
@ -275,9 +275,9 @@ if ($databases_count > 0) {
if ($is_superuser || $cfg['AllowUserDropDatabase']) {
$common_url_query = PMA_generate_common_url(array('sort_by' => $sort_by, 'sort_order' => $sort_order, 'dbstats' => $dbstats));
echo '<img class="selectallarrow" src="' . $pmaThemeImage . 'arrow_' . $text_dir . '.png" width="38" height="22" alt="' . __('With selected:') . '" />' . "\n"
. '<a href="./server_databases.php' . $common_url_query . '&amp;checkall=1" onclick="if (markAllRows(\'tabledatabases\')) return false;">' . "\n"
. '<a href="server_databases.php' . $common_url_query . '&amp;checkall=1" onclick="if (markAllRows(\'tabledatabases\')) return false;">' . "\n"
. ' ' . __('Check All') . '</a> / ' . "\n"
. '<a href="./server_databases.php' . $common_url_query . '" onclick="if (unMarkAllRows(\'tabledatabases\')) return false;">' . "\n"
. '<a href="server_databases.php' . $common_url_query . '" onclick="if (unMarkAllRows(\'tabledatabases\')) return false;">' . "\n"
. ' ' . __('Uncheck All') . '</a>' . "\n"
. '<i>' . __('With selected:') . '</i>' . "\n";
PMA_buttonOrImage('drop_selected_dbs', 'mult_submit', 'drop_selected_dbs', __('Drop'), 'b_deltbl.png');
@ -285,7 +285,7 @@ if ($databases_count > 0) {
if (empty($dbstats)) {
echo '<ul><li id="li_switch_dbstats"><strong>' . "\n";
echo ' <a href="./server_databases.php?' . $url_query . '&amp;dbstats=1"'
echo ' <a href="server_databases.php?' . $url_query . '&amp;dbstats=1"'
.' title="' . __('Enable Statistics') . '">' . "\n"
.' ' . __('Enable Statistics');
echo '</a></strong><br />' . "\n";

View File

@ -69,7 +69,7 @@ if (empty($_REQUEST['engine'])
? ' disabled'
: '')
. '">' . "\n"
. ' <td><a href="./server_engines.php'
. ' <td><a href="server_engines.php'
. PMA_generate_common_url(array('engine' => $engine)) . '">' . "\n"
. ' ' . htmlspecialchars($details['Engine']) . "\n"
. ' </a></td>' . "\n"
@ -106,7 +106,7 @@ if (empty($_REQUEST['engine'])
if (empty($_REQUEST['page'])) {
echo ' <strong>' . __('Variables') . '</strong>' . "\n";
} else {
echo ' <a href="./server_engines.php'
echo ' <a href="server_engines.php'
. PMA_generate_common_url(array('engine' => $_REQUEST['engine'])) . '">'
. __('Variables') . '</a>' . "\n";
}
@ -115,7 +115,7 @@ if (empty($_REQUEST['engine'])
if (isset($_REQUEST['page']) && $_REQUEST['page'] == $current) {
echo ' <strong>' . $label . '</strong>' . "\n";
} else {
echo ' <a href="./server_engines.php'
echo ' <a href="server_engines.php'
. PMA_generate_common_url(
array('engine' => $_REQUEST['engine'], 'page' => $current))
. '">' . htmlspecialchars($label) . '</a>' . "\n";

View File

@ -234,7 +234,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 &&
?>
<!-- Set on key handler for moving using by Ctrl+arrows -->
<script src="./js/keyhandler.js" type="text/javascript"></script>
<script src="js/keyhandler.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
var switch_movement = 0;

View File

@ -144,7 +144,7 @@ if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
// end preparing form values
?>
<form action="./tbl_indexes.php" method="post" name="index_frm" id="index_frm" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?>
<form action="tbl_indexes.php" method="post" name="index_frm" id="index_frm" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?>
onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') {
this.elements['index[Key_name]'].disabled = false}">
<?php

View File

@ -697,7 +697,7 @@ if (! $tbl_is_view && ! $db_is_information_schema && 'ARCHIVE' != $tbl_type) {
echo PMA_Index::getView($table, $db);
?>
<fieldset class="tblFooters" style="text-align: left;">
<form action="./tbl_indexes.php" method="post">
<form action="tbl_indexes.php" method="post">
<?php
echo PMA_generate_common_hidden_inputs($db, $table);
echo sprintf(__('Create an index on &nbsp;%s&nbsp;columns'),