Git
Threads by month
- ----- 2025 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
August 2011
- 8 participants
- 476 discussions

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13256-g9998646
by Michal Čihař 05 Aug '11
by Michal Čihař 05 Aug '11
05 Aug '11
The branch, master has been updated
via 99986466008f4729f29b990b440afc1c9693b220 (commit)
from 4afb63d08f3814bf9769752ef7eb57944612247d (commit)
- Log -----------------------------------------------------------------
commit 99986466008f4729f29b990b440afc1c9693b220
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:46:59 2011 +0200
Add some docblocks
-----------------------------------------------------------------------
Summary of changes:
libraries/display_tbl.lib.php | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index d2bb7de..797a3eb 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -206,7 +206,6 @@ function PMA_isSelect()
/**
* Displays a navigation button
*
- *
* @param string $caption iconic caption for button
* @param string $title text for button
* @param integer $pos position for next query
@@ -215,6 +214,8 @@ function PMA_isSelect()
* @param string $input_for_real_end optional hidden field for special treatment
* @param string $onclick optional onclick clause
*
+ * @return nothing
+ *
* @global string $db the database name
* @global string $table the table name
* @global string $goto the URL to go back in case of errors
@@ -260,6 +261,8 @@ function PMA_displayTableNavigationOneButton($caption, $title, $pos, $html_sql_q
* @param string $sql_query the URL-encoded query
* @param string $id_for_direction_dropdown the id for the direction dropdown
*
+ * @return nothing
+ *
* @global string $db the database name
* @global string $table the table name
* @global string $goto the URL to go back in case of errors
@@ -467,10 +470,13 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
/**
* Displays the headers of the results table
*
- * @param array which elements to display
- * @param array the list of fields properties
- * @param integer the total number of fields returned by the SQL query
- * @param array the analyzed query
+ * @param array &$is_display which elements to display
+ * @param array &$fields_meta the list of fields properties
+ * @param integer $fields_cnt the total number of fields returned by the SQL query
+ * @param array $analyzed_sql the analyzed query
+ * @param string $sort_expression sort expression
+ * @param string $sort_expression_nodirection sort expression without direction
+ * @param string $sort_direction sort direction
*
* @return boolean $clause_is_unique
*
@@ -1099,6 +1105,7 @@ function PMA_buildNullDisplay($class, $condition_field)
*
* @param string $class class of table cell
* @param bool $condition_field whether to add CSS class condition
+ * @param object $meta the meta-information about this field
* @param string $align cell allignment
*
* @return string the td
@@ -1116,7 +1123,7 @@ function PMA_buildEmptyDisplay($class, $condition_field, $meta, $align = '')
* @param bool $condition_field whether to add CSS class condition
* @param object $meta the meta-information about this field
* @param string $nowrap avoid wrapping
- * @param bool $is_field_truncated is field truncated (display ...)
+ * @param bool $is_field_truncated is field truncated (display ...)
* @param string $transform_function transformation function
* @param string $default_function default transformation function
*
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13255-g4afb63d
by Michal Čihař 05 Aug '11
by Michal Čihař 05 Aug '11
05 Aug '11
The branch, master has been updated
via 4afb63d08f3814bf9769752ef7eb57944612247d (commit)
from 37ec6cae8496c3a5ce4719a611fafae8059581e6 (commit)
- Log -----------------------------------------------------------------
commit 4afb63d08f3814bf9769752ef7eb57944612247d
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:31:36 2011 +0200
Upgrade to jQuery 1.6.2
This should be compatible with 1.6.1 and my tests show no problems.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 +-
index.php | 2 +-
js/jquery/{jquery-1.6.1.js => jquery-1.6.2.js} | 415 +++++++++++++-----------
libraries/common.inc.php | 2 +-
navigation.php | 2 +-
setup/index.php | 2 +-
6 files changed, 235 insertions(+), 190 deletions(-)
rename js/jquery/{jquery-1.6.1.js => jquery-1.6.2.js} (96%)
diff --git a/ChangeLog b/ChangeLog
index 265e924..ca7feb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,7 @@ phpMyAdmin - ChangeLog
3.5.0.0 (not yet released)
+ rfe #2021981 [interface] Add support for mass prefix change.
+ "up to date" message on main page when current version is up to date
-+ Update to jQuery 1.6.1
++ Update to jQuery 1.6.2
+ Patch #3256122 [search] Show/hide db search results
+ Patch #3302354 Add gettext wrappers around a message
+ Remove deprecated function PMA_DBI_get_fields
diff --git a/index.php b/index.php
index cb5eb63..5e0fa36 100644
--- a/index.php
+++ b/index.php
@@ -132,7 +132,7 @@ include ('./libraries/header_http.inc.php');
// ]]>
</script>
<?php
-echo PMA_includeJS('jquery/jquery-1.6.1.js');
+echo PMA_includeJS('jquery/jquery-1.6.2.js');
echo PMA_includeJS('update-location.js');
echo PMA_includeJS('common.js');
?>
diff --git a/js/jquery/jquery-1.6.1.js b/js/jquery/jquery-1.6.2.js
similarity index 96%
rename from js/jquery/jquery-1.6.1.js
rename to js/jquery/jquery-1.6.2.js
index 5d5a1d5..f3201aa 100644
--- a/js/jquery/jquery-1.6.1.js
+++ b/js/jquery/jquery-1.6.2.js
@@ -1,5 +1,5 @@
/*!
- * jQuery JavaScript Library v1.6.1
+ * jQuery JavaScript Library v1.6.2
* http://jquery.com/
*
* Copyright 2011, John Resig
@@ -11,7 +11,7 @@
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
- * Date: Thu May 12 15:04:36 2011 -0400
+ * Date: Thu Jun 30 14:16:56 2011 -0400
*/
(function( window, undefined ) {
@@ -65,6 +65,14 @@ var jQuery = function( selector, context ) {
rmsie = /(msie) ([\w.]+)/,
rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+ // Matches dashed string for camelizing
+ rdashAlpha = /-([a-z])/ig,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return letter.toUpperCase();
+ },
+
// Keep a UserAgent string for use with jQuery.browser
userAgent = navigator.userAgent,
@@ -204,7 +212,7 @@ jQuery.fn = jQuery.prototype = {
selector: "",
// The current version of jQuery being used
- jquery: "1.6.1",
+ jquery: "1.6.2",
// The default length of a jQuery object is 0
length: 0,
@@ -603,6 +611,12 @@ jQuery.extend({
}
},
+ // Converts a dashed string to camelCased string;
+ // Used by both the css and data modules
+ camelCase: function( string ) {
+ return string.replace( rdashAlpha, fcamelCase );
+ },
+
nodeName: function( elem, name ) {
return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
},
@@ -799,7 +813,7 @@ jQuery.extend({
},
// Mutifunctional method to get and set values to a collection
- // The value/s can be optionally by executed if its a function
+ // The value/s can optionally be executed if it's a function
access: function( elems, key, value, exec, fn, pass ) {
var length = elems.length;
@@ -930,7 +944,6 @@ function doScrollCheck() {
jQuery.ready();
}
-// Expose jQuery to the global object
return jQuery;
})();
@@ -1147,7 +1160,9 @@ jQuery.support = (function() {
support,
fragment,
body,
- bodyStyle,
+ testElementParent,
+ testElement,
+ testElementStyle,
tds,
events,
eventName,
@@ -1241,11 +1256,10 @@ jQuery.support = (function() {
}
if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
- div.attachEvent( "onclick", function click() {
+ div.attachEvent( "onclick", function() {
// Cloning a node shouldn't copy over any
// bound event handlers (IE does this)
support.noCloneEvent = false;
- div.detachEvent( "onclick", click );
});
div.cloneNode( true ).fireEvent( "onclick" );
}
@@ -1270,22 +1284,30 @@ jQuery.support = (function() {
// Figure out if the W3C box model works as expected
div.style.width = div.style.paddingLeft = "1px";
- // We use our own, invisible, body
- body = document.createElement( "body" );
- bodyStyle = {
+ body = document.getElementsByTagName( "body" )[ 0 ];
+ // We use our own, invisible, body unless the body is already present
+ // in which case we use a div (#9239)
+ testElement = document.createElement( body ? "div" : "body" );
+ testElementStyle = {
visibility: "hidden",
width: 0,
height: 0,
border: 0,
- margin: 0,
- // Set background to avoid IE crashes when removing (#9028)
- background: "none"
+ margin: 0
};
- for ( i in bodyStyle ) {
- body.style[ i ] = bodyStyle[ i ];
+ if ( body ) {
+ jQuery.extend( testElementStyle, {
+ position: "absolute",
+ left: -1000,
+ top: -1000
+ });
+ }
+ for ( i in testElementStyle ) {
+ testElement.style[ i ] = testElementStyle[ i ];
}
- body.appendChild( div );
- documentElement.insertBefore( body, documentElement.firstChild );
+ testElement.appendChild( div );
+ testElementParent = body || documentElement;
+ testElementParent.insertBefore( testElement, testElementParent.firstChild );
// Check if a disconnected checkbox will retain its checked
// value of true after appended to the DOM (IE6/7)
@@ -1344,8 +1366,8 @@ jQuery.support = (function() {
}
// Remove the body element we added
- body.innerHTML = "";
- documentElement.removeChild( body );
+ testElement.innerHTML = "";
+ testElementParent.removeChild( testElement );
// Technique from Juriy Zaytsev
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-bro…
@@ -1369,6 +1391,9 @@ jQuery.support = (function() {
}
}
+ // Null connected elements to avoid leaks in IE
+ testElement = fragment = select = opt = body = marginDiv = div = input = null;
+
return support;
})();
@@ -1486,7 +1511,10 @@ jQuery.extend({
return thisCache[ internalKey ] && thisCache[ internalKey ].events;
}
- return getByName ? thisCache[ jQuery.camelCase( name ) ] : thisCache;
+ return getByName ?
+ // Check for both converted-to-camel and non-converted data property names
+ thisCache[ jQuery.camelCase( name ) ] || thisCache[ name ] :
+ thisCache;
},
removeData: function( elem, name, pvt /* Internal Use Only */ ) {
@@ -1882,7 +1910,7 @@ var rclass = /[\n\t\r]/g,
rfocusable = /^(?:button|input|object|select|textarea)$/i,
rclickable = /^a(?:rea)?$/i,
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- rinvalidChar = /\:/,
+ rinvalidChar = /\:|^on/,
formHook, boolHook;
jQuery.fn.extend({
@@ -1912,30 +1940,31 @@ jQuery.fn.extend({
},
addClass: function( value ) {
+ var classNames, i, l, elem,
+ setClass, c, cl;
+
if ( jQuery.isFunction( value ) ) {
- return this.each(function(i) {
- var self = jQuery(this);
- self.addClass( value.call(this, i, self.attr("class") || "") );
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call(this, j, this.className) );
});
}
if ( value && typeof value === "string" ) {
- var classNames = (value || "").split( rspace );
+ classNames = value.split( rspace );
- for ( var i = 0, l = this.length; i < l; i++ ) {
- var elem = this[i];
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
if ( elem.nodeType === 1 ) {
- if ( !elem.className ) {
+ if ( !elem.className && classNames.length === 1 ) {
elem.className = value;
} else {
- var className = " " + elem.className + " ",
- setClass = elem.className;
+ setClass = " " + elem.className + " ";
- for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
- if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
- setClass += " " + classNames[c];
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+ setClass += classNames[ c ] + " ";
}
}
elem.className = jQuery.trim( setClass );
@@ -1948,24 +1977,25 @@ jQuery.fn.extend({
},
removeClass: function( value ) {
- if ( jQuery.isFunction(value) ) {
- return this.each(function(i) {
- var self = jQuery(this);
- self.removeClass( value.call(this, i, self.attr("class")) );
+ var classNames, i, l, elem, className, c, cl;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call(this, j, this.className) );
});
}
if ( (value && typeof value === "string") || value === undefined ) {
- var classNames = (value || "").split( rspace );
+ classNames = (value || "").split( rspace );
- for ( var i = 0, l = this.length; i < l; i++ ) {
- var elem = this[i];
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
if ( elem.nodeType === 1 && elem.className ) {
if ( value ) {
- var className = (" " + elem.className + " ").replace(rclass, " ");
- for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
- className = className.replace(" " + classNames[c] + " ", " ");
+ className = (" " + elem.className + " ").replace( rclass, " " );
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ className = className.replace(" " + classNames[ c ] + " ", " ");
}
elem.className = jQuery.trim( className );
@@ -1984,9 +2014,8 @@ jQuery.fn.extend({
isBool = typeof stateVal === "boolean";
if ( jQuery.isFunction( value ) ) {
- return this.each(function(i) {
- var self = jQuery(this);
- self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
+ return this.each(function( i ) {
+ jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
});
}
@@ -2040,7 +2069,13 @@ jQuery.fn.extend({
return ret;
}
- return (elem.value || "").replace(rreturn, "");
+ ret = elem.value;
+
+ return typeof ret === "string" ?
+ // handle most common string cases
+ ret.replace(rreturn, "") :
+ // handle cases where value is null/undef or number
+ ret == null ? "" : ret;
}
return undefined;
@@ -2186,20 +2221,23 @@ jQuery.extend({
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
// Normalize the name if needed
- name = notxml && jQuery.attrFix[ name ] || name;
+ if ( notxml ) {
+ name = jQuery.attrFix[ name ] || name;
- hooks = jQuery.attrHooks[ name ];
+ hooks = jQuery.attrHooks[ name ];
- if ( !hooks ) {
- // Use boolHook for boolean attributes
- if ( rboolean.test( name ) &&
- (typeof value === "boolean" || value === undefined || value.toLowerCase() === name.toLowerCase()) ) {
+ if ( !hooks ) {
+ // Use boolHook for boolean attributes
+ if ( rboolean.test( name ) ) {
- hooks = boolHook;
+ hooks = boolHook;
- // Use formHook for forms and if the name contains certain characters
- } else if ( formHook && (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) {
- hooks = formHook;
+ // Use formHook for forms and if the name contains certain characters
+ } else if ( formHook && name !== "className" &&
+ (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) {
+
+ hooks = formHook;
+ }
}
}
@@ -2217,8 +2255,8 @@ jQuery.extend({
return value;
}
- } else if ( hooks && "get" in hooks && notxml ) {
- return hooks.get( elem, name );
+ } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
} else {
@@ -2282,6 +2320,25 @@ jQuery.extend({
0 :
undefined;
}
+ },
+ // Use the value property for back compat
+ // Use the formHook for button elements in IE6/7 (#1954)
+ value: {
+ get: function( elem, name ) {
+ if ( formHook && jQuery.nodeName( elem, "button" ) ) {
+ return formHook.get( elem, name );
+ }
+ return name in elem ?
+ elem.value :
+ null;
+ },
+ set: function( elem, value, name ) {
+ if ( formHook && jQuery.nodeName( elem, "button" ) ) {
+ return formHook.set( elem, value, name );
+ }
+ // Does not return so that setAttribute is also used
+ elem.value = value;
+ }
}
},
@@ -2311,10 +2368,11 @@ jQuery.extend({
var ret, hooks,
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
- // Try to normalize/fix the name
- name = notxml && jQuery.propFix[ name ] || name;
-
- hooks = jQuery.propHooks[ name ];
+ if ( notxml ) {
+ // Fix name and attach hooks
+ name = jQuery.propFix[ name ] || name;
+ hooks = jQuery.propHooks[ name ];
+ }
if ( value !== undefined ) {
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
@@ -2341,7 +2399,7 @@ jQuery.extend({
boolHook = {
get: function( elem, name ) {
// Align boolean attributes with corresponding properties
- return elem[ jQuery.propFix[ name ] || name ] ?
+ return jQuery.prop( elem, name ) ?
name.toLowerCase() :
undefined;
},
@@ -2356,7 +2414,7 @@ boolHook = {
propName = jQuery.propFix[ name ] || name;
if ( propName in elem ) {
// Only set the IDL specifically if it already exists on the element
- elem[ propName ] = value;
+ elem[ propName ] = true;
}
elem.setAttribute( name, name.toLowerCase() );
@@ -2365,24 +2423,6 @@ boolHook = {
}
};
-// Use the value property for back compat
-// Use the formHook for button elements in IE6/7 (#1954)
-jQuery.attrHooks.value = {
- get: function( elem, name ) {
- if ( formHook && jQuery.nodeName( elem, "button" ) ) {
- return formHook.get( elem, name );
- }
- return elem.value;
- },
- set: function( elem, value, name ) {
- if ( formHook && jQuery.nodeName( elem, "button" ) ) {
- return formHook.set( elem, value, name );
- }
- // Does not return so that setAttribute is also used
- elem.value = value;
- }
-};
-
// IE6/7 do not support getting/setting some attributes with get/setAttribute
if ( !jQuery.support.getSetAttribute ) {
@@ -2390,7 +2430,7 @@ if ( !jQuery.support.getSetAttribute ) {
jQuery.attrFix = jQuery.propFix;
// Use this for any attribute on a form in IE6/7
- formHook = jQuery.attrHooks.name = jQuery.valHooks.button = {
+ formHook = jQuery.attrHooks.name = jQuery.attrHooks.title = jQuery.valHooks.button = {
get: function( elem, name ) {
var ret;
ret = elem.getAttributeNode( name );
@@ -2493,8 +2533,7 @@ jQuery.each([ "radio", "checkbox" ], function() {
-var hasOwn = Object.prototype.hasOwnProperty,
- rnamespaces = /\.(.*)$/,
+var rnamespaces = /\.(.*)$/,
rformElems = /^(?:textarea|input|select)$/i,
rperiod = /\./g,
rspaces = / /g,
@@ -2838,7 +2877,7 @@ jQuery.event = {
event.target = elem;
// Clone any incoming data and prepend the event, creating the handler arg list
- data = data ? jQuery.makeArray( data ) : [];
+ data = data != null ? jQuery.makeArray( data ) : [];
data.unshift( event );
var cur = elem,
@@ -3144,34 +3183,27 @@ jQuery.Event.prototype = {
// Checks if an event happened on an element within another element
// Used in jQuery.event.special.mouseenter and mouseleave handlers
var withinElement = function( event ) {
+
// Check if mouse(over|out) are still within the same parent element
- var parent = event.relatedTarget;
+ var related = event.relatedTarget,
+ inside = false,
+ eventType = event.type;
- // set the correct event type
event.type = event.data;
- // Firefox sometimes assigns relatedTarget a XUL element
- // which we cannot access the parentNode property of
- try {
+ if ( related !== this ) {
- // Chrome does something similar, the parentNode property
- // can be accessed but is null.
- if ( parent && parent !== document && !parent.parentNode ) {
- return;
+ if ( related ) {
+ inside = jQuery.contains( this, related );
}
- // Traverse up the tree
- while ( parent && parent !== this ) {
- parent = parent.parentNode;
- }
+ if ( !inside ) {
- if ( parent !== this ) {
- // handle event if we actually just moused on to a non sub-element
jQuery.event.handle.apply( this, arguments );
- }
- // assuming we've left the element since we most likely mousedover a xul element
- } catch(e) { }
+ event.type = eventType;
+ }
+ }
},
// In case of event delegation, we only need to rename the event.type,
@@ -5890,8 +5922,21 @@ function cloneFixAttributes( src, dest ) {
}
jQuery.buildFragment = function( args, nodes, scripts ) {
- var fragment, cacheable, cacheresults,
- doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
+ var fragment, cacheable, cacheresults, doc;
+
+ // nodes may contain either an explicit document object,
+ // a jQuery collection or context object.
+ // If nodes[0] contains a valid object to assign to doc
+ if ( nodes && nodes[0] ) {
+ doc = nodes[0].ownerDocument || nodes[0];
+ }
+
+ // Ensure that an attr object doesn't incorrectly stand in as a document object
+ // Chrome and Firefox seem to allow this to occur and will throw exception
+ // Fixes #8950
+ if ( !doc.createDocumentFragment ) {
+ doc = document;
+ }
// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
// Cloning options loses the selected state, so don't cache them
@@ -5972,7 +6017,7 @@ function fixDefaultChecked( elem ) {
function findInputs( elem ) {
if ( jQuery.nodeName( elem, "input" ) ) {
fixDefaultChecked( elem );
- } else if ( elem.getElementsByTagName ) {
+ } else if ( "getElementsByTagName" in elem ) {
jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
}
}
@@ -6021,6 +6066,8 @@ jQuery.extend({
}
}
+ srcElements = destElements = null;
+
// Return the cloned set
return clone;
},
@@ -6201,10 +6248,8 @@ function evalScript( i, elem ) {
-
var ralpha = /alpha\([^)]*\)/i,
ropacity = /opacity=([^)]*)/,
- rdashAlpha = /-([a-z])/ig,
// fixed for IE9, see #8346
rupper = /([A-Z]|^ms)/g,
rnumpx = /^-?\d+(?:px)?$/i,
@@ -6218,11 +6263,7 @@ var ralpha = /alpha\([^)]*\)/i,
curCSS,
getComputedStyle,
- currentStyle,
-
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- };
+ currentStyle;
jQuery.fn.css = function( name, value ) {
// Setting 'undefined' is a no-op
@@ -6257,13 +6298,14 @@ jQuery.extend({
// Exclude the following css properties to add px
cssNumber: {
- "zIndex": true,
+ "fillOpacity": true,
"fontWeight": true,
- "opacity": true,
- "zoom": true,
"lineHeight": true,
+ "opacity": true,
+ "orphans": true,
"widows": true,
- "orphans": true
+ "zIndex": true,
+ "zoom": true
},
// Add in properties whose names you wish to fix before
@@ -6298,6 +6340,8 @@ jQuery.extend({
// convert relative number strings (+= or -=) to relative numbers. #7345
if ( type === "string" && rrelNum.test( value ) ) {
value = +value.replace( rrelNumFilter, "" ) + parseFloat( jQuery.css( elem, name ) );
+ // Fixes bug #9237
+ type = "number";
}
// If a number was passed in, add 'px' to the (except for certain CSS properties)
@@ -6364,10 +6408,6 @@ jQuery.extend({
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
- },
-
- camelCase: function( string ) {
- return string.replace( rdashAlpha, fcamelCase );
}
});
@@ -6381,44 +6421,21 @@ jQuery.each(["height", "width"], function( i, name ) {
if ( computed ) {
if ( elem.offsetWidth !== 0 ) {
- val = getWH( elem, name, extra );
-
+ return getWH( elem, name, extra );
} else {
jQuery.swap( elem, cssShow, function() {
val = getWH( elem, name, extra );
});
}
- if ( val <= 0 ) {
- val = curCSS( elem, name, name );
-
- if ( val === "0px" && currentStyle ) {
- val = currentStyle( elem, name, name );
- }
-
- if ( val != null ) {
- // Should return "auto" instead of 0, use 0 for
- // temporary backwards-compat
- return val === "" || val === "auto" ? "0px" : val;
- }
- }
-
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
-
- // Should return "auto" instead of 0, use 0 for
- // temporary backwards-compat
- return val === "" || val === "auto" ? "0px" : val;
- }
-
- return typeof val === "string" ? val : val + "px";
+ return val;
}
},
set: function( elem, value ) {
if ( rnumpx.test( value ) ) {
// ignore negative width and height values #1599
- value = parseFloat(value);
+ value = parseFloat( value );
if ( value >= 0 ) {
return value + "px";
@@ -6541,27 +6558,50 @@ if ( document.documentElement.currentStyle ) {
curCSS = getComputedStyle || currentStyle;
function getWH( elem, name, extra ) {
- var which = name === "width" ? cssWidth : cssHeight,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
- if ( extra === "border" ) {
- return val;
- }
+ // Start with offset property
+ var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+ which = name === "width" ? cssWidth : cssHeight;
- jQuery.each( which, function() {
- if ( !extra ) {
- val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0;
+ if ( val > 0 ) {
+ if ( extra !== "border" ) {
+ jQuery.each( which, function() {
+ if ( !extra ) {
+ val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
+ }
+ if ( extra === "margin" ) {
+ val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
+ } else {
+ val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
+ }
+ });
}
- if ( extra === "margin" ) {
- val += parseFloat(jQuery.css( elem, "margin" + this )) || 0;
+ return val + "px";
+ }
- } else {
- val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0;
- }
- });
+ // Fall back to computed then uncomputed css if necessary
+ val = curCSS( elem, name, name );
+ if ( val < 0 || val == null ) {
+ val = elem.style[ name ] || 0;
+ }
+ // Normalize "", auto, and prepare for extra
+ val = parseFloat( val ) || 0;
+
+ // Add padding, border, margin
+ if ( extra ) {
+ jQuery.each( which, function() {
+ val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
+ if ( extra !== "padding" ) {
+ val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
+ }
+ if ( extra === "margin" ) {
+ val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
+ }
+ });
+ }
- return val;
+ return val + "px";
}
if ( jQuery.expr && jQuery.expr.filters ) {
@@ -7957,8 +7997,8 @@ var elemdisplay = {},
],
fxNow,
requestAnimationFrame = window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- window.oRequestAnimationFrame;
+ window.mozRequestAnimationFrame ||
+ window.oRequestAnimationFrame;
jQuery.fn.extend({
show: function( speed, easing, callback ) {
@@ -8272,15 +8312,15 @@ jQuery.extend({
// Queueing
opt.old = opt.complete;
opt.complete = function( noUnmark ) {
+ if ( jQuery.isFunction( opt.old ) ) {
+ opt.old.call( this );
+ }
+
if ( opt.queue !== false ) {
jQuery.dequeue( this );
} else if ( noUnmark !== false ) {
jQuery._unmark( this );
}
-
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
};
return opt;
@@ -8353,7 +8393,7 @@ jQuery.fx.prototype = {
if ( t() && jQuery.timers.push(t) && !timerId ) {
// Use requestAnimationFrame instead of setInterval if available
if ( requestAnimationFrame ) {
- timerId = 1;
+ timerId = true;
raf = function() {
// When timerId gets set to null at any point, this stops
if ( timerId ) {
@@ -8516,7 +8556,8 @@ function defaultDisplay( nodeName ) {
if ( !elemdisplay[ nodeName ] ) {
- var elem = jQuery( "<" + nodeName + ">" ).appendTo( "body" ),
+ var body = document.body,
+ elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
display = elem.css( "display" );
elem.remove();
@@ -8530,14 +8571,15 @@ function defaultDisplay( nodeName ) {
iframe.frameBorder = iframe.width = iframe.height = 0;
}
- document.body.appendChild( iframe );
+ body.appendChild( iframe );
// Create a cacheable copy of the iframe document on first call.
- // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake html
- // document to it, Webkit & Firefox won't allow reusing the iframe document
+ // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+ // document to it; WebKit & Firefox won't allow reusing the iframe document.
if ( !iframeDoc || !iframe.createElement ) {
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
- iframeDoc.write( "<!doctype><html><body></body></html>" );
+ iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
+ iframeDoc.close();
}
elem = iframeDoc.createElement( nodeName );
@@ -8546,7 +8588,7 @@ function defaultDisplay( nodeName ) {
display = jQuery.css( elem, "display" );
- document.body.removeChild( iframe );
+ body.removeChild( iframe );
}
// Store the correct default display
@@ -8867,22 +8909,24 @@ function getWindow( elem ) {
-// Create innerHeight, innerWidth, outerHeight and outerWidth methods
+// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
jQuery.each([ "Height", "Width" ], function( i, name ) {
var type = name.toLowerCase();
// innerHeight and innerWidth
- jQuery.fn["inner" + name] = function() {
- return this[0] ?
- parseFloat( jQuery.css( this[0], type, "padding" ) ) :
+ jQuery.fn[ "inner" + name ] = function() {
+ var elem = this[0];
+ return elem && elem.style ?
+ parseFloat( jQuery.css( elem, type, "padding" ) ) :
null;
};
// outerHeight and outerWidth
- jQuery.fn["outer" + name] = function( margin ) {
- return this[0] ?
- parseFloat( jQuery.css( this[0], type, margin ? "margin" : "border" ) ) :
+ jQuery.fn[ "outer" + name ] = function( margin ) {
+ var elem = this[0];
+ return elem && elem.style ?
+ parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
null;
};
@@ -8932,5 +8976,6 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
});
+// Expose jQuery to the global object
window.jQuery = window.$ = jQuery;
})(window);
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 2b2cf60..5f56352 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -552,7 +552,7 @@ $_REQUEST['js_frame'] = PMA_ifSetOr($_REQUEST['js_frame'], '');
* @global array $js_include
*/
$GLOBALS['js_include'] = array();
-$GLOBALS['js_include'][] = 'jquery/jquery-1.6.1.js';
+$GLOBALS['js_include'][] = 'jquery/jquery-1.6.2.js';
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
$GLOBALS['js_include'][] = 'update-location.js';
diff --git a/navigation.php b/navigation.php
index dad2683..22e4cda 100644
--- a/navigation.php
+++ b/navigation.php
@@ -105,7 +105,7 @@ require_once './libraries/header_http.inc.php';
<link rel="stylesheet" type="text/css"
href="phpmyadmin.css.php?<?php echo PMA_generate_common_url('', ''); ?>&js_frame=left&nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
<?php
- echo PMA_includeJS('jquery/jquery-1.6.1.js');
+ echo PMA_includeJS('jquery/jquery-1.6.2.js');
echo PMA_includeJS('jquery/jquery-ui-1.8.custom.js');
echo PMA_includeJS('navigation.js');
echo PMA_includeJS('functions.js');
diff --git a/setup/index.php b/setup/index.php
index 561679c..99c7847 100644
--- a/setup/index.php
+++ b/setup/index.php
@@ -37,7 +37,7 @@ require './libraries/header_http.inc.php';
<link href="../favicon.ico" rel="icon" type="image/x-icon" />
<link href="../favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="styles.css" rel="stylesheet" type="text/css" />
-<script type="text/javascript" src="../js/jquery/jquery-1.6.1.js"></script>
+<script type="text/javascript" src="../js/jquery/jquery-1.6.2.js"></script>
<script type="text/javascript" src="../js/jquery/jquery-ui-1.8.custom.js"></script>
<script type="text/javascript" src="../js/jquery/jquery.json-2.2.js"></script>
<script type="text/javascript" src="../js/config.js"></script>
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13254-g37ec6ca
by Michal Čihař 05 Aug '11
by Michal Čihař 05 Aug '11
05 Aug '11
The branch, master has been updated
via 37ec6cae8496c3a5ce4719a611fafae8059581e6 (commit)
from 52375334c394f8bbde24d2545ef8b78f5bac42b0 (commit)
- Log -----------------------------------------------------------------
commit 37ec6cae8496c3a5ce4719a611fafae8059581e6
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:23:04 2011 +0200
Add some docblocks
-----------------------------------------------------------------------
Summary of changes:
libraries/display_tbl.lib.php | 102 ++++++++++++++++++++--------------------
1 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index a524767..d2bb7de 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -2551,12 +2551,12 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql)
* Verifies what to do with non-printable contents (binary or BLOB)
* in Browse mode.
*
- * @param string $category BLOB|BINARY|GEOMETRY
- * @param string $content the binary content
- * @param string $transform_function
- * @param string $transform_options
- * @param string $default_function
- * @param object $meta the meta-information about this field
+ * @param string $category BLOB|BINARY|GEOMETRY
+ * @param string $content the binary content
+ * @param string $transform_function transformation function
+ * @param string $transform_options transformation parameters
+ * @param string $default_function default transformation function
+ * @param object $meta the meta-information about this field
* @return mixed string or float
*/
function PMA_handle_non_printable_contents($category, $content, $transform_function, $transform_options, $default_function, $meta, $url_params = array())
@@ -2597,17 +2597,17 @@ function PMA_handle_non_printable_contents($category, $content, $transform_funct
* Prepares the displayable content of a data cell in Browse mode,
* taking into account foreign key description field and transformations
*
- * @param string $class
- * @param string $condition_field
- * @param string $analyzed_sql
- * @param object $meta the meta-information about this field
- * @param string $map
- * @param string $data
- * @param string $transform_function
- * @param string $default_function
- * @param string $nowrap
- * @param string $where_comparison
- * @param bool $is_field_truncated
+ * @param string $class
+ * @param string $condition_field
+ * @param string $analyzed_sql
+ * @param object $meta the meta-information about this field
+ * @param string $map
+ * @param string $data
+ * @param string $transform_function
+ * @param string $default_function
+ * @param string $nowrap
+ * @param string $where_comparison
+ * @param bool $is_field_truncated
* @return string formatted data
*/
function PMA_prepare_row_data($class, $condition_field, $analyzed_sql, $meta, $map, $data, $transform_function, $default_function, $nowrap, $where_comparison, $transform_options, $is_field_truncated )
@@ -2699,13 +2699,13 @@ function PMA_prepare_row_data($class, $condition_field, $analyzed_sql, $meta, $m
/**
* Generates a checkbox for multi-row submits
*
- * @param string $del_url
- * @param array $is_display
- * @param string $row_no
- * @param string $where_clause_html
- * @param string $del_query
- * @param string $id_suffix
- * @param string $class
+ * @param string $del_url
+ * @param array $is_display
+ * @param string $row_no
+ * @param string $where_clause_html
+ * @param string $del_query
+ * @param string $id_suffix
+ * @param string $class
* @return string the generated HTML
*/
@@ -2729,11 +2729,11 @@ function PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_cla
/**
* Generates an Edit link
*
- * @param string $edit_url
- * @param string $class
- * @param string $edit_str
- * @param string $where_clause
- * @param string $where_clause_html
+ * @param string $edit_url
+ * @param string $class
+ * @param string $edit_str
+ * @param string $where_clause
+ * @param string $where_clause_html
* @return string the generated HTML
*/
function PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $where_clause_html)
@@ -2757,10 +2757,10 @@ function PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $wher
/**
* Generates an Copy link
*
- * @param string $copy_url
- * @param string $copy_str
- * @param string $where_clause
- * @param string $where_clause_html
+ * @param string $copy_url
+ * @param string $copy_str
+ * @param string $where_clause
+ * @param string $where_clause_html
* @return string the generated HTML
*/
function PMA_generateCopyLink($copy_url, $copy_str, $where_clause, $where_clause_html, $class)
@@ -2788,10 +2788,10 @@ function PMA_generateCopyLink($copy_url, $copy_str, $where_clause, $where_clause
/**
* Generates a Delete link
*
- * @param string $del_url
- * @param string $del_str
- * @param string $js_conf
- * @param string $class
+ * @param string $del_url
+ * @param string $del_str
+ * @param string $js_conf
+ * @param string $class
* @return string the generated HTML
*/
function PMA_generateDeleteLink($del_url, $del_str, $js_conf, $class)
@@ -2813,20 +2813,20 @@ function PMA_generateDeleteLink($del_url, $del_str, $js_conf, $class)
* Generates checkbox and links at some position (left or right)
* (only called for horizontal mode)
*
- * @param string $position
- * @param string $del_url
- * @param array $is_display
- * @param string $row_no
- * @param string $where_clause
- * @param string $where_clause_html
- * @param string $del_query
- * @param string $id_suffix
- * @param string $edit_url
- * @param string $copy_url
- * @param string $class
- * @param string $edit_str
- * @param string $del_str
- * @param string $js_conf
+ * @param string $position
+ * @param string $del_url
+ * @param array $is_display
+ * @param string $row_no
+ * @param string $where_clause
+ * @param string $where_clause_html
+ * @param string $del_query
+ * @param string $id_suffix
+ * @param string $edit_url
+ * @param string $copy_url
+ * @param string $class
+ * @param string $edit_str
+ * @param string $del_str
+ * @param string $js_conf
* @return string the generated HTML
*/
function PMA_generateCheckboxAndLinks($position, $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, $id_suffix, $edit_url, $copy_url, $class, $edit_str, $copy_str, $del_str, $js_conf)
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13253-g5237533
by Michal Čihař 05 Aug '11
by Michal Čihař 05 Aug '11
05 Aug '11
The branch, master has been updated
via 52375334c394f8bbde24d2545ef8b78f5bac42b0 (commit)
via 5c0ec4b9f30d60a7a0aca94c61085a02320ea5f2 (commit)
via be0989e94443224d90b7c1ae1c655020cebd42a0 (commit)
via 024e164f0255333bd5b2b47849796de44d4b37af (commit)
via b6c6e79dc281e8d96db285086cbc3105bceed8df (commit)
from 64c30e51e7c2ac2dc2041510a1c65d923c3d08e1 (commit)
- Log -----------------------------------------------------------------
commit 52375334c394f8bbde24d2545ef8b78f5bac42b0
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:21:24 2011 +0200
Add some docblocks
commit 5c0ec4b9f30d60a7a0aca94c61085a02320ea5f2
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:17:15 2011 +0200
Reformat docblocks
commit be0989e94443224d90b7c1ae1c655020cebd42a0
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:15:11 2011 +0200
Reformat docblock
commit 024e164f0255333bd5b2b47849796de44d4b37af
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:14:39 2011 +0200
Add doc
commit b6c6e79dc281e8d96db285086cbc3105bceed8df
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:13:40 2011 +0200
Reformat docblock
-----------------------------------------------------------------------
Summary of changes:
libraries/common.lib.php | 16 ++++----
libraries/database_interface.lib.php | 8 ++--
libraries/display_tbl.lib.php | 60 +++++++++++++++++-----------------
libraries/replication.inc.php | 49 ++++++++++++++-------------
libraries/replication_gui.lib.php | 6 ++--
5 files changed, 70 insertions(+), 69 deletions(-)
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index cc89c85..353e775 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -2278,9 +2278,9 @@ function PMA_externalBug($functionality, $component, $minimum_version, $bugref)
* Generates and echoes an HTML checkbox
*
* @param string $html_field_name the checkbox HTML field
- * @param string $label
- * @param boolean $checked is it initially checked?
- * @param boolean $onclick should it submit the form on click?
+ * @param string $label label for checkbox
+ * @param boolean $checked is it initially checked?
+ * @param boolean $onclick should it submit the form on click?
*/
function PMA_display_html_checkbox($html_field_name, $label, $checked, $onclick)
{
@@ -2292,11 +2292,11 @@ function PMA_display_html_checkbox($html_field_name, $label, $checked, $onclick)
* Generates and echoes a set of radio HTML fields
*
* @param string $html_field_name the radio HTML field
- * @param array $choices the choices values and labels
- * @param string $checked_choice the choice to check by default
- * @param boolean $line_break whether to add an HTML line break after a choice
- * @param boolean $escape_label whether to use htmlspecialchars() on label
- * @param string $class enclose each choice with a div of this class
+ * @param array $choices the choices values and labels
+ * @param string $checked_choice the choice to check by default
+ * @param boolean $line_break whether to add an HTML line break after a choice
+ * @param boolean $escape_label whether to use htmlspecialchars() on label
+ * @param string $class enclose each choice with a div of this class
*/
function PMA_display_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true, $escape_label = true, $class='')
{
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php
index 6514393..8877dad 100644
--- a/libraries/database_interface.lib.php
+++ b/libraries/database_interface.lib.php
@@ -70,10 +70,10 @@ require_once './libraries/dbi/' . $GLOBALS['cfg']['Server']['extension'] . '.dbi
/**
* runs a query
*
- * @param string $query
- * @param mixed $link
- * @param int $options
- * @param bool $cache_affected_rows
+ * @param string $query SQL query to execte
+ * @param mixed $link optional database link to use
+ * @param int $options optional query options
+ * @param bool $cache_affected_rows whether to cache affected rows
* @return mixed
*/
function PMA_DBI_query($query, $link = null, $options = 0, $cache_affected_rows = true)
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 454f888..a524767 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -1069,9 +1069,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
/**
* Prepares the display for a value
*
- * @param string $class
- * @param string $condition_field
- * @param string $value
+ * @param string $class class of table cell
+ * @param bool $condition_field whether to add CSS class condition
+ * @param string $value value to display
*
* @return string the td
*/
@@ -1083,8 +1083,8 @@ function PMA_buildValueDisplay($class, $condition_field, $value)
/**
* Prepares the display for a null value
*
- * @param string $class
- * @param string $condition_field
+ * @param string $class class of table cell
+ * @param bool $condition_field whether to add CSS class condition
*
* @return string the td
*/
@@ -1097,9 +1097,9 @@ function PMA_buildNullDisplay($class, $condition_field)
/**
* Prepares the display for an empty value
*
- * @param string $class
- * @param string $condition_field
- * @param string $align
+ * @param string $class class of table cell
+ * @param bool $condition_field whether to add CSS class condition
+ * @param string $align cell allignment
*
* @return string the td
*/
@@ -1112,13 +1112,13 @@ function PMA_buildEmptyDisplay($class, $condition_field, $meta, $align = '')
/**
* Adds the relavant classes.
*
- * @param string $class
- * @param string $condition_field
- * @param object $meta the meta-information about this field
- * @param string $nowrap
- * @param bool $is_field_truncated
- * @param string $transform_function
- * @param string $default_function
+ * @param string $class class of table cell
+ * @param bool $condition_field whether to add CSS class condition
+ * @param object $meta the meta-information about this field
+ * @param string $nowrap avoid wrapping
+ * @param bool $is_field_truncated is field truncated (display ...)
+ * @param string $transform_function transformation function
+ * @param string $default_function default transformation function
*
* @return string the list of classes
*/
@@ -1155,27 +1155,27 @@ function PMA_addClass($class, $condition_field, $meta, $nowrap, $is_field_trunca
/**
* Displays the body of the results table
*
- * @param integer the link id associated to the query which results have
- * to be displayed
- * @param array which elements to display
- * @param array the list of relations
- * @param array the analyzed query
+ * @param integer &$dt_result the link id associated to the query which results have
+ * to be displayed
+ * @param array &$is_display which elements to display
+ * @param array $map the list of relations
+ * @param array $analyzed_sql the analyzed query
*
* @return boolean always true
*
- * @global string $db the database name
- * @global string $table the table name
- * @global string $goto the URL to go back in case of errors
- * @global string $sql_query the SQL query
- * @global array $fields_meta the list of fields properties
- * @global integer $fields_cnt the total number of fields returned by
+ * @global string $db the database name
+ * @global string $table the table name
+ * @global string $goto the URL to go back in case of errors
+ * @global string $sql_query the SQL query
+ * @global array $fields_meta the list of fields properties
+ * @global integer $fields_cnt the total number of fields returned by
* the SQL query
- * @global array $vertical_display informations used with vertical display
+ * @global array $vertical_display informations used with vertical display
* mode
- * @global array $highlight_columns column names to highlight
- * @global array $row current row data
+ * @global array $highlight_columns column names to highlight
+ * @global array $row current row data
*
- * @access private
+ * @access private
*
* @see PMA_displayTable()
*/
diff --git a/libraries/replication.inc.php b/libraries/replication.inc.php
index 7327075..a6b5d99 100644
--- a/libraries/replication.inc.php
+++ b/libraries/replication.inc.php
@@ -150,9 +150,9 @@ function PMA_extract_db_or_table($string, $what = 'db')
}
}
/**
- * @param String $action - possible values: START or STOP
- * @param String $control - default: null, possible values: SQL_THREAD or IO_THREAD or null. If it is set to null, it controls both SQL_THREAD and IO_THREAD
- * @param mixed $link - mysql link
+ * @param string $action possible values: START or STOP
+ * @param string $control default: null, possible values: SQL_THREAD or IO_THREAD or null. If it is set to null, it controls both SQL_THREAD and IO_THREAD
+ * @param mixed $link mysql link
*
* @return mixed output of PMA_DBI_try_query
*/
@@ -171,14 +171,14 @@ function PMA_replication_slave_control($action, $control = null, $link = null)
return PMA_DBI_try_query($action . " SLAVE " . $control . ";", $link);
}
/**
- * @param String $user - replication user on master
- * @param String $password - password for the user
- * @param String $host - master's hostname or IP
- * @param int $port - port, where mysql is running
- * @param array $pos - position of mysql replication, array should contain fields File and Position
- * @param boolean $stop - shall we stop slave?
- * @param boolean $start - shall we start slave?
- * @param mixed $link - mysql link
+ * @param string $user replication user on master
+ * @param string $password password for the user
+ * @param string $host master's hostname or IP
+ * @param int $port port, where mysql is running
+ * @param array $pos position of mysql replication, array should contain fields File and Position
+ * @param bool $stop shall we stop slave?
+ * @param bool $start shall we start slave?
+ * @param mixed $link mysql link
*
* @return output of CHANGE MASTER mysql command
*/
@@ -206,11 +206,11 @@ function PMA_replication_slave_change_master($user, $password, $host, $port, $po
/**
* This function provides connection to remote mysql server
*
- * @param String $user - mysql username
- * @param String $password - password for the user
- * @param String $host - mysql server's hostname or IP
- * @param int $port - mysql remote port
- * @param String $socket - path to unix socket
+ * @param string $user mysql username
+ * @param string $password password for the user
+ * @param string $host mysql server's hostname or IP
+ * @param int $port mysql remote port
+ * @param string $socket path to unix socket
*
* @return mixed $link mysql link on success
*/
@@ -226,7 +226,7 @@ function PMA_replication_connect_to_master($user, $password, $host = null, $port
return PMA_DBI_connect($user, $password, false, $server, true);
}
/**
- * @param $link - mysql link
+ * @param mixed $link mysql link
*
* @return array - containing File and Position in MySQL replication on master server, useful for PMA_replication_slave_change_master
*/
@@ -245,7 +245,7 @@ function PMA_replication_slave_bin_log_master($link = null)
/**
* Get list of replicated databases on master server
*
- * @param mixed mysql link
+ * @param mixed $link mysql link
*
* @return array array of replicated databases
*/
@@ -285,12 +285,13 @@ function PMA_replication_master_replicated_dbs($link = null)
}
/**
* This function provides synchronization of structure and data between two mysql servers.
- * TODO: improve code sharing between the function and synchronization
*
- * @param String $db - name of database, which should be synchronized
- * @param mixed $src_link - link of source server, note: if the server is current PMA server, use null
- * @param mixed $trg_link - link of target server, note: if the server is current PMA server, use null
- * @param boolean $data - if true, then data will be copied as well
+ * @todo improve code sharing between the function and synchronization
+ *
+ * @param string $db name of database, which should be synchronized
+ * @param mixed $src_link link of source server, note: if the server is current PMA server, use null
+ * @param mixed $trg_link link of target server, note: if the server is current PMA server, use null
+ * @param bool $data if true, then data will be copied as well
*/
function PMA_replication_synchronize_db($db, $src_link, $trg_link, $data = true)
@@ -357,7 +358,7 @@ function PMA_replication_synchronize_db($db, $src_link, $trg_link, $data = true)
* INTEGRATION OF STRUCTURE DIFFERENCE CODE
*
*/
- $source_columns = array();
+ $source_columns = array();test/libraries/common/PMA_contains_nonprintable_ascii_test.php:
$target_columns = array();
$alter_str_array = array(array());
$add_column_array = array(array());
diff --git a/libraries/replication_gui.lib.php b/libraries/replication_gui.lib.php
index 91b284f..2f57b2b 100644
--- a/libraries/replication_gui.lib.php
+++ b/libraries/replication_gui.lib.php
@@ -81,9 +81,9 @@ function PMA_replication_gui_changemaster($submitname)
/**
* This function prints out table with replication status.
*
- * @param String type - either master or slave
- * @param boolean $hidden - if true, then default style is set to hidden, default value false
- * @param boolen $title - if true, then title is displayed, default true
+ * @param string $type either master or slave
+ * @param boolean $hidden if true, then default style is set to hidden, default value false
+ * @param boolen $title if true, then title is displayed, default true
*/
function PMA_replication_print_status_table($type, $hidden = false, $title = true)
{
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13248-g64c30e5
by Michal Čihař 05 Aug '11
by Michal Čihař 05 Aug '11
05 Aug '11
The branch, master has been updated
via 64c30e51e7c2ac2dc2041510a1c65d923c3d08e1 (commit)
from f09d12cb4c343866c7f955f06c75d4cb4eb05307 (commit)
- Log -----------------------------------------------------------------
commit 64c30e51e7c2ac2dc2041510a1c65d923c3d08e1
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:12:08 2011 +0200
Coding style, class definitions
-----------------------------------------------------------------------
Summary of changes:
libraries/Theme.class.php | 3 ++-
libraries/advisor.lib.php | 3 ++-
libraries/sysinfo.lib.php | 6 ++++--
.../libraries/common/PMA_browseUploadFile_test.php | 5 +++--
.../common/PMA_buildActionTitles_test.php | 3 ++-
.../PMA_contains_nonprintable_ascii_test.php | 5 +++--
.../common/PMA_convert_bit_default_value_test.php | 5 +++--
.../common/PMA_displayMaximumUploadSize_test.php | 5 +++--
.../PMA_extractValueFromFormattedSize_test.php | 3 ++-
test/libraries/common/PMA_formatSql_test.php | 3 ++-
.../common/PMA_generateHiddenMaxFileSize_test.php | 3 ++-
test/libraries/common/PMA_getIcon_test.php | 3 ++-
.../common/PMA_getTitleForTarget_test.php | 7 ++++---
test/libraries/core/PMA_checkPageValidity_test.php | 5 +++--
test/libraries/core/PMA_securePath_test.php | 5 +++--
.../core/PMA_warnMissingExtension_test.php | 3 ++-
16 files changed, 42 insertions(+), 25 deletions(-)
diff --git a/libraries/Theme.class.php b/libraries/Theme.class.php
index 7b01fa8..0347ac8 100644
--- a/libraries/Theme.class.php
+++ b/libraries/Theme.class.php
@@ -16,7 +16,8 @@
*
* @package phpMyAdmin
*/
-class PMA_Theme {
+class PMA_Theme
+{
/**
* @var string theme version
* @access protected
diff --git a/libraries/advisor.lib.php b/libraries/advisor.lib.php
index 1f00a13..f453097 100644
--- a/libraries/advisor.lib.php
+++ b/libraries/advisor.lib.php
@@ -1,6 +1,7 @@
<?php
-class Advisor {
+class Advisor
+{
var $variables;
var $parseResult;
var $runResult;
diff --git a/libraries/sysinfo.lib.php b/libraries/sysinfo.lib.php
index c687250..bc0192f 100644
--- a/libraries/sysinfo.lib.php
+++ b/libraries/sysinfo.lib.php
@@ -23,7 +23,8 @@ function getSysInfo()
}
-class WINNT {
+class WINNT
+{
private $_wmi;
public $os = 'WINNT';
@@ -100,7 +101,8 @@ class WINNT {
}
}
-class Linux {
+class Linux
+{
public $os = 'Linux';
function loadavg() {
diff --git a/test/libraries/common/PMA_browseUploadFile_test.php b/test/libraries/common/PMA_browseUploadFile_test.php
index 45b8407..a51a62c 100644
--- a/test/libraries/common/PMA_browseUploadFile_test.php
+++ b/test/libraries/common/PMA_browseUploadFile_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_browseUploadFile_test extends PHPUnit_Extensions_OutputTestCase{
+class PMA_browseUploadFile_test extends PHPUnit_Extensions_OutputTestCase
+{
/*
* Data provider for test
@@ -45,4 +46,4 @@ class PMA_browseUploadFile_test extends PHPUnit_Extensions_OutputTestCase{
PMA_browseUploadFile($size);
}
-}
\ No newline at end of file
+}
diff --git a/test/libraries/common/PMA_buildActionTitles_test.php b/test/libraries/common/PMA_buildActionTitles_test.php
index f6579da..97c2be9 100644
--- a/test/libraries/common/PMA_buildActionTitles_test.php
+++ b/test/libraries/common/PMA_buildActionTitles_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_buildActionTitles_test extends PHPUnit_Framework_TestCase{
+class PMA_buildActionTitles_test extends PHPUnit_Framework_TestCase
+{
function setup()
{
diff --git a/test/libraries/common/PMA_contains_nonprintable_ascii_test.php b/test/libraries/common/PMA_contains_nonprintable_ascii_test.php
index 8f4059e..a5c04c1 100644
--- a/test/libraries/common/PMA_contains_nonprintable_ascii_test.php
+++ b/test/libraries/common/PMA_contains_nonprintable_ascii_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_contains_nonprintable_ascii extends PHPUnit_Framework_TestCase{
+class PMA_contains_nonprintable_ascii extends PHPUnit_Framework_TestCase
+{
function dataProvider(){
return array(
@@ -34,4 +35,4 @@ class PMA_contains_nonprintable_ascii extends PHPUnit_Framework_TestCase{
}
-// PMA_contains_nonprintable_ascii
\ No newline at end of file
+// PMA_contains_nonprintable_ascii
diff --git a/test/libraries/common/PMA_convert_bit_default_value_test.php b/test/libraries/common/PMA_convert_bit_default_value_test.php
index d54ab2d..333ffac 100644
--- a/test/libraries/common/PMA_convert_bit_default_value_test.php
+++ b/test/libraries/common/PMA_convert_bit_default_value_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_convert_bit_default_value_test extends PHPUnit_Framework_TestCase{
+class PMA_convert_bit_default_value_test extends PHPUnit_Framework_TestCase
+{
function dataProvider(){
return array(
@@ -28,6 +29,6 @@ class PMA_convert_bit_default_value_test extends PHPUnit_Framework_TestCase{
*/
function testConvert_bit_default_value_test($bit, $val){
$this->assertEquals($val, PMA_convert_bit_default_value($bit));
-
+
}
}
diff --git a/test/libraries/common/PMA_displayMaximumUploadSize_test.php b/test/libraries/common/PMA_displayMaximumUploadSize_test.php
index ad93ddb..57af208 100644
--- a/test/libraries/common/PMA_displayMaximumUploadSize_test.php
+++ b/test/libraries/common/PMA_displayMaximumUploadSize_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_displayMaximumUploadSize_test extends PHPUnit_Framework_TestCase{
+class PMA_displayMaximumUploadSize_test extends PHPUnit_Framework_TestCase
+{
/*
* Data provider for test
@@ -38,4 +39,4 @@ class PMA_displayMaximumUploadSize_test extends PHPUnit_Framework_TestCase{
$this->assertEquals("(" . __('Max: '). $res . $unit .")", PMA_displayMaximumUploadSize($size));
}
-}
\ No newline at end of file
+}
diff --git a/test/libraries/common/PMA_extractValueFromFormattedSize_test.php b/test/libraries/common/PMA_extractValueFromFormattedSize_test.php
index 038a36e..c1e4f20 100644
--- a/test/libraries/common/PMA_extractValueFromFormattedSize_test.php
+++ b/test/libraries/common/PMA_extractValueFromFormattedSize_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_extractValueFromFormattedSize_test extends PHPUnit_Framework_TestCase{
+class PMA_extractValueFromFormattedSize_test extends PHPUnit_Framework_TestCase
+{
function testExtractValueFromFormattedSizeNoFormat(){
diff --git a/test/libraries/common/PMA_formatSql_test.php b/test/libraries/common/PMA_formatSql_test.php
index df0ddc4..a3683f8 100644
--- a/test/libraries/common/PMA_formatSql_test.php
+++ b/test/libraries/common/PMA_formatSql_test.php
@@ -14,7 +14,8 @@
require_once 'libraries/common.lib.php';
require_once 'libraries/sqlparser.lib.php';
-class PMA_formatSql_test extends PHPUnit_Framework_TestCase{
+class PMA_formatSql_test extends PHPUnit_Framework_TestCase
+{
/**
* temporary variable for globals array
diff --git a/test/libraries/common/PMA_generateHiddenMaxFileSize_test.php b/test/libraries/common/PMA_generateHiddenMaxFileSize_test.php
index 3cd6810..b759f53 100644
--- a/test/libraries/common/PMA_generateHiddenMaxFileSize_test.php
+++ b/test/libraries/common/PMA_generateHiddenMaxFileSize_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_generateHiddenMaxFileSize_test extends PHPUnit_Framework_TestCase{
+class PMA_generateHiddenMaxFileSize_test extends PHPUnit_Framework_TestCase
+{
/*
* Data provider for test
diff --git a/test/libraries/common/PMA_getIcon_test.php b/test/libraries/common/PMA_getIcon_test.php
index 7567207..883a7b5 100644
--- a/test/libraries/common/PMA_getIcon_test.php
+++ b/test/libraries/common/PMA_getIcon_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_getIcon_test extends PHPUnit_Framework_TestCase{
+class PMA_getIcon_test extends PHPUnit_Framework_TestCase
+{
function testGetIconWithoutPropertiesIconic(){
diff --git a/test/libraries/common/PMA_getTitleForTarget_test.php b/test/libraries/common/PMA_getTitleForTarget_test.php
index 1756681..3b4d4d1 100644
--- a/test/libraries/common/PMA_getTitleForTarget_test.php
+++ b/test/libraries/common/PMA_getTitleForTarget_test.php
@@ -13,7 +13,8 @@
*/
require_once 'libraries/common.lib.php';
-class PMA_getTitleForTarget_test extends PHPUnit_Framework_TestCase{
+class PMA_getTitleForTarget_test extends PHPUnit_Framework_TestCase
+{
function dataProvider(){
return array(
@@ -39,5 +40,5 @@ class PMA_getTitleForTarget_test extends PHPUnit_Framework_TestCase{
}
}
-
-//PMA_getTitleForTarget
\ No newline at end of file
+
+//PMA_getTitleForTarget
diff --git a/test/libraries/core/PMA_checkPageValidity_test.php b/test/libraries/core/PMA_checkPageValidity_test.php
index ebc174d..dae64a2 100644
--- a/test/libraries/core/PMA_checkPageValidity_test.php
+++ b/test/libraries/core/PMA_checkPageValidity_test.php
@@ -11,7 +11,8 @@
*/
require_once 'libraries/core.lib.php';
-class PMA_checkPageValidity_test extends PHPUnit_Framework_TestCase{
+class PMA_checkPageValidity_test extends PHPUnit_Framework_TestCase
+{
protected $goto_whitelist = array(
'db_create.php',
'db_datadict.php',
@@ -63,4 +64,4 @@ class PMA_checkPageValidity_test extends PHPUnit_Framework_TestCase{
$this->assertTrue(PMA_checkPageValidity($page,$this->goto_whitelist));
}
-}
\ No newline at end of file
+}
diff --git a/test/libraries/core/PMA_securePath_test.php b/test/libraries/core/PMA_securePath_test.php
index 6663264..3b8575c 100644
--- a/test/libraries/core/PMA_securePath_test.php
+++ b/test/libraries/core/PMA_securePath_test.php
@@ -9,11 +9,12 @@
require_once 'libraries/core.lib.php';
-class PMA_securePath extends PHPUnit_Framework_TestCase{
+class PMA_securePath extends PHPUnit_Framework_TestCase
+{
public function testReplaceDots(){
$this->assertEquals(PMA_securePath('../../../etc/passwd'), './././etc/passwd');
$this->assertEquals(PMA_securePath('/var/www/../phpmyadmin'), '/var/www/./phpmyadmin');
$this->assertEquals(PMA_securePath('./path/with..dots/../../file..php'), './path/with.dots/././file.php');
}
-}
\ No newline at end of file
+}
diff --git a/test/libraries/core/PMA_warnMissingExtension_test.php b/test/libraries/core/PMA_warnMissingExtension_test.php
index 4c31db1..a0f1525 100644
--- a/test/libraries/core/PMA_warnMissingExtension_test.php
+++ b/test/libraries/core/PMA_warnMissingExtension_test.php
@@ -12,7 +12,8 @@
*/
require_once 'libraries/core.lib.php';
-class PMA_warnMissingExtension_test extends PHPUnit_Framework_TestCase{
+class PMA_warnMissingExtension_test extends PHPUnit_Framework_TestCase
+{
function testMissingExtention(){
$ext = 'php_ext';
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13247-gf09d12c
by Michal Čihař 05 Aug '11
by Michal Čihař 05 Aug '11
05 Aug '11
The branch, master has been updated
via f09d12cb4c343866c7f955f06c75d4cb4eb05307 (commit)
via eba14cfbca7d274e605640f46658a2f9d75b231f (commit)
via 3cbf056e4bb962f9a082f9ebac0b7f3be7f4af65 (commit)
from cf004d89ca6786cff687f064740aa9b9fdaa77d5 (commit)
- Log -----------------------------------------------------------------
commit f09d12cb4c343866c7f955f06c75d4cb4eb05307
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:03:24 2011 +0200
Remove trailing commas from arrays, MSIE can add extra element in such case
commit eba14cfbca7d274e605640f46658a2f9d75b231f
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 15:00:35 2011 +0200
Saner loop declarations, always define start point
commit 3cbf056e4bb962f9a082f9ebac0b7f3be7f4af65
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 14:58:08 2011 +0200
Avoid messing up with keywords
-----------------------------------------------------------------------
Summary of changes:
js/pmd/history.js | 36 +++++-----
js/pmd/move.js | 10 ++--
js/server_status.js | 196 +++++++++++++++++++++++++-------------------------
3 files changed, 121 insertions(+), 121 deletions(-)
diff --git a/js/pmd/history.js b/js/pmd/history.js
index d55d5b3..3e3a195 100644
--- a/js/pmd/history.js
+++ b/js/pmd/history.js
@@ -37,15 +37,15 @@ function panel(index)
* @uses history_delete()
*
* @param {int} init starting index of unsorted array
- * @param {int} final last index of unsorted array
+ * @param {int} finit last index of unsorted array
*
**/
-function display(init,final)
+function display(init,finit)
{
var str,i,j,k,sto;
// this part sorts the history array based on table name,this is needed for clubbing all object of same name together.
- for (i = init;i < final;i++) {
+ for (i = init;i < finit;i++) {
sto = history_array[i];
var temp = history_array[i].get_tab() ;//+ '.' + history_array[i].get_obj_no(); for Self JOINS
for(j = 0;j < i;j++){
@@ -488,7 +488,7 @@ function build_query(formtitle, fadin)
{
var q_select = "SELECT ";
var temp;
- for(i = 0;i < select_field.length; i++) {
+ for (i = 0;i < select_field.length; i++) {
temp = check_aggregate(select_field[i]);
if (temp != "") {
q_select += temp;
@@ -535,7 +535,7 @@ function build_query(formtitle, fadin)
function query_from()
{
- var i =0;
+ var i;
var tab_left = [];
var tab_used = [];
var t_tab_used = [];
@@ -547,7 +547,7 @@ function query_from()
var t_array = [];
t_array = from_array;
var K = 0;
- for(i; i < history_array.length ; i++) {
+ for (i = 0; i < history_array.length ; i++) {
from_array.push(history_array[i].get_tab());
}
from_array = unique( from_array );
@@ -650,9 +650,9 @@ function remove_array(rem,arr)
function query_groupby()
{
- var i = 0;
+ var i;
var str = "";
- for(i; i < history_array.length;i++) {
+ for (i = 0; i < history_array.length;i++) {
if(history_array[i].get_type() == "GroupBy") { str +=history_array[i].get_column_name() + ", ";}
}
str = str.substr(0,str.length -1);
@@ -666,9 +666,9 @@ function query_groupby()
function query_having()
{
- var i = 0;
+ var i;
var and = "(";
- for(i; i < history_array.length;i++) {
+ for (i = 0; i < history_array.length;i++) {
if(history_array[i].get_type() == "Having") {
if (history_array[i].get_obj().get_operator() != 'None') {
and += history_array[i].get_obj().get_operator() + "(" + history_array[i].get_column_name() + " ) " + history_array[i].get_obj().getrelation_operator();
@@ -692,9 +692,9 @@ function query_having()
function query_orderby()
{
- var i = 0;
+ var i;
var str = "" ;
- for(i; i < history_array.length;i++) {
+ for (i = 0; i < history_array.length;i++) {
if(history_array[i].get_type() == "OrderBy") { str += history_array[i].get_column_name() + " , "; }
}
str = str.substr(0,str.length -1);
@@ -709,10 +709,10 @@ function query_orderby()
function query_where()
{
- var i = 0;
+ var i;
var and = "(";
var or = "(";
- for(i; i < history_array.length;i++) {
+ for (i = 0; i < history_array.length;i++) {
if(history_array[i].get_type() == "Where") {
if(history_array[i].get_and_or() == 0) {
and += "( " + history_array[i].get_column_name() + " " + history_array[i].get_obj().getrelation_operator() +" " + history_array[i].get_obj().getquery() + ")"; and += " AND ";
@@ -741,8 +741,8 @@ function query_where()
function check_aggregate(id_this)
{
- var i = 0;
- for(i;i < history_array.length;i++) {
+ var i;
+ for (i = 0;i < history_array.length;i++) {
var temp = '`' + history_array[i].get_tab() + '`.`' +history_array[i].get_column_name() +'`';
if(temp == id_this && history_array[i].get_type() == "Aggregate") {
return history_array[i].get_obj().get_operator() + '(' + id_this +')';
@@ -753,8 +753,8 @@ function check_aggregate(id_this)
function check_rename(id_this)
{
- var i = 0;
- for (i;i < history_array.length;i++) {
+ var i;
+ for (i = 0;i < history_array.length;i++) {
var temp = '`' + history_array[i].get_tab() + '`.`' +history_array[i].get_column_name() +'`';
if(temp == id_this && history_array[i].get_type() == "Rename") {
return " AS `" + history_array[i].get_obj().getrename_to() +"`";
diff --git a/js/pmd/move.js b/js/pmd/move.js
index b23a8f1..eb2b246 100644
--- a/js/pmd/move.js
+++ b/js/pmd/move.js
@@ -1038,7 +1038,7 @@ function Select_all(id_this,owner)
downer =owner;
var i;
var tab = [];
- for(i = 0; i < parent.elements.length; i++) {
+ for (i = 0; i < parent.elements.length; i++) {
if (parent.elements[i].type == "checkbox" && parent.elements[i].id.substring(0,(9 + id_this.length)) == 'select_' + id_this + '._') {
if(document.getElementById('select_all_' + id_this).checked == true) {
parent.elements[i].checked = true;
@@ -1094,20 +1094,20 @@ function Table_onover(id_this,val,buil)
*/
function store_column(id_this,owner,col)
{
- var i = 0;
- var k = 0;
+ var i;
+ var k;
if (document.getElementById('select_' + owner + '.' + id_this + '._' + col).checked == true) {
select_field.push('`' + id_this + '`.`' + col +'`');
from_array.push(id_this);
}
else {
- for(i; i < select_field.length ;i++) {
+ for (i = 0; i < select_field.length ;i++) {
if (select_field[i] == ('`' + id_this + '`.`' + col +'`')) {
select_field.splice(i,1);
break;
}
}
- for(k =0 ;k < from_array.length;k++){
+ for (k = 0 ;k < from_array.length;k++){
if(from_array[k] == id_this){
from_array.splice(k,1);
break;
diff --git a/js/server_status.js b/js/server_status.js
index eced236..5abb5df 100644
--- a/js/server_status.js
+++ b/js/server_status.js
@@ -217,7 +217,7 @@ $(function() {
{ x: curVal.x, y: (curVal.y_received - lastVal.y_received) / 1024 },
true,
numLoadedPoints >= chartObj.options.realtime.numMaxPoints
- );
+ );
},
error: function() { serverResponseError(); }
}
@@ -260,7 +260,7 @@ $(function() {
{ x: curVal.x, y: curVal.y_proc },
true,
numLoadedPoints >= chartObj.options.realtime.numMaxPoints
- );
+ );
},
error: function() { serverResponseError(); }
}
@@ -365,7 +365,7 @@ $(function() {
categoryFilter = $(this).val();
filterVariables();
});
-
+
$('input#dontFormat').change(function() {
$('#serverstatusvariables td.value span.original').toggle(this.checked);
$('#serverstatusvariables td.value span.formatted').toggle(! this.checked);
@@ -558,24 +558,24 @@ $(function() {
$('a[href="#openAdvisorInstructions"]').click(function() {
$('#advisorInstructionsDialog').dialog();
});
-
+
$('a[href="#startAnalyzer"]').click(function() {
var $cnt = $('#statustabs_advisor .tabInnerContent');
$cnt.html('<img class="ajaxIcon" src="' + pmaThemeImage + 'ajax_clock_small.gif" alt="">');
-
+
$.get('server_status.php?'+url_query, { ajax_request: true, advisor: true },function(data) {
var $tbody, $tr, str, even = true;
-
+
data = $.parseJSON(data);
$cnt.html('<p><b>Possible performance issues</b></p>');
if(data.fired.length > 0) {
- $cnt.append('<table class="data" id="rulesFired" border="0"><thead><tr><th>Issue</th><th>Recommendation</th></tr></thead><tbody></tbody></table>');
+ $cnt.append('<table class="data" id="rulesFired" border="0"><thead><tr><th>Issue</th><th>Recommendation</th></tr></thead><tbody></tbody></table>');
$tbody = $cnt.find('table#rulesFired');
$.each(data.fired, function(key,value) {
$tbody.append($tr = $('<tr class="linkElem noclick ' + (even ? 'even' : 'odd') + '"><td>' + value.issue + '</td>' +
- '<td>' + value.recommendation + ' </td></tr>'));
+ '<td>' + value.recommendation + ' </td></tr>'));
even = !even;
-
+
$tr.data('rule',value);
$tr.click(function() {
var rule = $(this).data('rule');
@@ -599,7 +599,7 @@ $(function() {
});
}
});
-
+
return false;
});
@@ -631,7 +631,7 @@ $(function() {
xmin: -1,
xmax: -1
};
-
+
var monitorSettings = null;
var defaultMonitorSettings = {
@@ -655,14 +655,14 @@ $(function() {
title: PMA_messages['strSystemMemory'],
nodes: [
{ dataType: 'memory', name: PMA_messages['strTotalMemory'], dataPoint: 'MemTotal', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
- { dataType: 'memory', name: PMA_messages['strUsedMemory'], dataPoint: 'MemUsed', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
+ { dataType: 'memory', name: PMA_messages['strUsedMemory'], dataPoint: 'MemUsed', valueDivisor: 1024, unit: PMA_messages['strMiB'] }
]
},
'swap-WINNT': {
title: PMA_messages['strSystemSwap'],
nodes: [
{ dataType: 'memory', name: PMA_messages['strTotalSwap'], dataPoint: 'SwapTotal', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
- { dataType: 'memory', name: PMA_messages['strUsedSwap'], dataPoint: 'SwapUsed', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
+ { dataType: 'memory', name: PMA_messages['strUsedSwap'], dataPoint: 'SwapUsed', valueDivisor: 1024, unit: PMA_messages['strMiB'] }
]
},
'cpu-Linux': {
@@ -681,7 +681,7 @@ $(function() {
{ dataType: 'memory', name: PMA_messages['strUsedMemory'], dataPoint: 'MemUsed', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
{ dataType: 'memory', name: PMA_messages['strCachedMemory'], dataPoint: 'Cached', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
{ dataType: 'memory', name: PMA_messages['strBufferedMemory'], dataPoint: 'Buffers', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
- { dataType: 'memory', name: PMA_messages['strFreeMemory'], dataPoint:'MemFree', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
+ { dataType: 'memory', name: PMA_messages['strFreeMemory'], dataPoint:'MemFree', valueDivisor: 1024, unit: PMA_messages['strMiB'] }
],
settings: {
chart: {
@@ -700,7 +700,7 @@ $(function() {
nodes: [
{ dataType: 'memory', name: PMA_messages['strTotalSwap'], dataPoint: 'SwapUsed', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
{ dataType: 'memory', name: PMA_messages['strCachedSwap'], dataPoint: 'SwapCached', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
- { dataType: 'memory', name: PMA_messages['strFreeSwap'], dataPoint: 'SwapFree', valueDivisor: 1024, unit: PMA_messages['strMiB'] },
+ { dataType: 'memory', name: PMA_messages['strFreeSwap'], dataPoint: 'SwapFree', valueDivisor: 1024, unit: PMA_messages['strMiB'] }
],
settings: {
chart: {
@@ -968,14 +968,14 @@ $(function() {
$(this).dialog("close");
};
-
+
dlgButtons[PMA_messages['strClose']] = function() {
newChart = null;
$('span#clearSeriesLink').hide();
$('#seriesPreview').html('');
$(this).dialog("close");
};
-
+
$('div#addChartDialog').dialog({
width:'auto',
height:'auto',
@@ -986,7 +986,7 @@ $(function() {
return false;
});
-
+
$('a[href="#exportMonitorConfig"]').click(function() {
var gridCopy = {};
@@ -996,15 +996,15 @@ $(function() {
gridCopy[key].settings = elem.settings;
gridCopy[key].title = elem.title;
});
-
+
var exportData = {
monitorCharts: gridCopy,
monitorSettings: monitorSettings
};
var $form;
-
+
$('body').append($form = $('<form method="post" action="file_echo.php?'+url_query+'&filename=1" style="display:none;"></form>'));
-
+
$form.append('<input type="hidden" name="monitorconfig" value="' + encodeURI($.toJSON(exportData)) + '">');
$form.submit();
$form.remove();
@@ -1014,16 +1014,16 @@ $(function() {
$('div#emptyDialog').attr('title','Import monitor configuration');
$('div#emptyDialog').html('Please select the file you want to import:<br/><form action="file_echo.php?'+url_query+'&import=1" method="post" enctype="multipart/form-data">'+
'<input type="file" name="file"> <input type="hidden" name="import" value="1"> </form>');
-
+
var dlgBtns = {};
-
+
dlgBtns[PMA_messages['strImport']] = function() {
var $iframe, $form;
$('body').append($iframe = $('<iframe id="monitorConfigUpload" style="display:none;"></iframe>'));
var d = $iframe[0].contentWindow.document;
d.open(); d.close();
mew = d;
-
+
$iframe.load(function() {
var json;
@@ -1037,14 +1037,14 @@ $(function() {
$('div#emptyDialog').dialog('close');
return;
}
-
+
// Basic check, is this a monitor config json?
if(!json || ! json.monitorCharts || ! json.monitorCharts) {
alert(PMA_messages['strFailedParsingConfig']);
$('div#emptyDialog').dialog('close');
return;
}
-
+
// If json ok, try applying config
try {
window.localStorage['monitorCharts'] = $.toJSON(json.monitorCharts);
@@ -1057,20 +1057,20 @@ $(function() {
window.localStorage.removeItem('monitorSettings');
rebuildGrid();
}
-
+
$('div#emptyDialog').dialog('close');
});
-
+
$("body", d).append($form=$('div#emptyDialog').find('form'));
$form.submit();
$('div#emptyDialog').append('<img class="ajaxIcon" src="' + pmaThemeImage + 'ajax_clock_small.gif" alt="">');
};
-
+
dlgBtns[PMA_messages['strCancel']] = function() {
$(this).dialog('close');
}
-
-
+
+
$('div#emptyDialog').dialog({
width: 'auto',
height: 'auto',
@@ -1211,8 +1211,8 @@ $(function() {
}
);
};
-
-
+
+
loadLogVars();
return false;
@@ -1353,7 +1353,7 @@ $(function() {
height: $('table#chartGrid tr:nth-child(2) td:nth-child(2)').offset().top - $('table#chartGrid tr:nth-child(1) td:nth-child(1)').offset().top
}
$('table#chartGrid').html('');
-
+
/* Add all charts - in correct order */
var keys = [];
$.each(runtime.charts, function(key, value) {
@@ -1372,11 +1372,11 @@ $(function() {
// Empty cells should keep their size so you can drop onto them
$('table#chartGrid tr td').css('width',chartSize().width + 'px');
-
+
buildRequiredDataList();
refreshChartGrid();
}
-
+
function destroyGrid() {
if(runtime.charts)
$.each(runtime.charts, function(key, value) {
@@ -1387,17 +1387,17 @@ $(function() {
try {
runtime.refreshRequest.abort();
} catch(err) {}
- try {
+ try {
clearTimeout(runtime.refreshTimeout);
} catch(err) {}
-
+
$('table#chartGrid').html('');
runtime.charts = null;
runtime.chartAI = 0;
monitorSettings = null;
}
-
+
function rebuildGrid() {
var oldData = null;
if(runtime.charts) {
@@ -1410,10 +1410,10 @@ $(function() {
}
});
}
-
+
destroyGrid();
initGrid();
-
+
if(oldData) {
$.each(runtime.charts, function(key, chartObj) {
for(var j=0; j < chartObj.nodes.length; j++) {
@@ -1421,7 +1421,7 @@ $(function() {
chartObj.chart.series[j].setData(oldData[chartObj.nodes[j].dataPoint]);
}
});
- }
+ }
}
function chartSize() {
@@ -1475,7 +1475,7 @@ $(function() {
$(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;
@@ -1492,7 +1492,7 @@ $(function() {
$(this).dialog("close");
};
-
+
$('#logAnalyseDialog').dialog({
width: 'auto',
height: 'auto',
@@ -1548,7 +1548,7 @@ $(function() {
chartObj.chart = PMA_createChart(settings);
chartObj.numPoints = 0;
-
+
if(initialize != true) {
runtime.charts['c'+runtime.chartAI] = chartObj;
buildRequiredDataList();
@@ -1563,7 +1563,7 @@ $(function() {
function editChart(chartObj) {
var htmlnode = chartObj.options.chart.renderTo;
if(! htmlnode ) return;
-
+
var chart=null;
var chartKey=null;
$.each(runtime.charts, function(key, value) {
@@ -1573,33 +1573,33 @@ $(function() {
return false;
}
});
-
+
if(chart == null) return;
-
- var htmlStr = '<p><b>Chart title: </b> <br/> <input type="text" size="35" name="chartTitle" value="' + chart.title + '" />';
+
+ var htmlStr = '<p><b>Chart title: </b> <br/> <input type="text" size="35" name="chartTitle" value="' + chart.title + '" />';
htmlStr += '</p><p><b>Series:</b> </p><ol>';
for(var i=0; i<chart.nodes.length; i++) {
htmlStr += '<li><i>' + chart.nodes[i].dataPoint +': </i><br/><input type="text" name="chartSerie-' + i + '" value=" ' + chart.nodes[i].name + '" /></li>';
}
-
+
dlgBtns = {};
dlgBtns['Save'] = function() {
runtime.charts[chartKey].title = $('div#emptyDialog input[name="chartTitle"]').attr('value');
runtime.charts[chartKey].chart.setTitle({ text: runtime.charts[chartKey].title });
-
+
$('div#emptyDialog input[name*="chartSerie"]').each(function() {
var idx = $(this).attr('name').split('-')[1];
runtime.charts[chartKey].nodes[idx].name = $(this).attr('value');
runtime.charts[chartKey].chart.series[idx].name = $(this).attr('value');
});
-
+
$(this).dialog('close');
saveMonitor();
};
dlgBtns['Cancel'] = function() {
$(this).dialog('close');
};
-
+
$('div#emptyDialog').attr('title','Edit chart');
$('div#emptyDialog').html(htmlStr+'</ol>');
$('div#emptyDialog').dialog({
@@ -1608,11 +1608,11 @@ $(function() {
buttons: dlgBtns
});
}
-
+
function removeChart(chartObj) {
var htmlnode = chartObj.options.chart.renderTo;
if(! htmlnode ) return;
-
+
$.each(runtime.charts, function(key, value) {
if(value.chart.options.chart.renderTo == htmlnode) {
delete runtime.charts[key];
@@ -1643,7 +1643,7 @@ $(function() {
}
var value, i=0;
var diff;
-
+
/* Update values in each graph */
$.each(runtime.charts, function(orderKey, elem) {
var key = elem.chartID;
@@ -1673,12 +1673,12 @@ $(function() {
if(elem.nodes[j].transformFn) {
value = chartValueTransform(
- elem.nodes[j].transformFn,
- chartData[key][j],
+ elem.nodes[j].transformFn,
+ chartData[key][j],
(oldChartData == null ? null : oldChartData[key][j])
);
}
-
+
if(value != undefined)
elem.chart.series[j].addPoint(
{ x: chartData.x, y: value },
@@ -1699,7 +1699,7 @@ $(function() {
runtime.refreshTimeout = setTimeout(refreshChartGrid, monitorSettings.gridRefresh);
});
}
-
+
function chartValueTransform(name,cur,prev) {
switch(name) {
case 'cpu-linux':
@@ -1731,7 +1731,7 @@ $(function() {
opts.removeVariables = false;
if(! opts.limitTypes)
opts.limitTypes = false;
-
+
$('#emptyDialog').html(PMA_messages['strAnalysingLogs'] + ' <img class="ajaxIcon" src="' + pmaThemeImage + 'ajax_clock_small.gif" alt="">');
$('#emptyDialog').dialog({
@@ -1757,14 +1757,14 @@ $(function() {
removeVariables: opts.removeVariables,
limitTypes: opts.limitTypes
},
- function(data) {
+ function(data) {
var logData;
try {
logData = $.parseJSON(data);
} catch(err) {
return serverResponseError();
}
-
+
if(logData.rows.length != 0) {
runtime.logDataCols = buildLogTable(logData);
@@ -1813,17 +1813,17 @@ $(function() {
$(this).dialog("close");
$(document).scrollTop($('div#logTable').offset().top);
};
-
+
$('#emptyDialog').dialog( "option", "buttons", dlgBtns);
-
+
} else {
$('#emptyDialog').html('<p>' + PMA_messages['strNoDataFound'] + '</p>');
-
+
var dlgBtns = {};
- dlgBtns[PMA_messages['strClose']] = function() {
- $(this).dialog("close");
+ dlgBtns[PMA_messages['strClose']] = function() {
+ $(this).dialog("close");
};
-
+
$('#emptyDialog').dialog( "option", "buttons", dlgBtns );
}
}
@@ -1835,7 +1835,7 @@ $(function() {
if(val.length == 0) textFilter = null;
else textFilter = new RegExp(val, 'i');
-
+
var rowSum = 0, totalSum = 0, i=0, q;
var noVars = $('div#logTable input#noWHEREData').attr('checked');
var equalsFilter = /([^=]+)=(\d+|((\'|"|).*?[^\\])\4((\s+)|$))/gi;
@@ -1845,10 +1845,10 @@ $(function() {
var hide = false, rowData;
var queryColumnName = runtime.logDataCols[runtime.logDataCols.length - 2];
var sumColumnName = runtime.logDataCols[runtime.logDataCols.length - 1];
-
+
var isSlowLog = opts.src == 'slow';
var columnSums = {};
-
+
var countRow = function(query, row) {
var cells = row.match(/<td>(.*?)<\/td>/gi);
if(!columnSums[query]) columnSums[query] = [0,0,0,0];
@@ -1858,7 +1858,7 @@ $(function() {
columnSums[query][2] += parseInt(cells[4].replace(/(<td>|<\/td>)/gi,''));
columnSums[query][3] += parseInt(cells[5].replace(/(<td>|<\/td>)/gi,''));
};
-
+
// We just assume the sql text is always in the second last column, and that the total count is right of it
$('div#logTable table tbody tr td:nth-child(' + (runtime.logDataCols.length - 1) + ')').each(function() {
if(varFilterChange && $(this).html().match(/^SELECT/i)) {
@@ -1877,11 +1877,11 @@ $(function() {
$(this).text(q);
}
if(isSlowLog) countRow(q, $(this).parent().html());
-
+
// Restore original columns
} else {
rowData = $(this).parent().data('query');
-
+
// SQL Text
$(this).text(rowData[queryColumnName]);
// #
@@ -1918,18 +1918,18 @@ $(function() {
hide = false;
i++;
});
-
+
// Update count values of grouped entries
if(varFilterChange) {
if(noVars) {
var numCol, row, $table = $('div#logTable table tbody');
$.each(filteredQueriesLines, function(key,value) {
if(filteredQueries[key] <= 1) return;
-
+
row = $table.children('tr:nth-child(' + (value+1) + ')');
numCol = row.children(':nth-child(' + (runtime.logDataCols.length) + ')');
numCol.text(filteredQueries[key]);
-
+
if(isSlowLog) {
row.children('td:nth-child(3)').text(secToTime(columnSums[key][0]));
row.children('td:nth-child(4)').text(secToTime(columnSums[key][1]));
@@ -1938,9 +1938,9 @@ $(function() {
}
});
}
-
- $('div#logTable table').trigger("update");
- setTimeout(function() {
+
+ $('div#logTable table').trigger("update");
+ setTimeout(function() {
$('div#logTable table').trigger('sorton',[[[runtime.logDataCols.length - 1,1]]]);
}, 0);
}
@@ -1959,25 +1959,25 @@ $(function() {
removeVariables: true,
limitTypes: true
});*/
-
+
function timeToSec(timeStr) {
var time = timeStr.split(':');
return parseInt(time[0]*3600) + parseInt(time[1]*60) + parseInt(time[2]);
}
-
+
function secToTime(timeInt) {
hours = Math.floor(timeInt / 3600);
timeInt -= hours*3600;
minutes = Math.floor(timeInt / 60);
timeInt -= minutes*60;
-
+
if(hours < 10) hours = '0' + hours;
if(minutes < 10) minutes = '0' + minutes;
if(timeInt < 10) timeInt = '0' + timeInt;
-
+
return hours + ':' + minutes + ':' + timeInt;
}
-
+
function buildLogTable(data) {
var rows = data.rows;
var cols = new Array();
@@ -1993,7 +1993,7 @@ $(function() {
}
return value;
};
-
+
for(var i=0; i < rows.length; i++) {
if(i == 0) {
$.each(rows[0],function(key, value) {
@@ -2035,9 +2035,9 @@ $(function() {
- Any string appearance containing a MySQL Keyword, surrounded by whitespaces, e.g. WHERE bar = "This where the formatter fails"
- Subqueries too probably
*/
-
+
// Matches the columns to be selected
- // .* selector doesn't include whitespace and we have no PCRE_DOTALL modifier, (.|\s)+ crashes Chrome (reported and confirmed),
+ // .* selector doesn't include whitespace and we have no PCRE_DOTALL modifier, (.|\s)+ crashes Chrome (reported and confirmed),
// [^]+ results in JS error in IE8, thus we use [^\0]+ for matching each column since the zero-byte char (hopefully) doesn't appear in column names ;)
var sLists = query.match(/SELECT\s+[^\0]+\s+FROM\s+/gi);
if(sLists) {
@@ -2080,7 +2080,7 @@ $(function() {
// Float sux, I'll use table :(
$('div#queryAnalyzerDialog div.placeHolder')
.html('<table width="100%" border="0"><tr><td class="explain"></td><td class="chart"></td></tr></table>');
-
+
var explain = '<b>Explain output</b> '+explain_docu;
if(data.explain.length > 1) {
explain += ' (';
@@ -2095,25 +2095,25 @@ $(function() {
explain += '<div class="explain-' + i + '"' + (i>0? 'style="display:none;"' : '' ) + '>';
$.each(data.explain[i], function(key,value) {
value = (value==null)?'null':value;
-
+
if(key == 'type' && value.toLowerCase() == 'all') value = '<span class="attention">' + value +'</span>';
if(key == 'Extra') value = value.replace(/(using (temporary|filesort))/gi,'<span class="attention">$1</span>');
explain += key+': ' + value + '<br />';
});
explain += '</div>';
}
-
+
// Since there is such a nice free space below the explain, lets put it here for now
explain += '<p><b>' + PMA_messages['strAffectedRows'] + '</b> ' + data.affectedRows;
$('div#queryAnalyzerDialog div.placeHolder td.explain').append(explain);
-
+
$('div#queryAnalyzerDialog div.placeHolder a[href*="#showExplain"]').click(function() {
var id = $(this).attr('href').split('-')[1];
$(this).parent().find('div[class*="explain"]').hide();
$(this).parent().find('div[class*="explain-' + id + '"]').show();
});
-
+
if(data.profiling) {
var chartData = [];
var numberTable = '<table class="queryNums"><thead><tr><th>Status</th><th>Time</th></tr></thead><tbody>';
@@ -2129,9 +2129,9 @@ $(function() {
}
numberTable += '<tr><td><b>Total time:</b></td><td>' + PMA_prettyProfilingNum(totalTime,2) + '</td></tr>';
numberTable += '</tbody></table>';
-
+
$('div#queryAnalyzerDialog div.placeHolder td.chart').append('<b>Profiling results ' + profiling_docu + '</b> (<a href="#showNums">Table</a>, <a href="#showChart">Chart</a>)<br/>' + numberTable + ' <div id="queryProfiling"></div>');
-
+
$('div#queryAnalyzerDialog div.placeHolder a[href="#showNums"]').click(function() {
$('div#queryAnalyzerDialog div#queryProfiling').hide();
$('div#queryAnalyzerDialog table.queryNums').show();
@@ -2230,7 +2230,7 @@ $(function() {
};
$('#emptyDialog').attr('title',PMA_messages['strRefreshFailed']);
$('#emptyDialog').html('<img class="icon ic_s_attention" src="themes/dot.gif" alt=""> ' + PMA_messages['strInvalidResponseExplanation'])
- $('#emptyDialog').dialog({ buttons: btns });
+ $('#emptyDialog').dialog({ buttons: btns });
}
-
+
});
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13244-gcf004d8
by Michal Čihař 05 Aug '11
by Michal Čihař 05 Aug '11
05 Aug '11
The branch, master has been updated
via cf004d89ca6786cff687f064740aa9b9fdaa77d5 (commit)
from 1ec0b69e6bf3378188a051b45fb2c0e7ea93b990 (commit)
- Log -----------------------------------------------------------------
commit cf004d89ca6786cff687f064740aa9b9fdaa77d5
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 14:52:47 2011 +0200
Move PMD scripts to js directory.
We should have all scripts in single place and this will include them in
compression on release.
-----------------------------------------------------------------------
Summary of changes:
js/messages.php | 4 ++--
{pmd/scripts => js/pmd}/ajax.js | 0
{pmd/scripts => js/pmd}/history.js | 0
{pmd/scripts => js/pmd}/iecanvas.js | 0
{pmd/scripts => js/pmd}/move.js | 0
pmd_general.php | 8 ++++----
6 files changed, 6 insertions(+), 6 deletions(-)
rename {pmd/scripts => js/pmd}/ajax.js (100%)
rename {pmd/scripts => js/pmd}/history.js (100%)
rename {pmd/scripts => js/pmd}/iecanvas.js (100%)
rename {pmd/scripts => js/pmd}/move.js (100%)
diff --git a/js/messages.php b/js/messages.php
index 4d9be93..d5565ac 100644
--- a/js/messages.php
+++ b/js/messages.php
@@ -244,14 +244,14 @@ $js_messages['strIgnore'] = __('Ignore');
/* For tbl_structure.js */
$js_messages['strAddColumns'] = __('Add columns');
-/* Designer (pmd/scripts/move.js) */
+/* Designer (js/pmd/move.js) */
$js_messages['strSelectReferencedKey'] = __('Select referenced key');
$js_messages['strSelectForeignKey'] = __('Select Foreign Key');
$js_messages['strPleaseSelectPrimaryOrUniqueKey'] = __('Please select the primary key or a unique key');
$js_messages['strChangeDisplay'] = __('Choose column to display');
$js_messages['strLeavingDesigner'] = __('You haven\'t saved the changes in the layout. They will be lost if you don\'t save them.Do you want to continue?');
-/* Visual query builder (pmd/scripts/move.js) */
+/* Visual query builder (js/pmd/move.js) */
$js_messages['strAddOption'] = __('Add an option for column ');
/* password generation */
diff --git a/pmd/scripts/ajax.js b/js/pmd/ajax.js
similarity index 100%
rename from pmd/scripts/ajax.js
rename to js/pmd/ajax.js
diff --git a/pmd/scripts/history.js b/js/pmd/history.js
similarity index 100%
rename from pmd/scripts/history.js
rename to js/pmd/history.js
diff --git a/pmd/scripts/iecanvas.js b/js/pmd/iecanvas.js
similarity index 100%
rename from pmd/scripts/iecanvas.js
rename to js/pmd/iecanvas.js
diff --git a/pmd/scripts/move.js b/js/pmd/move.js
similarity index 100%
rename from pmd/scripts/move.js
rename to js/pmd/move.js
diff --git a/pmd_general.php b/pmd_general.php
index a93265e..be504ac 100644
--- a/pmd_general.php
+++ b/pmd_general.php
@@ -55,11 +55,11 @@ echo '
?>
// ]]>
</script>
- <script src="pmd/scripts/ajax.js" type="text/javascript"></script>
- <script src="pmd/scripts/history.js" type="text/javascript"></script>
- <script src="pmd/scripts/move.js" type="text/javascript"></script>
+ <script src="js/pmd/ajax.js" type="text/javascript"></script>
+ <script src="js/pmd/history.js" type="text/javascript"></script>
+ <script src="js/pmd/move.js" type="text/javascript"></script>
<!--[if IE]>
- <script src="pmd/scripts/iecanvas.js" type="text/javascript"></script>
+ <script src="js/pmd/iecanvas.js" type="text/javascript"></script>
<![endif]-->
<?php
echo $script_tabs . $script_contr . $script_display_field;
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-13243-g1ec0b69
by Michal Čihař 05 Aug '11
by Michal Čihař 05 Aug '11
05 Aug '11
The branch, master has been updated
via 1ec0b69e6bf3378188a051b45fb2c0e7ea93b990 (commit)
from 6205d419b68d57105d985a4a5335498337f6ccf4 (commit)
- Log -----------------------------------------------------------------
commit 1ec0b69e6bf3378188a051b45fb2c0e7ea93b990
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Fri Aug 5 14:49:23 2011 +0200
Coding style, function definitions
-----------------------------------------------------------------------
Summary of changes:
js/common.js | 33 ++++--
js/config.js | 48 ++++++---
js/db_search.js | 6 +-
js/db_structure.js | 3 +-
js/export.js | 24 +++--
js/functions.js | 108 +++++++++++++-------
js/import.js | 14 ++-
js/keyhandler.js | 3 +-
js/navigation.js | 18 ++-
js/replication.js | 19 ++--
js/server_privileges.js | 3 +-
js/server_variables.js | 55 +++++-----
js/sql.js | 21 +++--
js/tbl_change.js | 34 ++++---
js/tbl_chart.js | 98 +++++++++---------
js/tbl_gis_visualization.js | 9 +-
js/tbl_relation.js | 5 +-
js/tbl_structure.js | 11 +-
js/update-location.js | 9 +-
libraries/advisor.lib.php | 3 +-
libraries/auth/cookie.auth.lib.php | 3 +-
libraries/auth/signon.auth.lib.php | 3 +-
libraries/build_html_for_db.lib.php | 6 +-
libraries/charset_conversion.lib.php | 3 +-
libraries/common.lib.php | 57 +++++++----
libraries/core.lib.php | 15 ++-
libraries/database_interface.lib.php | 15 ++-
libraries/dbi/mysql.dbi.lib.php | 11 ++-
libraries/dbi/mysqli.dbi.lib.php | 8 +-
libraries/display_export.lib.php | 6 +-
libraries/display_import_ajax.lib.php | 26 +++--
libraries/display_select_lang.lib.php | 6 +-
libraries/display_tbl.lib.php | 64 ++++++++----
libraries/header.inc.php | 3 +-
libraries/iconv_wrapper.lib.php | 3 +-
libraries/import.lib.php | 24 +++--
libraries/import/upload/apc.php | 3 +-
libraries/import/upload/noplugin.php | 3 +-
libraries/import/upload/uploadprogress.php | 3 +-
libraries/js_escape.lib.php | 3 +-
libraries/kanji-encoding.lib.php | 15 ++-
libraries/logging.lib.php | 3 +-
libraries/mime.lib.php | 3 +-
libraries/mysql_charsets.lib.php | 12 ++-
libraries/opendocument.lib.php | 3 +-
libraries/relation.lib.php | 3 +-
libraries/replication.inc.php | 21 +++--
libraries/replication_gui.lib.php | 15 ++-
libraries/select_lang.lib.php | 6 +-
libraries/server_synchronize.lib.php | 9 +-
libraries/sql_query_form.lib.php | 3 +-
libraries/sysinfo.lib.php | 41 ++++----
libraries/tbl_properties.inc.php | 3 +-
libraries/transformations/TEMPLATE | 6 +-
.../application_octetstream__download.inc.php | 6 +-
.../application_octetstream__hex.inc.php | 6 +-
libraries/transformations/global.inc.php | 9 +-
.../transformations/image_jpeg__inline.inc.php | 6 +-
libraries/transformations/image_jpeg__link.inc.php | 6 +-
.../transformations/image_png__inline.inc.php | 6 +-
.../transformations/text_plain__dateformat.inc.php | 6 +-
.../transformations/text_plain__external.inc.php | 9 +-
.../transformations/text_plain__formatted.inc.php | 6 +-
.../transformations/text_plain__imagelink.inc.php | 6 +-
libraries/transformations/text_plain__link.inc.php | 6 +-
.../transformations/text_plain__longToIpv4.inc.php | 3 +-
libraries/transformations/text_plain__sql.inc.php | 6 +-
.../transformations/text_plain__substr.inc.php | 6 +-
navigation.php | 3 +-
pmd/scripts/history.js | 60 +++++++----
pmd/scripts/move.js | 6 +-
pmd_save_pos.php | 3 +-
scripts/openid.php | 3 +-
scripts/signon-script.php | 3 +-
server_privileges.php | 3 +-
server_status.php | 18 ++-
server_variables.php | 13 ++-
setup/lib/form_processing.lib.php | 3 +-
setup/scripts.js | 5 +-
themes.php | 3 +-
80 files changed, 710 insertions(+), 432 deletions(-)
diff --git a/js/common.js b/js/common.js
index 97fa7d9..9b5dcf6 100644
--- a/js/common.js
+++ b/js/common.js
@@ -19,7 +19,8 @@ var query_to_load = '';
*
* @param string db name
*/
-function setDb(new_db) {
+function setDb(new_db)
+{
//alert('setDb(' + new_db + ')');
if (new_db != db) {
// db has changed
@@ -51,7 +52,8 @@ function setDb(new_db) {
*
* @param string table name
*/
-function setTable(new_table) {
+function setTable(new_table)
+{
//alert('setTable(' + new_table + ')');
if (new_table != table) {
// table has changed
@@ -86,7 +88,8 @@ function setTable(new_table) {
* @uses encodeURIComponent()
* @param string url name of page to be loaded
*/
-function refreshMain(url) {
+function refreshMain(url)
+{
if (! url) {
if (db) {
url = opendb_url;
@@ -117,7 +120,8 @@ function refreshMain(url) {
* @uses encodeURIComponent()
* @param boolean force force reloading
*/
-function refreshNavigation(force) {
+function refreshNavigation(force)
+{
// The goTo() function won't refresh in case the target
// url is the same as the url given as parameter, but sometimes
// we want to refresh anyway.
@@ -174,7 +178,8 @@ function markDbTable(db, table)
/**
* sets current selected server, table and db (called from libraries/footer.inc.php)
*/
-function setAll( new_lang, new_collation_connection, new_server, new_db, new_table, new_token ) {
+function setAll( new_lang, new_collation_connection, new_server, new_db, new_table, new_token )
+{
//alert('setAll( ' + new_lang + ', ' + new_collation_connection + ', ' + new_server + ', ' + new_db + ', ' + new_table + ', ' + new_token + ' )');
if (new_server != server || new_lang != lang
|| new_collation_connection != collation_connection) {
@@ -257,7 +262,8 @@ function focus_querywindow(sql_query)
* inserts query string into query window textarea
* called from script tag in querywindow
*/
-function insertQuery() {
+function insertQuery()
+{
if (query_to_load != '' && querywindow.document && querywindow.document.getElementById && querywindow.document.getElementById('sqlquery')) {
querywindow.document.getElementById('sqlquery').value = query_to_load;
query_to_load = '';
@@ -266,7 +272,8 @@ function insertQuery() {
return false;
}
-function open_querywindow( url ) {
+function open_querywindow( url )
+{
if ( ! url ) {
url = 'querywindow.php?' + common_query + '&db=' + encodeURIComponent(db) + '&table=' + encodeURIComponent(table);
}
@@ -293,7 +300,8 @@ function open_querywindow( url ) {
return true;
}
-function refreshQuerywindow( url ) {
+function refreshQuerywindow( url )
+{
if ( ! querywindow.closed && querywindow.location ) {
if ( ! querywindow.document.sqlform.LockFromUpdate
@@ -310,7 +318,8 @@ function refreshQuerywindow( url ) {
* @param string targeturl new url to load
* @param string target frame where to load the new url
*/
-function goTo(targeturl, target) {
+function goTo(targeturl, target)
+{
//alert(targeturl);
if ( target == 'main' ) {
target = window.frame_content;
@@ -339,7 +348,8 @@ function goTo(targeturl, target) {
}
// opens selected db in main frame
-function openDb(new_db) {
+function openDb(new_db)
+{
//alert('opendb(' + new_db + ')');
setDb(new_db);
setTable('');
@@ -347,7 +357,8 @@ function openDb(new_db) {
return true;
}
-function updateTableTitle( table_link_id, new_title ) {
+function updateTableTitle( table_link_id, new_title )
+{
//alert('updateTableTitle');
if ( window.parent.frame_navigation.document && window.parent.frame_navigation.document.getElementById(table_link_id) ) {
var left = window.parent.frame_navigation.document;
diff --git a/js/config.js b/js/config.js
index 94b2650..53702e3 100644
--- a/js/config.js
+++ b/js/config.js
@@ -14,7 +14,8 @@ var PMA_messages = {};
*
* @param {Element} field
*/
-function getFieldType(field) {
+function getFieldType(field)
+{
field = $(field);
var tagName = field.prop('tagName');
if (tagName == 'INPUT') {
@@ -40,7 +41,8 @@ function getFieldType(field) {
* @param {String} field_type see {@link #getFieldType}
* @param {String|Boolean} [value]
*/
-function setFieldValue(field, field_type, value) {
+function setFieldValue(field, field_type, value)
+{
field = $(field);
switch (field_type) {
case 'text':
@@ -78,7 +80,8 @@ function setFieldValue(field, field_type, value) {
* @param {String} field_type returned by {@link #getFieldType}
* @type Boolean|String|String[]
*/
-function getFieldValue(field, field_type) {
+function getFieldValue(field, field_type)
+{
field = $(field);
switch (field_type) {
case 'text':
@@ -101,7 +104,8 @@ function getFieldValue(field, field_type) {
/**
* Returns values for all fields in fieldsets
*/
-function getAllValues() {
+function getAllValues()
+{
var elements = $('fieldset input, fieldset select, fieldset textarea');
var values = {};
var type, value;
@@ -126,7 +130,8 @@ function getAllValues() {
* @param {String} type
* @return boolean
*/
-function checkFieldDefault(field, type) {
+function checkFieldDefault(field, type)
+{
field = $(field);
var field_id = field.attr('id');
if (typeof defaultValues[field_id] == 'undefined') {
@@ -157,7 +162,8 @@ function checkFieldDefault(field, type) {
* Returns element's id prefix
* @param {Element} element
*/
-function getIdPrefix(element) {
+function getIdPrefix(element)
+{
return $(element).attr('id').replace(/[^-]+$/, '');
}
@@ -254,7 +260,8 @@ var validators = {
* @param {boolean} onKeyUp whether fire on key up
* @param {Array} params validation function parameters
*/
-function validateField(id, type, onKeyUp, params) {
+function validateField(id, type, onKeyUp, params)
+{
if (typeof validators[type] == 'undefined') {
return;
}
@@ -272,7 +279,8 @@ function validateField(id, type, onKeyUp, params) {
* @type Array
* @return array of [function, paramseters to be passed to function]
*/
-function getFieldValidators(field_id, onKeyUpOnly) {
+function getFieldValidators(field_id, onKeyUpOnly)
+{
// look for field bound validator
var name = field_id.match(/[^-]+$/)[0];
if (typeof validators._field[name] != 'undefined') {
@@ -302,7 +310,8 @@ function getFieldValidators(field_id, onKeyUpOnly) {
*
* @param {Object} error_list list of errors in the form {field id: error array}
*/
-function displayErrors(error_list) {
+function displayErrors(error_list)
+{
for (var field_id in error_list) {
var errors = error_list[field_id];
var field = $('#'+field_id);
@@ -354,7 +363,8 @@ function displayErrors(error_list) {
* @param {boolean} isKeyUp
* @param {Object} errors
*/
-function validate_fieldset(fieldset, isKeyUp, errors) {
+function validate_fieldset(fieldset, isKeyUp, errors)
+{
fieldset = $(fieldset);
if (fieldset.length && typeof validators._fieldset[fieldset.attr('id')] != 'undefined') {
var fieldset_errors = validators._fieldset[fieldset.attr('id')].apply(fieldset[0], [isKeyUp]);
@@ -377,7 +387,8 @@ function validate_fieldset(fieldset, isKeyUp, errors) {
* @param {boolean} isKeyUp
* @param {Object} errors
*/
-function validate_field(field, isKeyUp, errors) {
+function validate_field(field, isKeyUp, errors)
+{
field = $(field);
var field_id = field.attr('id');
errors[field_id] = [];
@@ -403,7 +414,8 @@ function validate_field(field, isKeyUp, errors) {
* @param {Element} field
* @param {boolean} isKeyUp
*/
-function validate_field_and_fieldset(field, isKeyUp) {
+function validate_field_and_fieldset(field, isKeyUp)
+{
field = $(field);
var errors = {};
validate_field(field, isKeyUp, errors);
@@ -416,7 +428,8 @@ function validate_field_and_fieldset(field, isKeyUp) {
*
* @param {Element} field
*/
-function markField(field) {
+function markField(field)
+{
field = $(field);
var type = getFieldType(field);
var isDefault = checkFieldDefault(field, type);
@@ -433,7 +446,8 @@ function markField(field) {
* @param {Element} field
* @param {boolean} display
*/
-function setRestoreDefaultBtn(field, display) {
+function setRestoreDefaultBtn(field, display)
+{
var el = $(field).closest('td').find('.restore-default img');
el[display ? 'show' : 'hide']();
}
@@ -495,7 +509,8 @@ $(function() {
*
* @param {String} tab_id
*/
-function setTab(tab_id) {
+function setTab(tab_id)
+{
$('.tabs a').removeClass('active').filter('[href=' + tab_id + ']').addClass('active');
$('.tabs_contents fieldset').hide().filter(tab_id).show();
location.hash = 'tab_' + tab_id.substr(1);
@@ -562,7 +577,8 @@ $(function() {
*
* @param {String} field_id
*/
-function restoreField(field_id) {
+function restoreField(field_id)
+{
var field = $('#'+field_id);
if (field.length == 0 || defaultValues[field_id] == undefined) {
return;
diff --git a/js/db_search.js b/js/db_search.js
index 72b3046..3e2eeb4 100644
--- a/js/db_search.js
+++ b/js/db_search.js
@@ -15,7 +15,8 @@
*/
/** Loads the database search results */
-function loadResult(result_path , table_name , link , ajaxEnable){
+function loadResult(result_path , table_name , link , ajaxEnable)
+{
$(document).ready(function() {
if(ajaxEnable)
{
@@ -43,7 +44,8 @@ function loadResult(result_path , table_name , link , ajaxEnable){
}
/** Delete the selected search results */
-function deleteResult(result_path , msg , ajaxEnable){
+function deleteResult(result_path , msg , ajaxEnable)
+{
$(document).ready(function() {
/** Hides the results shown by the browse criteria */
$("#table-info").hide();
diff --git a/js/db_structure.js b/js/db_structure.js
index 559819e..c3b280a 100644
--- a/js/db_structure.js
+++ b/js/db_structure.js
@@ -24,7 +24,8 @@
*
* @param jQuery object $this_anchor
*/
-function PMA_adjustTotals($this_anchor) {
+function PMA_adjustTotals($this_anchor)
+{
var $parent_tr = $this_anchor.closest('tr');
var $rows_td = $parent_tr.find('.tbl_rows');
var $size_td = $parent_tr.find('.tbl_size');
diff --git a/js/export.js b/js/export.js
index 3fd3c00..a356d45 100644
--- a/js/export.js
+++ b/js/export.js
@@ -3,7 +3,7 @@
* Functions used in the export tab
*
*/
-
+
/**
* Toggles the hiding and showing of each plugin's options
* according to the currently selected plugin from the dropdown list
@@ -19,7 +19,7 @@
});
/**
- * Toggles the enabling and disabling of the SQL plugin's comment options that apply only when exporting structure
+ * Toggles the enabling and disabling of the SQL plugin's comment options that apply only when exporting structure
*/
$(document).ready(function() {
$("input[type='radio'][name$='sql_structure_or_data']").change(function() {
@@ -50,7 +50,8 @@ $(document).ready(function() {
* options
*/
-function toggle_structure_data_opts(pluginName) {
+function toggle_structure_data_opts(pluginName)
+{
var radioFormName = pluginName + "_structure_or_data";
var dataDiv = "#" + pluginName + "_data";
var structureDiv = "#" + pluginName + "_structure";
@@ -89,7 +90,8 @@ $(document).ready(function() {
/**
* Toggles the disabling of the "save to file" options
*/
-function toggle_save_to_file() {
+function toggle_save_to_file()
+{
if($("#radio_dump_asfile:checked").length == 0) {
$("#ul_save_asfile > li").fadeTo('fast', 0.4);
$("#ul_save_asfile > li > input").attr('disabled', 'disabled');
@@ -111,7 +113,8 @@ $(document).ready(function() {
/**
* For SQL plugin, toggles the disabling of the "display comments" options
*/
-function toggle_sql_include_comments() {
+function toggle_sql_include_comments()
+{
$("#checkbox_sql_include_comments").change(function() {
if($("#checkbox_sql_include_comments:checked").length == 0) {
$("#ul_include_comments > li").fadeTo('fast', 0.4);
@@ -130,8 +133,8 @@ function toggle_sql_include_comments() {
}
/**
- * For SQL plugin, if "CREATE TABLE options" is checked/unchecked, check/uncheck each of its sub-options
- */
+ * For SQL plugin, if "CREATE TABLE options" is checked/unchecked, check/uncheck each of its sub-options
+ */
$(document).ready(function() {
$("#checkbox_sql_create_table_statements").change(function() {
if($("#checkbox_sql_create_table_statements:checked").length == 0) {
@@ -144,7 +147,7 @@ $(document).ready(function() {
});
});
-/**
+/**
* Disables the view output as text option if the output must be saved as a file
*/
$(document).ready(function() {
@@ -164,7 +167,8 @@ $(document).ready(function() {
/**
* Toggles display of options when quick and custom export are selected
*/
-function toggle_quick_or_custom() {
+function toggle_quick_or_custom()
+{
if($("$(this):checked").attr("value") == "custom") {
$("#databases_and_tables").show();
$("#rows").show();
@@ -222,4 +226,4 @@ $(document).ready(function() {
$("input[type='text'][name='limit_from']").removeAttr('disabled');
}
});
-});
\ No newline at end of file
+});
diff --git a/js/functions.js b/js/functions.js
index 0cca1d1..bb976ce 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -35,7 +35,8 @@ var chart_activeTimeouts = new Object();
*
* @param object the form
*/
-function PMA_prepareForAjaxRequest($form) {
+function PMA_prepareForAjaxRequest($form)
+{
if (! $form.find('input:hidden').is('#ajax_request_hidden')) {
$form.append('<input type="hidden" id="ajax_request_hidden" name="ajax_request" value="true" />');
}
@@ -48,7 +49,8 @@ function PMA_prepareForAjaxRequest($form) {
*
* @return boolean always true
*/
-function suggestPassword(passwd_form) {
+function suggestPassword(passwd_form)
+{
// restrict the password to just letters and numbers to avoid problems:
// "editors and viewers regard the password as multiple words and
// things like double click no longer work"
@@ -68,7 +70,8 @@ function suggestPassword(passwd_form) {
/**
* Version string to integer conversion.
*/
-function parseVersionString (str) {
+function parseVersionString (str)
+{
if (typeof(str) != 'string') { return false; }
var add = 0;
// Parse possible alpha/beta/rc/
@@ -98,7 +101,8 @@ function parseVersionString (str) {
/**
* Indicates current available version on main page.
*/
-function PMA_current_version() {
+function PMA_current_version()
+{
var current = parseVersionString(pmaversion);
var latest = parseVersionString(PMA_latest_version);
var version_information_message = PMA_messages['strLatestAvailable'] + ' ' + PMA_latest_version;
@@ -124,7 +128,8 @@ function PMA_current_version() {
*
*/
-function displayPasswordGenerateButton() {
+function displayPasswordGenerateButton()
+{
$('#tr_element_before_generate_password').parent().append('<tr><td>' + PMA_messages['strGeneratePassword'] + '</td><td><input type="button" id="button_generate_password" value="' + PMA_messages['strGenerate'] + '" onclick="suggestPassword(this.form)" /><input type="text" name="generated_pw" id="generated_pw" /></td></tr>');
$('#div_element_before_generate_password').parent().append('<div class="item"><label for="button_generate_password">' + PMA_messages['strGeneratePassword'] + ':</label><span class="options"><input type="button" id="button_generate_password" value="' + PMA_messages['strGenerate'] + '" onclick="suggestPassword(this.form)" /></span><input type="text" name="generated_pw" id="generated_pw" /></div>');
}
@@ -134,7 +139,8 @@ function displayPasswordGenerateButton() {
*
* @param object $this_element a jQuery object pointing to the element
*/
-function PMA_addDatepicker($this_element, options) {
+function PMA_addDatepicker($this_element, options)
+{
var showTimeOption = false;
if ($this_element.is('.datetimefield')) {
showTimeOption = true;
@@ -176,7 +182,8 @@ function PMA_addDatepicker($this_element, options) {
* @param boolean only_once if true this is only done once
* f.e. only on first focus
*/
-function selectContent( element, lock, only_once ) {
+function selectContent( element, lock, only_once )
+{
if ( only_once && only_once_elements[element.name] ) {
return;
}
@@ -720,7 +727,8 @@ var marked_row = new Array;
*
* @param container DOM element
*/
-function markAllRows( container_id ) {
+function markAllRows( container_id )
+{
$("#"+container_id).find("input:checkbox:enabled").attr('checked', 'checked')
.parents("tr").addClass("marked");
@@ -733,7 +741,8 @@ function markAllRows( container_id ) {
*
* @param container DOM element
*/
-function unMarkAllRows( container_id ) {
+function unMarkAllRows( container_id )
+{
$("#"+container_id).find("input:checkbox:enabled").removeAttr('checked')
.parents("tr").removeClass("marked");
@@ -747,7 +756,8 @@ function unMarkAllRows( container_id ) {
* @param boolean state new value for checkbox (true or false)
* @return boolean always true
*/
-function setCheckboxes( container_id, state ) {
+function setCheckboxes( container_id, state )
+{
if(state) {
$("#"+container_id).find("input:checkbox").attr('checked', 'checked');
@@ -777,7 +787,8 @@ function setSelectOptions(the_form, the_select, do_check)
/**
* Sets current value for query box.
*/
-function setQuery(query) {
+function setQuery(query)
+{
if (codemirror_editor) {
codemirror_editor.setValue(query);
} else {
@@ -790,7 +801,8 @@ function setQuery(query) {
* Create quick sql statements.
*
*/
-function insertQuery(queryType) {
+function insertQuery(queryType)
+{
if (queryType == "clear") {
setQuery('');
return;
@@ -839,7 +851,8 @@ function insertQuery(queryType) {
* Inserts multiple fields.
*
*/
-function insertValueQuery() {
+function insertValueQuery()
+{
var myQuery = document.sqlform.sql_query;
var myListBox = document.sqlform.dummy;
@@ -884,14 +897,16 @@ function insertValueQuery() {
/**
* listbox redirection
*/
-function goToUrl(selObj, goToLocation) {
+function goToUrl(selObj, goToLocation)
+{
eval("document.location.href = '" + goToLocation + "pos=" + selObj.options[selObj.selectedIndex].value + "'");
}
/**
* getElement
*/
-function getElement(e,f){
+function getElement(e,f)
+{
if(document.layers){
f=(f)?f:self;
if(f.document.layers[e]) {
@@ -910,7 +925,8 @@ function getElement(e,f){
/**
* Refresh the WYSIWYG scratchboard after changes have been made
*/
-function refreshDragOption(e) {
+function refreshDragOption(e)
+{
var elm = $('#' + e);
if (elm.css('visibility') == 'visible') {
refreshLayout();
@@ -921,7 +937,8 @@ function refreshDragOption(e) {
/**
* Refresh/resize the WYSIWYG scratchboard
*/
-function refreshLayout() {
+function refreshLayout()
+{
var elm = $('#pdflayout')
var orientation = $('#orientation_opt').val();
if($('#paper_opt').length==1){
@@ -943,7 +960,8 @@ function refreshLayout() {
/**
* Show/hide the WYSIWYG scratchboard
*/
-function ToggleDragDrop(e) {
+function ToggleDragDrop(e)
+{
var elm = $('#' + e);
if (elm.css('visibility') == 'hidden') {
PDFinit(); /* Defined in pdf_pages.php */
@@ -961,7 +979,8 @@ function ToggleDragDrop(e) {
* PDF scratchboard: When a position is entered manually, update
* the fields inside the scratchboard.
*/
-function dragPlace(no, axis, value) {
+function dragPlace(no, axis, value)
+{
var elm = $('#table_' + no);
if (axis == 'x') {
elm.css('left', value + 'px');
@@ -973,7 +992,8 @@ function dragPlace(no, axis, value) {
/**
* Returns paper sizes for a given format
*/
-function pdfPaperSize(format, axis) {
+function pdfPaperSize(format, axis)
+{
switch (format.toUpperCase()) {
case '4A0':
if (axis == 'x') return 4767.87; else return 6740.79;
@@ -1301,7 +1321,8 @@ $(document).ready(function(){
* optional, defaults to 5000
* @return jQuery object jQuery Element that holds the message div
*/
-function PMA_ajaxShowMessage(message, timeout) {
+function PMA_ajaxShowMessage(message, timeout)
+{
//Handle the case when a empty data.message is passed. We don't want the empty message
if (message == '') {
@@ -1351,7 +1372,8 @@ function PMA_ajaxShowMessage(message, timeout) {
/**
* Removes the message shown for an Ajax operation when it's completed
*/
-function PMA_ajaxRemoveMessage($this_msgbox) {
+function PMA_ajaxRemoveMessage($this_msgbox)
+{
if ($this_msgbox != undefined && $this_msgbox instanceof jQuery) {
$this_msgbox
.stop(true, true)
@@ -1362,7 +1384,8 @@ function PMA_ajaxRemoveMessage($this_msgbox) {
/**
* Hides/shows the "Open in ENUM/SET editor" message, depending on the data type of the column currently selected
*/
-function PMA_showNoticeForEnum(selectElement) {
+function PMA_showNoticeForEnum(selectElement)
+{
var enum_notice_id = selectElement.attr("id").split("_")[1];
enum_notice_id += "_" + (parseInt(selectElement.attr("id").split("_")[2]) + 1);
var selectedType = selectElement.attr("value");
@@ -1376,7 +1399,8 @@ function PMA_showNoticeForEnum(selectElement) {
/**
* Generates a dialog box to pop up the create_table form
*/
-function PMA_createTableDialog( div, url , target) {
+function PMA_createTableDialog( div, url , target)
+{
/**
* @var button_options Object that stores the options passed to jQueryUI
* dialog
@@ -1439,7 +1463,8 @@ function PMA_createTableDialog( div, url , target) {
*
* @return object The created highcharts instance
*/
-function PMA_createChart(passedSettings) {
+function PMA_createChart(passedSettings)
+{
var container = passedSettings.chart.renderTo;
var settings = {
@@ -1574,7 +1599,8 @@ function PMA_createChart(passedSettings) {
/*
* Creates a Profiling Chart. Used in sql.php and server_status.js
*/
-function PMA_createProfilingChart(data, options) {
+function PMA_createProfilingChart(data, options)
+{
return PMA_createChart($.extend(true, {
chart: {
renderTo: 'profilingchart',
@@ -1608,7 +1634,8 @@ function PMA_createProfilingChart(data, options) {
}
// Formats a profiling duration nicely. Used in PMA_createProfilingChart() and server_status.js
-function PMA_prettyProfilingNum(num, acc) {
+function PMA_prettyProfilingNum(num, acc)
+{
if (!acc) {
acc = 2;
}
@@ -2203,7 +2230,8 @@ $(document).ready(function() {
});
});
-function PMA_verifyTypeOfAllColumns() {
+function PMA_verifyTypeOfAllColumns()
+{
$("select[class='column_type']").each(function() {
PMA_showNoticeForEnum($(this));
});
@@ -2212,7 +2240,8 @@ function PMA_verifyTypeOfAllColumns() {
/**
* Closes the ENUM/SET editor and removes the data in it
*/
-function disable_popup() {
+function disable_popup()
+{
$("#popup_background").fadeOut("fast");
$("#enum_editor").fadeOut("fast");
// clear the data from the text boxes
@@ -2308,7 +2337,8 @@ $(document).ready(function() {
displayMoreTableOpts();
});
-function displayMoreTableOpts() {
+function displayMoreTableOpts()
+{
// Remove the actions from the table cells (they are available by default for JavaScript-disabled browsers)
// if the table is not a view or information_schema (otherwise there is only one action to hide and there's no point)
if($("input[type='hidden'][name='table_type']").val() == "table") {
@@ -2425,7 +2455,8 @@ function checkIndexName(form_id)
* ommit this parameter the function searches
* the footnotes in the whole body
**/
-function PMA_convertFootnotesToTooltips($div) {
+function PMA_convertFootnotesToTooltips($div)
+{
// Hide the footnotes from the footer (which are displayed for
// JavaScript-disabled browsers) since the tooltip is sufficient
@@ -2571,14 +2602,16 @@ $(function() {
/**
* Get the row number from the classlist (for example, row_1)
*/
-function PMA_getRowNumber(classlist) {
+function PMA_getRowNumber(classlist)
+{
return parseInt(classlist.split(/\s+row_/)[1]);
}
/**
* Changes status of slider
*/
-function PMA_set_status_label(id) {
+function PMA_set_status_label(id)
+{
if ($('#' + id).css('display') == 'none') {
$('#anchor_status_' + id).text('+ ');
} else {
@@ -2589,7 +2622,8 @@ function PMA_set_status_label(id) {
/**
* Initializes slider effect.
*/
-function PMA_init_slider() {
+function PMA_init_slider()
+{
$('.pma_auto_slider').each(function(idx, e) {
if ($(e).hasClass('slider_init_done')) return;
$(e).addClass('slider_init_done');
@@ -2870,7 +2904,8 @@ $(document).ready(function() {
*
* @return bool True on success, false on failure
*/
-function PMA_slidingMessage(msg, $obj) {
+function PMA_slidingMessage(msg, $obj)
+{
if (msg == undefined || msg.length == 0) {
// Don't show an empty message
return false;
@@ -3041,7 +3076,8 @@ $(document).ready(function() {
* Create default PMA tooltip for the element specified. The default appearance
* can be overriden by specifying optional "options" parameter (see qTip options).
*/
-function PMA_createqTip($elements, content, options) {
+function PMA_createqTip($elements, content, options)
+{
var o = {
content: content,
style: {
diff --git a/js/import.js b/js/import.js
index 8445716..68a3793 100644
--- a/js/import.js
+++ b/js/import.js
@@ -9,10 +9,11 @@
* Toggles the hiding and showing of each plugin's options
* according to the currently selected plugin from the dropdown list
*/
-function changePluginOpts() {
- $(".format_specific_options").each(function() {
+function changePluginOpts()
+{
+ $(".format_specific_options").each(function() {
$(this).hide();
- });
+ });
var selected_plugin_name = $("#plugins option:selected").attr("value");
$("#" + selected_plugin_name + "_options").fadeIn('slow');
if(selected_plugin_name == "csv") {
@@ -26,7 +27,8 @@ function changePluginOpts() {
* Toggles the hiding and showing of each plugin's options and sets the selected value
* in the plugin dropdown list according to the format of the selected file
*/
-function matchFile(fname) {
+function matchFile(fname)
+{
var fname_array = fname.toLowerCase().split(".");
var len = fname_array.length;
if(len != 0) {
@@ -43,7 +45,7 @@ function matchFile(fname) {
}
}
$(document).ready(function() {
- // Initially display the options for the selected plugin
+ // Initially display the options for the selected plugin
changePluginOpts();
// Whenever the selected plugin changes, change the options displayed
@@ -79,4 +81,4 @@ $(document).ready(function() {
$("#scroll_to_options_msg").hide();
$(".format_specific_options").css({ "border": 0, "margin": 0, "padding": 0 });
$(".format_specific_options h3").remove();
-});
\ No newline at end of file
+});
diff --git a/js/keyhandler.js b/js/keyhandler.js
index f92c7fb..63a13fa 100644
--- a/js/keyhandler.js
+++ b/js/keyhandler.js
@@ -3,7 +3,8 @@
*
* @param object event data
*/
-function onKeyDownArrowsHandler(e) {
+function onKeyDownArrowsHandler(e)
+{
e = e||window.event;
var o = (e.srcElement||e.target);
if (!o) return;
diff --git a/js/navigation.js b/js/navigation.js
index 5ce805c..c70d428 100644
--- a/js/navigation.js
+++ b/js/navigation.js
@@ -17,7 +17,8 @@ var pma_saveframesize_timeout = null;
* @param string id id of the element in the DOM
* @param boolean only_open do not close/hide element
*/
-function toggle(id, only_open) {
+function toggle(id, only_open)
+{
var el = document.getElementById('subel' + id);
if (! el) {
return false;
@@ -104,7 +105,8 @@ function PMA_setFrameSize()
* @param string name name of the value to retrieve
* @return string value value for the given name from cookie
*/
-function PMA_getCookie(name) {
+function PMA_getCookie(name)
+{
var start = document.cookie.indexOf(name + "=");
var len = start + name.length + 1;
if ((!start) && (name != document.cookie.substring(0, name.length))) {
@@ -130,7 +132,8 @@ function PMA_getCookie(name) {
* @param string domain
* @param boolean secure
*/
-function PMA_setCookie(name, value, expires, path, domain, secure) {
+function PMA_setCookie(name, value, expires, path, domain, secure)
+{
document.cookie = name + "=" + escape(value) +
( (expires) ? ";expires=" + expires.toGMTString() : "") +
( (path) ? ";path=" + path : "") +
@@ -144,7 +147,8 @@ function PMA_setCookie(name, value, expires, path, domain, secure) {
* @param string value requested value
*
*/
-function fast_filter(value){
+function fast_filter(value)
+{
lowercase_value = value.toLowerCase();
$("#subel0 a[class!='tableicon']").each(function(idx,elem){
$elem = $(elem);
@@ -160,7 +164,8 @@ function fast_filter(value){
/**
* Clears fast filter.
*/
-function clear_fast_filter() {
+function clear_fast_filter()
+{
var elm = $('#NavFilter input');
elm.val('');
fast_filter('');
@@ -170,7 +175,8 @@ function clear_fast_filter() {
/**
* Reloads the recent tables list.
*/
-function PMA_reloadRecentTable() {
+function PMA_reloadRecentTable()
+{
$.get('navigation.php', {
'token': window.parent.token,
'server': window.parent.server,
diff --git a/js/replication.js b/js/replication.js
index 1a7c785..04cf86e 100644
--- a/js/replication.js
+++ b/js/replication.js
@@ -1,13 +1,14 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
- * for server_replication.php
+ * for server_replication.php
*
*/
var random_server_id = Math.floor(Math.random() * 10000000);
var conf_prefix = "server-id=" + random_server_id + "<br />log-bin=mysql-bin<br />log-error=mysql-bin.err<br />";
-function update_config() {
+function update_config()
+{
var conf_ignore = "binlog_ignore_db=";
var conf_do = "binlog_do_db=";
var database_list = $('#db_select option:selected:first').val();
@@ -30,24 +31,24 @@ $(document).ready(function() {
$('#db_select').change(update_config);
$('#master_status_href').click(function() {
- $('#replication_master_section').toggle();
+ $('#replication_master_section').toggle();
});
$('#master_slaves_href').click(function() {
- $('#replication_slaves_section').toggle();
+ $('#replication_slaves_section').toggle();
});
$('#slave_status_href').click(function() {
- $('#replication_slave_section').toggle();
+ $('#replication_slave_section').toggle();
});
$('#slave_control_href').click(function() {
- $('#slave_control_gui').toggle();
+ $('#slave_control_gui').toggle();
});
$('#slave_errormanagement_href').click(function() {
- $('#slave_errormanagement_gui').toggle();
+ $('#slave_errormanagement_gui').toggle();
});
$('#slave_synchronization_href').click(function() {
- $('#slave_synchronization_gui').toggle();
+ $('#slave_synchronization_gui').toggle();
});
$('#db_reset_href').click(function() {
- $('#db_select option:selected').attr('selected', false);
+ $('#db_select option:selected').attr('selected', false);
});
});
diff --git a/js/server_privileges.js b/js/server_privileges.js
index 35c34aa..c695dab 100644
--- a/js/server_privileges.js
+++ b/js/server_privileges.js
@@ -81,7 +81,8 @@ function checkAddUser(the_form)
* @param new_user_initial the first alphabet of the user's name
* @param new_user_initial_string html to replace the initial for pagination
*/
-function appendNewUser(new_user_string, new_user_initial, new_user_initial_string) {
+function appendNewUser(new_user_string, new_user_initial, new_user_initial_string)
+{
//Append the newly retrived user to the table now
//Calculate the index for the new row
diff --git a/js/server_variables.js b/js/server_variables.js
index 8776440..1aded3b 100644
--- a/js/server_variables.js
+++ b/js/server_variables.js
@@ -1,13 +1,14 @@
-function editVariable(link) {
+function editVariable(link)
+{
var varName = $(link).parent().parent().find('th:first').first().text().replace(/ /g,'_');
var mySaveLink = $(saveLink);
var myCancelLink = $(cancelLink);
var $cell = $(link).parent();
-
+
$cell.addClass('edit');
// remove edit link
$cell.find('a.editLink').remove();
-
+
mySaveLink.click(function() {
$.get('server_variables.php?' + url_query,
{ ajax_request: true, type: 'setval', varName: varName, varValue: $cell.find('input').attr('value') },
@@ -23,14 +24,14 @@ function editVariable(link) {
);
return false;
});
-
+
myCancelLink.click(function() {
$cell.html($cell.find('span.oldContent').html());
$cell.removeClass('edit');
return false;
});
-
-
+
+
$.get('server_variables.php?' + url_query,
{ ajax_request: true, type: 'getval', varName: varName },
function(data) {
@@ -42,17 +43,17 @@ function editVariable(link) {
$cell.find('table td:first').append(myCancelLink);
}
);
-
+
return false;
}
-$(function() {
+$(function() {
var textFilter=null;
var odd_row=false;
var testString = 'abcdefghijklmnopqrstuvwxyz0123456789,ABCEFGHIJKLMOPQRSTUVWXYZ';
var $tmpDiv;
var charWidth;
-
+
// Global vars
editLink = '<a href="#" class="editLink" onclick="return editVariable(this);"><img class="icon ic_b_edit" src="themes/dot.gif" alt=""> '+PMA_messages['strEdit']+'</a>';
saveLink = '<a href="#" class="saveLink"><img class="icon ic_b_save" src="themes/dot.gif" alt=""> '+PMA_messages['strSave']+'</a> ';
@@ -62,7 +63,7 @@ $(function() {
$.ajaxSetup({
cache:false
});
-
+
/* Variable editing */
if(isSuperuser) {
$('table.data tbody tr td:nth-child(2)').hover(
@@ -76,36 +77,36 @@ $(function() {
}
);
}
-
+
/*** This code snippet takes care that the table stays readable. It cuts off long strings the table overlaps the window size ***/
$('table.data').after($tmpDiv=$('<span>'+testString+'</span>'));
charWidth = $tmpDiv.width() / testString.length;
$tmpDiv.remove();
-
+
$(window).resize(limitTableWidth);
limitTableWidth();
-
+
function limitTableWidth() {
var fulltext;
var charDiff;
var maxTableWidth;
var $tmpTable;
-
+
$('table.data').after($tmpTable=$('<table id="testTable" style="width:100%;"><tr><td>'+testString+'</td></tr></table>'));
- maxTableWidth = $('#testTable').width();
+ maxTableWidth = $('#testTable').width();
$tmpTable.remove();
charDiff = ($('table.data').width()-maxTableWidth) / charWidth;
-
+
if($('body').innerWidth() < $('table.data').width()+10 || $('body').innerWidth() > $('table.data').width()+20) {
var maxChars=0;
-
+
$('table.data tbody tr td:nth-child(2)').each(function() {
maxChars=Math.max($(this).text().length,maxChars);
});
-
+
// Do not resize smaller if there's only 50 chars displayed already
if(charDiff > 0 && maxChars < 50) return;
-
+
$('table.data tbody tr td:nth-child(2)').each(function() {
if((charDiff>0 && $(this).text().length > maxChars-charDiff) || (charDiff<0 && $(this).find('abbr.cutoff').length>0)) {
if($(this).find('abbr.cutoff').length > 0)
@@ -115,7 +116,7 @@ $(function() {
// Do not cut off elements with html in it and hope they are not too long
if(fulltext.length != $(this).html().length) return 0;
}
-
+
if(fulltext.length < maxChars-charDiff)
$(this).html(fulltext);
else $(this).html('<abbr class="cutoff" title="'+fulltext+'">'+fulltext.substr(0,maxChars-charDiff-3)+'...</abbr>');
@@ -123,31 +124,31 @@ $(function() {
});
}
}
-
+
// Filter options are invisible for disabled js users
$('fieldset#tableFilter').css('display','');
-
+
$('#filterText').keyup(function(e) {
if($(this).val().length==0) textFilter=null;
else textFilter = new RegExp("(^| )"+$(this).val().replace(/_/g,' '),'i');
filterVariables();
});
-
+
function filterVariables() {
odd_row=false;
var mark_next=false;
var firstCell;
-
+
$('table.filteredData tbody tr').each(function() {
firstCell = $(this).children(':first');
-
+
if(mark_next || textFilter==null || textFilter.exec(firstCell.text())) {
// If current row is 'marked', also display next row
if($(this).hasClass('marked') && !mark_next)
mark_next=true;
else mark_next=false;
- odd_row = !odd_row;
+ odd_row = !odd_row;
$(this).css('display','');
if(odd_row) {
$(this).addClass('odd');
@@ -161,4 +162,4 @@ $(function() {
}
});
}
-});
\ No newline at end of file
+});
diff --git a/js/sql.js b/js/sql.js
index e762bb5..2b77af1 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -15,11 +15,13 @@ var $data_a;
* @param string str
* @return string the URL-decoded string
*/
-function PMA_urldecode(str) {
+function PMA_urldecode(str)
+{
return decodeURIComponent(str.replace(/\+/g, '%20'));
}
-function PMA_urlencode(str) {
+function PMA_urlencode(str)
+{
return encodeURIComponent(str.replace(/\%20/g, '+'));
}
@@ -29,7 +31,8 @@ function PMA_urlencode(str) {
*
* @param $this_field jQuery object that points to the current field's tr
*/
-function getFieldName($this_field) {
+function getFieldName($this_field)
+{
var this_field_index = $this_field.index();
// ltr or rtl direction does not impact how the DOM was generated
@@ -52,7 +55,8 @@ function getFieldName($this_field) {
* new inline edit anchor to each table row.
*
*/
-function appendInlineAnchor() {
+function appendInlineAnchor()
+{
// TODO: remove two lines below if vertical display mode has been completely removed
var disp_mode = $("#top_direction_dropdown").val();
@@ -1090,7 +1094,8 @@ $(document).ready(function() {
* (when called in the situation where no posting was done, the data
* parameter is empty)
*/
-function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings, data) {
+function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings, data)
+{
// deleting the hide button. remove <br><br><a> tags
$del_hide.find('a, br').remove();
@@ -1183,7 +1188,8 @@ function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings,
* Starting from some th, change the class of all td under it.
* If isAddClass is specified, it will be used to determine whether to add or remove the class.
*/
-function PMA_changeClassForColumn($this_th, newclass, isAddClass) {
+function PMA_changeClassForColumn($this_th, newclass, isAddClass)
+{
// index 0 is the th containing the big T
var th_index = $this_th.index();
var has_big_t = !$this_th.closest('tr').children(':first').hasClass('column_heading');
@@ -1232,7 +1238,8 @@ $(document).ready(function() {
/*
* Profiling Chart
*/
-function makeProfilingChart() {
+function makeProfilingChart()
+{
if ($('#profilingchart').length == 0) {
return;
}
diff --git a/js/tbl_change.js b/js/tbl_change.js
index 5e6ce84..17677b9 100644
--- a/js/tbl_change.js
+++ b/js/tbl_change.js
@@ -64,7 +64,8 @@ function nullify(theType, urlField, md5Field, multi_edit)
* Start of validation part
*/
//function checks the number of days in febuary
-function daysInFebruary (year){
+function daysInFebruary (year)
+{
return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
//function to convert single digit to double digit
@@ -143,7 +144,8 @@ function isTime(val)
return true;
}
-function verificationsAfterFieldChange(urlField, multi_edit, theType){
+function verificationsAfterFieldChange(urlField, multi_edit, theType)
+{
var evt = window.event || arguments.callee.caller.arguments[0];
var target = evt.target || evt.srcElement;
@@ -226,23 +228,23 @@ $(document).ready(function() {
/**
* Handles all current checkboxes for Null; this only takes care of the
- * checkboxes on currently displayed rows as the rows generated by
- * "Continue insertion" are handled in the "Continue insertion" code
- *
+ * checkboxes on currently displayed rows as the rows generated by
+ * "Continue insertion" are handled in the "Continue insertion" code
+ *
*/
$('.checkbox_null').bind('click', function(e) {
nullify(
// use hidden fields populated by tbl_change.php
$(this).siblings('.nullify_code').val(),
- $(this).closest('tr').find('input:hidden').first().val(),
+ $(this).closest('tr').find('input:hidden').first().val(),
$(this).siblings('.hashed_field').val(),
$(this).siblings('.multi_edit').val()
);
});
/**
- * Submission of data to be inserted or updated
- *
+ * Submission of data to be inserted or updated
+ *
* @uses PMA_ajaxShowMessage()
*
* This section has been deactivated. Here are the problems that I've
@@ -257,9 +259,9 @@ $(document).ready(function() {
* 2. This code can be called if we are editing or inserting. If editing,
* the "and then" action can be "go back to this page" or "edit next
* row", in which cases it makes sense to use AJAX. But the "go back
- * to previous page" and "insert another new row" actions, using AJAX
+ * to previous page" and "insert another new row" actions, using AJAX
* has no obvious advantage. If inserting, the "go back to previous"
- * action needs a page refresh anyway.
+ * action needs a page refresh anyway.
*/
$("#insertFormDEACTIVATED").live('submit', function(event) {
@@ -388,8 +390,8 @@ $(document).ready(function() {
.bind('change', function(e) {
var $changed_element = $(this);
verificationsAfterFieldChange(
- $changed_element.data('hashed_field'),
- $changed_element.data('new_row_index'),
+ $changed_element.data('hashed_field'),
+ $changed_element.data('new_row_index'),
$changed_element.closest('tr').find('span.column_type').html()
);
});
@@ -401,15 +403,15 @@ $(document).ready(function() {
// to the original row, not the cloned one, so unbind()
.unbind('click')
// Keep these values to be used when the element
- // will be clicked
+ // will be clicked
.data('hashed_field', hashed_field)
.data('new_row_index', new_row_index)
.bind('click', function(e) {
var $changed_element = $(this);
nullify(
$changed_element.siblings('.nullify_code').val(),
- $this_element.closest('tr').find('input:hidden').first().val(),
- $changed_element.data('hashed_field'),
+ $this_element.closest('tr').find('input:hidden').first().val(),
+ $changed_element.data('hashed_field'),
'[multi_edit][' + $changed_element.data('new_row_index') + ']'
);
});
@@ -461,7 +463,7 @@ $(document).ready(function() {
// IMO it's not really important to handle the tabindex for
// function and Null
var tabindex = 0;
- $('.textfield')
+ $('.textfield')
.each(function() {
tabindex++;
$(this).attr('tabindex', tabindex);
diff --git a/js/tbl_chart.js b/js/tbl_chart.js
index 16a83b0..bec9a5c 100644
--- a/js/tbl_chart.js
+++ b/js/tbl_chart.js
@@ -7,25 +7,25 @@ $(document).ready(function() {
var chart_data = jQuery.parseJSON($('#querychart').html());
chart_series = 'columns';
chart_xaxis_idx = $('select[name="chartXAxis"]').attr('value');
-
+
$('#resizer').resizable({
minHeight:240,
minWidth:300,
- // On resize, set the chart size to that of the
+ // On resize, set the chart size to that of the
// resizer minus padding. If your chart has a lot of data or other
- // content, the redrawing might be slow. In that case, we recommend
+ // content, the redrawing might be slow. In that case, we recommend
// that you use the 'stop' event instead of 'resize'.
resize: function() {
currentChart.setSize(
- this.offsetWidth - 20,
+ this.offsetWidth - 20,
this.offsetHeight - 20,
false
);
}
- });
-
+ });
+
var currentSettings = {
- chart: {
+ chart: {
type: 'line',
width: $('#resizer').width() - 20,
height: $('#resizer').height() - 20
@@ -36,28 +36,28 @@ $(document).ready(function() {
yAxis: {
title: { text: $('input[name="yaxis_label"]').attr('value') }
},
- title: {
- text: $('input[name="chartTitle"]').attr('value'),
- margin:20
+ title: {
+ text: $('input[name="chartTitle"]').attr('value'),
+ margin:20
},
plotOptions: {
series: {}
}
}
-
+
$('#querychart').html('');
-
+
$('input[name="chartType"]').click(function() {
currentSettings.chart.type = $(this).attr('value');
-
+
drawChart();
-
+
if($(this).attr('value') == 'bar' || $(this).attr('value') == 'column')
$('span.barStacked').show();
else
$('span.barStacked').hide();
});
-
+
$('input[name="barStacked"]').click(function() {
if(this.checked)
$.extend(true,currentSettings,{ plotOptions: { series: { stacking:'normal' } } });
@@ -65,13 +65,13 @@ $(document).ready(function() {
$.extend(true,currentSettings,{ plotOptions: { series: { stacking:null } } });
drawChart();
});
-
+
$('input[name="chartTitle"]').keyup(function() {
var title = $(this).attr('value');
if(title.length == 0) title = ' ';
currentChart.setTitle({ text: title });
});
-
+
$('select[name="chartXAxis"]').change(function() {
chart_xaxis_idx = this.value;
drawChart();
@@ -81,7 +81,7 @@ $(document).ready(function() {
chart_series_index = this.selectedIndex;
drawChart();
});
-
+
/* Sucks, we cannot just set axis labels, we have to redraw the chart completely */
$('input[name="xaxis_label"]').keyup(function() {
currentSettings.xAxis.title.text = $(this).attr('value');
@@ -91,56 +91,58 @@ $(document).ready(function() {
currentSettings.yAxis.title.text = $(this).attr('value');
drawChart(true);
});
-
+
function drawChart(noAnimation) {
currentSettings.chart.width = $('#resizer').width() - 20;
currentSettings.chart.height = $('#resizer').height() - 20;
-
+
if(currentChart != null) currentChart.destroy();
-
+
if(noAnimation) currentSettings.plotOptions.series.animation = false;
currentChart = PMA_queryChart(chart_data,currentSettings);
if(noAnimation) currentSettings.plotOptions.series.animation = true;
}
-
+
drawChart();
$('#querychart').show();
});
-function in_array(element,array) {
+function in_array(element,array)
+{
for(var i=0; i < array.length; i++)
if(array[i] == element) return true;
return false;
}
-function PMA_queryChart(data,passedSettings) {
+function PMA_queryChart(data,passedSettings)
+{
if($('#querychart').length == 0) return;
-
+
var columnNames = Array();
-
+
var series = new Array();
var xaxis = { type: 'linear' };
var yaxis = new Object();
-
+
$.each(data[0],function(index,element) {
columnNames.push(index);
- });
-
+ });
+
switch(passedSettings.chart.type) {
case 'column':
case 'spline':
case 'line':
case 'bar':
xaxis.categories = new Array();
-
+
if(chart_series == 'columns') {
var j = 0;
- for(var i=0; i<columnNames.length; i++)
+ for(var i=0; i<columnNames.length; i++)
if(i != chart_xaxis_idx) {
series[j] = new Object();
series[j].data = new Array();
series[j].name = columnNames[i];
-
+
$.each(data,function(key,value) {
series[j].data.push(parseFloat(value[columnNames[i]]));
if( j== 0 && chart_xaxis_idx != -1 && ! xaxis.categories[value[columnNames[chart_xaxis_idx]]])
@@ -156,7 +158,7 @@ function PMA_queryChart(data,passedSettings) {
var contains = false;
for(var i=0; i < series.length; i++)
if(series[i].name == element[chart_series]) contains = true;
-
+
if(!contains) {
seriesIndex[element[chart_series]] = j;
series[j] = new Object();
@@ -165,24 +167,24 @@ function PMA_queryChart(data,passedSettings) {
j++;
}
});
-
+
var type;
// Get series points from query data
$.each(data,function(key,value) {
type = value[chart_series];
series[seriesIndex[type]].data.push(parseFloat(value[columnNames[0]]));
-
+
if( !in_array(value[columnNames[chart_xaxis_idx]],xaxis.categories))
xaxis.categories.push(value[columnNames[chart_xaxis_idx]]);
});
}
-
-
-
+
+
+
if(columnNames.length == 2)
yaxis.title = { text: columnNames[0] };
break;
-
+
case 'pie':
series[0] = new Object();
series[0].data = new Array();
@@ -194,17 +196,17 @@ function PMA_queryChart(data,passedSettings) {
});
break;
}
-
+
// Prevent the user from seeing the JSON code
$('div#profilingchart').html('').show();
var settings = {
- chart: {
+ chart: {
renderTo: 'querychart'
},
- title: {
- text: '',
- margin: 0
+ title: {
+ text: '',
+ margin: 0
},
series: series,
xAxis: xaxis,
@@ -224,17 +226,17 @@ function PMA_queryChart(data,passedSettings) {
},
tooltip: {
formatter: function() {
- if(this.point.name) return '<b>'+this.series.name+'</b><br/>'+this.point.name+'<br/>'+this.y;
- return '<b>'+this.series.name+'</b><br/>'+this.y;
+ if(this.point.name) return '<b>'+this.series.name+'</b><br/>'+this.point.name+'<br/>'+this.y;
+ return '<b>'+this.series.name+'</b><br/>'+this.y;
}
}
};
if(passedSettings.chart.type == 'pie')
settings.tooltip.formatter = function() { return '<b>'+columnNames[0]+'</b><br/>'+this.y; }
-
+
// Overwrite/Merge default settings with passedsettings
$.extend(true,settings,passedSettings);
-
+
return PMA_createChart(settings);
}
diff --git a/js/tbl_gis_visualization.js b/js/tbl_gis_visualization.js
index 81a86c4..978cd69 100644
--- a/js/tbl_gis_visualization.js
+++ b/js/tbl_gis_visualization.js
@@ -15,7 +15,8 @@ var svg;
/**
* Zooms and pans the visualization.
*/
-function zoomAndPan() {
+function zoomAndPan()
+{
var g = svg.getElementById('groupPanel');
g.setAttribute('transform', 'translate(' + x + ', ' + y + ') scale(' + scale + ')');
@@ -173,7 +174,7 @@ $(document).ready(function() {
y = height / 2 - (height / 2 - y) * 1.5;
zoomAndPan();
});
-
+
$('#zoom_world').live('click', function(e) {
e.preventDefault();
scale = 1;
@@ -181,7 +182,7 @@ $(document).ready(function() {
y = 0;
zoomAndPan();
});
-
+
$('#zoom_out').live('click', function(e) {
e.preventDefault();
//zoom out
@@ -239,7 +240,7 @@ $(document).ready(function() {
}).appendTo("body").fadeIn(200);
}
});
-
+
/**
* Detect the mouseout event and hide tooltips.
*/
diff --git a/js/tbl_relation.js b/js/tbl_relation.js
index 5cdb0d7..74cb409 100644
--- a/js/tbl_relation.js
+++ b/js/tbl_relation.js
@@ -1,9 +1,10 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
- * for tbl_relation.php
+ * for tbl_relation.php
*
*/
-function show_hide_clauses(thisDropdown) {
+function show_hide_clauses(thisDropdown)
+{
// here, one span contains the label and the clause dropdown
// and we have one span for ON DELETE and one for ON UPDATE
//
diff --git a/js/tbl_structure.js b/js/tbl_structure.js
index 897cad8..63fa60f 100644
--- a/js/tbl_structure.js
+++ b/js/tbl_structure.js
@@ -341,7 +341,7 @@ $(document).ready(function() {
**/
$("#addColumns.ajax input[value=Go]").live('click', function(event){
event.preventDefault();
-
+
/*Remove the hidden dialogs if there are*/
if ($('#add_columns').length != 0) {
$('#add_columns').remove();
@@ -349,7 +349,7 @@ $(document).ready(function() {
var $div = $('<div id="add_columns"></div>');
var $form = $("#addColumns");
-
+
/**
* @var button_options Object that stores the options passed to jQueryUI
* dialog
@@ -389,7 +389,7 @@ $(document).ready(function() {
//Remove the top menu container from the dialog
.find("#topmenucontainer").hide()
; // end dialog options
-
+
$div = $("#add_columns");
/*changed the z-index of the enum editor to allow the edit*/
$("#enum_editor").css("z-index", "1100");
@@ -399,7 +399,7 @@ $(document).ready(function() {
}) // end $.get()
});
-
+
}) // end $(document).ready()
@@ -411,7 +411,8 @@ $(document).ready(function() {
* @param string $url Variable which parses the data for the
* post action
*/
-function changeColumns(action,url) {
+function changeColumns(action,url)
+{
/*Remove the hidden dialogs if there are*/
if ($('#change_column_dialog').length != 0) {
$('#change_column_dialog').remove();
diff --git a/js/update-location.js b/js/update-location.js
index d271cc8..3b9c51d 100644
--- a/js/update-location.js
+++ b/js/update-location.js
@@ -10,13 +10,14 @@ var hash_init_done = 0;
/**
* Sets hash part in URL, either calls itself in parent frame or does the
- * work itself. The hash is not set directly if we did not yet process old
+ * work itself. The hash is not set directly if we did not yet process old
* one.
*/
-function setURLHash(hash) {
+function setURLHash(hash)
+{
if (jQuery.browser.webkit) {
- /*
- * Setting hash leads to reload in webkit:
+ /*
+ * Setting hash leads to reload in webkit:
* http://www.quirksmode.org/bugreports/archives/2005/05/Safari_13_visual_anom…
*/
return;
diff --git a/libraries/advisor.lib.php b/libraries/advisor.lib.php
index 660f90d..1f00a13 100644
--- a/libraries/advisor.lib.php
+++ b/libraries/advisor.lib.php
@@ -169,7 +169,8 @@ class Advisor {
}
}
-function PMA_bytime($num, $precision) {
+function PMA_bytime($num, $precision)
+{
$per = '';
if ($num >= 1) { # per second
$per = "per second";
diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php
index 9360b9a..4615c55 100644
--- a/libraries/auth/cookie.auth.lib.php
+++ b/libraries/auth/cookie.auth.lib.php
@@ -81,7 +81,8 @@ if (function_exists('mcrypt_encrypt')) {
*
* @access public
*/
-function PMA_get_blowfish_secret() {
+function PMA_get_blowfish_secret()
+{
if (empty($GLOBALS['cfg']['blowfish_secret'])) {
if (empty($_SESSION['auto_blowfish_secret'])) {
// this returns 23 characters
diff --git a/libraries/auth/signon.auth.lib.php b/libraries/auth/signon.auth.lib.php
index 0a079b2..976845c 100644
--- a/libraries/auth/signon.auth.lib.php
+++ b/libraries/auth/signon.auth.lib.php
@@ -18,7 +18,8 @@
*
* @access public
*/
-function PMA_auth() {
+function PMA_auth()
+{
unset($_SESSION['LAST_SIGNON_URL']);
if (empty($GLOBALS['cfg']['Server']['SignonURL'])) {
PMA_fatalError('You must set SignonURL!');
diff --git a/libraries/build_html_for_db.lib.php b/libraries/build_html_for_db.lib.php
index 6f4357c..8d64549 100644
--- a/libraries/build_html_for_db.lib.php
+++ b/libraries/build_html_for_db.lib.php
@@ -13,7 +13,8 @@ if (! defined('PHPMYADMIN')) {
*
* @return array
*/
-function PMA_getColumnOrder() {
+function PMA_getColumnOrder()
+{
$column_order['DEFAULT_COLLATION_NAME'] = array(
'disp_name' => __('Collation'),
@@ -70,7 +71,8 @@ function PMA_getColumnOrder() {
*
* @return array $column_order, $out
*/
-function PMA_buildHtmlForDb($current, $is_superuser, $checkall, $url_query, $column_order, $replication_types, $replication_info) {
+function PMA_buildHtmlForDb($current, $is_superuser, $checkall, $url_query, $column_order, $replication_types, $replication_info)
+{
$out = '';
if ($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) {
diff --git a/libraries/charset_conversion.lib.php b/libraries/charset_conversion.lib.php
index b3ae693..8d19ad4 100644
--- a/libraries/charset_conversion.lib.php
+++ b/libraries/charset_conversion.lib.php
@@ -67,7 +67,8 @@ if ($PMA_recoding_engine == PMA_CHARSET_ICONV_AIX) {
* @access public
*
*/
-function PMA_convert_string($src_charset, $dest_charset, $what) {
+function PMA_convert_string($src_charset, $dest_charset, $what)
+{
if ($src_charset == $dest_charset) {
return $what;
}
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 13983de..cc89c85 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -410,7 +410,8 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju
*
* @access public
*/
-function PMA_showDocu($anchor) {
+function PMA_showDocu($anchor)
+{
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
return '<a href="Documentation.html#' . $anchor . '" target="documentation"><img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>';
} else {
@@ -426,7 +427,8 @@ function PMA_showDocu($anchor) {
*
* @access public
*/
-function PMA_showPHPDocu($target) {
+function PMA_showPHPDocu($target)
+{
$url = PMA_getPHPDocLink($target);
if ($GLOBALS['cfg']['ReplaceHelpImg']) {
@@ -2142,7 +2144,8 @@ function PMA_pageselector($rows, $pageNow = 1, $nbTotalPage = 1,
*
* @access public
*/
-function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_count) {
+function PMA_listNavigator($count, $pos, $_url_params, $script, $frame, $max_count)
+{
if ($max_count < $count) {
echo 'frame_navigation' == $frame ? '<div id="navidbpageselector">' . "\n" : '';
@@ -2279,7 +2282,8 @@ function PMA_externalBug($functionality, $component, $minimum_version, $bugref)
* @param boolean $checked is it initially checked?
* @param boolean $onclick should it submit the form on click?
*/
-function PMA_display_html_checkbox($html_field_name, $label, $checked, $onclick) {
+function PMA_display_html_checkbox($html_field_name, $label, $checked, $onclick)
+{
echo '<input type="checkbox" name="' . $html_field_name . '" id="' . $html_field_name . '"' . ($checked ? ' checked="checked"' : '') . ($onclick ? ' onclick="this.form.submit();"' : '') . ' /><label for="' . $html_field_name . '">' . $label . '</label>';
}
@@ -2294,7 +2298,8 @@ function PMA_display_html_checkbox($html_field_name, $label, $checked, $onclick)
* @param boolean $escape_label whether to use htmlspecialchars() on label
* @param string $class enclose each choice with a div of this class
*/
-function PMA_display_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true, $escape_label = true, $class='') {
+function PMA_display_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true, $escape_label = true, $class='')
+{
foreach ($choices as $choice_value => $choice_label) {
if (! empty($class)) {
echo '<div class="' . $class . '">';
@@ -2452,7 +2457,8 @@ function PMA_toggleButton($action, $select_name, $options, $callback)
/**
* Clears cache content which needs to be refreshed on user change.
*/
-function PMA_clearUserCache() {
+function PMA_clearUserCache()
+{
PMA_cacheUnset('is_superuser', true);
}
@@ -2529,7 +2535,8 @@ function PMA_cacheUnset($var, $server = 0)
* @param integer $length
* @return string the printable value
*/
-function PMA_printable_bit_value($value, $length) {
+function PMA_printable_bit_value($value, $length)
+{
$printable = '';
for ($i = 0, $len_ceiled = ceil($length / 8); $i < $len_ceiled; $i++) {
$printable .= sprintf('%08d', decbin(ord(substr($value, $i, 1))));
@@ -2544,7 +2551,8 @@ function PMA_printable_bit_value($value, $length) {
* @param string $value
* @return boolean
*/
-function PMA_contains_nonprintable_ascii($value) {
+function PMA_contains_nonprintable_ascii($value)
+{
return preg_match('@[^[:print:]]@', $value);
}
@@ -2555,7 +2563,8 @@ function PMA_contains_nonprintable_ascii($value) {
* @param string $bit_default_value
* @return string the converted value
*/
-function PMA_convert_bit_default_value($bit_default_value) {
+function PMA_convert_bit_default_value($bit_default_value)
+{
return strtr($bit_default_value, array("b" => "", "'