diff --git a/ChangeLog b/ChangeLog index 67d43b5e9f..9f3c162359 100644 --- a/ChangeLog +++ b/ChangeLog @@ -41,6 +41,9 @@ phpMyAdmin - ChangeLog + [interface] Improved server monitoring + AJAX for table Structure column Add +3.4.5.0 (not yet released) +- bug #3375325 [interface] Page list in navigation frame looks odd + 3.4.4.0 (not yet released) - bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes - bug #3323101 [parser] Invalid escape sequence in SQL parser diff --git a/js/codemirror/lib/codemirror.js b/js/codemirror/lib/codemirror.js index 844c54a3ff..27bec72ff1 100644 --- a/js/codemirror/lib/codemirror.js +++ b/js/codemirror/lib/codemirror.js @@ -21,7 +21,7 @@ var CodeMirror = (function() { wrapper.innerHTML = '
' + // Wraps and hides input textarea '
' + - '
' + + '
' + '
' + // Set to the height of the text, causes scrolling '
' + '
' + // Moved around its parent to cover visible view @@ -72,19 +72,17 @@ var CodeMirror = (function() { var editing, bracketHighlighted; // Tracks the maximum line length so that the horizontal scrollbar // can be kept static when scrolling. - var maxLine = ""; + var maxLine = "", maxWidth; - // Initialize the content. Somewhat hacky (delayed prepareInput) - // to work around browser issues. + // Initialize the content. operation(function(){setValue(options.value || ""); updateInput = false;})(); - setTimeout(prepareInput, 20); // Register our event handlers. connect(scroller, "mousedown", operation(onMouseDown)); // Gecko browsers fire contextmenu *after* opening the menu, at // which point we can't mess with it anymore. Context menu is // handled in onMouseDown for Gecko. - if (!gecko) connect(scroller, "contextmenu", operation(onContextMenu)); + if (!gecko) connect(scroller, "contextmenu", onContextMenu); connect(code, "dblclick", operation(onDblClick)); connect(scroller, "scroll", function() {updateDisplay([]); if (options.onScroll) options.onScroll(instance);}); connect(window, "resize", function() {updateDisplay(true);}); @@ -94,8 +92,8 @@ var CodeMirror = (function() { connect(input, "focus", onFocus); connect(input, "blur", onBlur); - connect(scroller, "dragenter", function(e){e.stop();}); - connect(scroller, "dragover", function(e){e.stop();}); + connect(scroller, "dragenter", e_stop); + connect(scroller, "dragover", e_stop); connect(scroller, "drop", operation(onDrop)); connect(scroller, "paste", function(){focusInput(); fastPoll();}); connect(input, "paste", function(){fastPoll();}); @@ -104,7 +102,7 @@ var CodeMirror = (function() { // IE throws unspecified error in certain cases, when // trying to access activeElement before onload var hasFocus; try { hasFocus = (targetDocument.activeElement == input); } catch(e) { } - if (hasFocus) onFocus(); + if (hasFocus) setTimeout(onFocus, 20); else onBlur(); function isLine(l) {return l >= 0 && l < lines.length;} @@ -124,6 +122,7 @@ var CodeMirror = (function() { if (option == "lineNumbers" || option == "gutter") gutterChanged(); else if (option == "mode" || option == "indentUnit") loadMode(); else if (option == "readOnly" && value == "nocursor") input.blur(); + else if (option == "theme") scroller.className = scroller.className.replace(/cm-s-\w+/, "cm-s-" + value); }, getOption: function(option) {return options[option];}, undo: operation(undo), @@ -135,6 +134,10 @@ var CodeMirror = (function() { pos = clipPos(pos); return lines[pos.line].getTokenAt(mode, getStateBefore(pos.line), pos.ch); }, + getStateAfter: function(line) { + line = clipLine(line == null ? lines.length - 1: line); + return getStateBefore(line + 1); + }, cursorCoords: function(start){ if (start == null) start = sel.inverted; return pageCoords(start ? sel.from : sel.to); @@ -151,13 +154,25 @@ var CodeMirror = (function() { clearMarker: removeGutterMarker, setLineClass: operation(setLineClass), lineInfo: lineInfo, - addWidget: function(pos, node, scroll) { - var pos = localCoords(clipPos(pos), true); - node.style.top = (showingFrom * lineHeight() + pos.yBot + paddingTop()) + "px"; - node.style.left = (pos.x + paddingLeft()) + "px"; + addWidget: function(pos, node, scroll, where) { + pos = localCoords(clipPos(pos)); + var top = pos.yBot, left = pos.x; + node.style.position = "absolute"; code.appendChild(node); + node.style.left = left + "px"; + if (where == "over") top = pos.y; + else if (where == "near") { + var vspace = Math.max(scroller.offsetHeight, lines.length * lineHeight()), + hspace = Math.max(code.clientWidth, lineSpace.clientWidth) - paddingLeft(); + if (pos.yBot + node.offsetHeight > vspace && pos.y > node.offsetHeight) + top = pos.y - node.offsetHeight; + if (left + node.offsetWidth > hspace) + left = hspace - node.offsetWidth; + } + node.style.top = (top + paddingTop()) + "px"; + node.style.left = (left + paddingLeft()) + "px"; if (scroll) - scrollIntoView(pos.x, pos.yBot, pos.x + node.offsetWidth, pos.yBot + node.offsetHeight); + scrollIntoView(left, top, left + node.offsetWidth, top + node.offsetHeight); }, lineCount: function() {return lines.length;}, @@ -184,7 +199,8 @@ var CodeMirror = (function() { operation: function(f){return operation(f)();}, refresh: function(){updateDisplay(true);}, getInputField: function(){return input;}, - getWrapperElement: function(){return wrapper;} + getWrapperElement: function(){return wrapper;}, + getScrollerElement: function(){return scroller;} }; function setValue(code) { @@ -202,28 +218,39 @@ var CodeMirror = (function() { } function onMouseDown(e) { + // Check whether this is a click in a widget + for (var n = e_target(e); n != wrapper; n = n.parentNode) + if (n.parentNode == code && n != mover) return; var ld = lastDoubleClick; lastDoubleClick = null; // First, see if this is a click in the gutter - for (var n = e.target(); n != wrapper; n = n.parentNode) + for (var n = e_target(e); n != wrapper; n = n.parentNode) if (n.parentNode == gutterText) { if (options.onGutterClick) options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom); - return e.stop(); + return e_preventDefault(e); } - if (gecko && e.button() == 3) onContextMenu(e); - if (e.button() != 1) return; + var start = posFromMouse(e); + + switch (e_button(e)) { + case 3: + if (gecko && !mac) onContextMenu(e); + return; + case 2: + if (start) setCursor(start.line, start.ch, true); + return; + } // For button 1, if it was clicked inside the editor // (posFromMouse returning non-null), we have to adjust the // selection. - var start = posFromMouse(e), last = start, going; - if (!start) {if (e.target() == scroller) e.stop(); return;} + if (!start) {if (e_target(e) == scroller) e_preventDefault(e); return;} if (!focused) onFocus(); - e.stop(); + e_preventDefault(e); if (ld && +new Date - ld < 400) return selectLine(start.line); setCursor(start.line, start.ch, true); + var last = start, going; // And then we have to see if it's a drag event, in which case // the dragged-over text must be selected. function end() { @@ -246,14 +273,14 @@ var CodeMirror = (function() { var move = connect(targetDocument, "mousemove", operation(function(e) { clearTimeout(going); - e.stop(); + e_preventDefault(e); extend(e); }), true); var up = connect(targetDocument, "mouseup", operation(function(e) { clearTimeout(going); var cur = posFromMouse(e); if (cur) setSelectionUser(start, cur); - e.stop(); + e_preventDefault(e); end(); }), true); } @@ -261,15 +288,14 @@ var CodeMirror = (function() { var pos = posFromMouse(e); if (!pos) return; selectWordAt(pos); - e.stop(); + e_preventDefault(e); lastDoubleClick = +new Date; } function onDrop(e) { - var pos = posFromMouse(e, true), files = e.e.dataTransfer.files; + e.preventDefault(); + var pos = posFromMouse(e, true), files = e.dataTransfer.files; if (!pos || options.readOnly) return; if (files && files.length && window.FileReader && window.File) { - var n = files.length, text = Array(n), read = 0; - for (var i = 0; i < n; ++i) loadFile(files[i], i); function loadFile(file, i) { var reader = new FileReader; reader.onload = function() { @@ -278,10 +304,12 @@ var CodeMirror = (function() { }; reader.readAsText(file); } + var n = files.length, text = Array(n), read = 0; + for (var i = 0; i < n; ++i) loadFile(files[i], i); } else { try { - var text = e.e.dataTransfer.getData("Text"); + var text = e.dataTransfer.getData("Text"); if (text) replaceRange(text, pos, pos); } catch(e){} @@ -290,25 +318,27 @@ var CodeMirror = (function() { function onKeyDown(e) { if (!focused) onFocus(); - var code = e.e.keyCode; + var code = e.keyCode; + // IE does strange things with escape. + if (ie && code == 27) { e.returnValue = false; } // Tries to detect ctrl on non-mac, cmd on mac. - var mod = (mac ? e.e.metaKey : e.e.ctrlKey) && !e.e.altKey, anyMod = e.e.ctrlKey || e.e.altKey || e.e.metaKey; - if (code == 16 || e.e.shiftKey) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from); + var mod = (mac ? e.metaKey : e.ctrlKey) && !e.altKey, anyMod = e.ctrlKey || e.altKey || e.metaKey; + if (code == 16 || e.shiftKey) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from); else shiftSelecting = null; // First give onKeyEvent option a chance to handle this. - if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e.e))) return; + if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; - if (code == 33 || code == 34) {scrollPage(code == 34); return e.stop();} // page up/down + if (code == 33 || code == 34) {scrollPage(code == 34); return e_preventDefault(e);} // page up/down if (mod && ((code == 36 || code == 35) || // ctrl-home/end mac && (code == 38 || code == 40))) { // cmd-up/down - scrollEnd(code == 36 || code == 38); return e.stop(); + scrollEnd(code == 36 || code == 38); return e_preventDefault(e); } - if (mod && code == 65) {selectAll(); return e.stop();} // ctrl-a + if (mod && code == 65) {selectAll(); return e_preventDefault(e);} // ctrl-a if (!options.readOnly) { if (!anyMod && code == 13) {return;} // enter - if (!anyMod && code == 9 && handleTab(e.e.shiftKey)) return e.stop(); // tab - if (mod && code == 90) {undo(); return e.stop();} // ctrl-z - if (mod && ((e.e.shiftKey && code == 90) || code == 89)) {redo(); return e.stop();} // ctrl-shift-z, ctrl-y + if (!anyMod && code == 9 && handleTab(e.shiftKey)) return e_preventDefault(e); // tab + if (mod && code == 90) {undo(); return e_preventDefault(e);} // ctrl-z + if (mod && ((e.shiftKey && code == 90) || code == 89)) {redo(); return e_preventDefault(e);} // ctrl-shift-z, ctrl-y } // Key id to use in the movementKeys map. We also pass it to @@ -328,42 +358,47 @@ var CodeMirror = (function() { fastPoll(curKeyId); } function onKeyUp(e) { - if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e.e))) return; + if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; if (reducedSelection) { reducedSelection = null; updateInput = true; } - if (e.e.keyCode == 16) shiftSelecting = null; + if (e.keyCode == 16) shiftSelecting = null; } function onKeyPress(e) { - if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e.e))) return; + if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; if (options.electricChars && mode.electricChars) { - var ch = String.fromCharCode(e.e.charCode == null ? e.e.keyCode : e.e.charCode); + var ch = String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode); if (mode.electricChars.indexOf(ch) > -1) setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 50); } - var code = e.e.keyCode; + var code = e.keyCode; // Re-stop tab and enter. Necessary on some browsers. - if (code == 13) {if (!options.readOnly) handleEnter(); e.stop();} - else if (!e.e.ctrlKey && !e.e.altKey && !e.e.metaKey && code == 9 && options.tabMode != "default") e.stop(); + if (code == 13) {if (!options.readOnly) handleEnter(); e_preventDefault(e);} + else if (!e.ctrlKey && !e.altKey && !e.metaKey && code == 9 && options.tabMode != "default") e_preventDefault(e); else fastPoll(curKeyId); } function onFocus() { if (options.readOnly == "nocursor") return; - if (!focused && options.onFocus) options.onFocus(instance); - focused = true; + if (!focused) { + if (options.onFocus) options.onFocus(instance); + focused = true; + if (wrapper.className.search(/\bCodeMirror-focused\b/) == -1) + wrapper.className += " CodeMirror-focused"; + if (!leaveInputAlone) prepareInput(); + } slowPoll(); - if (wrapper.className.search(/\bCodeMirror-focused\b/) == -1) - wrapper.className += " CodeMirror-focused"; restartBlink(); } function onBlur() { - if (focused && options.onBlur) options.onBlur(instance); + if (focused) { + if (options.onBlur) options.onBlur(instance); + focused = false; + wrapper.className = wrapper.className.replace(" CodeMirror-focused", ""); + } clearInterval(blinker); - shiftSelecting = null; - focused = false; - wrapper.className = wrapper.className.replace(" CodeMirror-focused", ""); + setTimeout(function() {if (!focused) shiftSelecting = null;}, 150); } // Replace the range from from to to by the strings in newText. @@ -386,6 +421,7 @@ var CodeMirror = (function() { var pos = clipPos({line: change.start + change.old.length - 1, ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])}); updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: lines[end-1].text.length}, change.old, pos, pos); + updateInput = true; } } function undo() {unredoHelper(history.done, history.undone);} @@ -393,7 +429,7 @@ var CodeMirror = (function() { function updateLinesNoUndo(from, to, newText, selFrom, selTo) { var recomputeMaxLength = false, maxLineLength = maxLine.length; - for (var i = from.line; i < to.line; ++i) { + for (var i = from.line; i <= to.line; ++i) { if (lines[i].text.length == maxLineLength) {recomputeMaxLength = true; break;} } @@ -427,12 +463,12 @@ var CodeMirror = (function() { for (var i = from.line, e = i + newText.length; i < e; ++i) { var l = lines[i].text; if (l.length > maxLineLength) { - maxLine = l; maxLineLength = l.length; + maxLine = l; maxLineLength = l.length; maxWidth = null; recomputeMaxLength = false; } } if (recomputeMaxLength) { - maxLineLength = 0; + maxLineLength = 0; maxLine = ""; maxWidth = null; for (var i = 0, e = lines.length; i < e; ++i) { var l = lines[i].text; if (l.length > maxLineLength) { @@ -449,7 +485,12 @@ var CodeMirror = (function() { if (task < from.line) newWork.push(task); else if (task > to.line) newWork.push(task + lendiff); } - if (newText.length) newWork.push(from.line); + if (newText.length < 5) { + highlightLines(from.line, from.line + newText.length); + newWork.push(from.line + newText.length); + } else { + newWork.push(from.line); + } work = newWork; startWorker(100); // Remember that these lines changed, for updating the display @@ -537,7 +578,7 @@ var CodeMirror = (function() { // to the data in the editing variable, and updates the editor // content or cursor if something changed. function readInput() { - if (leaveInputAlone) return; + if (leaveInputAlone || !focused) return; var changed = false, text = input.value, sr = selRange(input); if (!sr) return false; var changed = editing.text != text, rs = reducedSelection; @@ -565,13 +606,10 @@ var CodeMirror = (function() { // so that you can, for example, press shift-up at the start of // your selection and have the right thing happen. if (rs) { - from = sr.start == rs.anchor ? to : from; - to = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to; - if (!posLess(from, to)) { - reducedSelection = null; - sel.inverted = false; - var tmp = from; from = to; to = tmp; - } + var head = sr.start == rs.anchor ? to : from; + var tail = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to; + if (sel.inverted = posLess(head, tail)) { from = head; to = tail; } + else { reducedSelection = null; from = tail; to = head; } } // In some cases (cursor on same line as before), we don't have @@ -591,8 +629,8 @@ var CodeMirror = (function() { var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length; for (;;) { c = editing.text.charAt(edend); - if (c == "\n") endline--; if (text.charAt(end) != c) {++end; ++edend; break;} + if (c == "\n") endline--; if (edend <= start || end <= start) break; --end; --edend; } @@ -731,8 +769,15 @@ var CodeMirror = (function() { updateGutter(); } - var textWidth = stringWidth(maxLine); - lineSpace.style.width = textWidth > scroller.clientWidth ? textWidth + "px" : ""; + if (maxWidth == null) maxWidth = stringWidth(maxLine); + if (maxWidth > scroller.clientWidth) { + lineSpace.style.width = maxWidth + "px"; + // Needed to prevent odd wrapping/hiding of widgets placed in here. + code.style.width = ""; + code.style.width = scroller.scrollWidth + "px"; + } else { + lineSpace.style.width = code.style.width = ""; + } // Since this is all rather error prone, it is honoured with the // only assertion in the whole file. @@ -807,7 +852,7 @@ var CodeMirror = (function() { var hText = mover.offsetHeight, hEditor = scroller.clientHeight; gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px"; var html = []; - for (var i = showingFrom; i < showingTo; ++i) { + for (var i = showingFrom; i < Math.max(showingTo, showingFrom + 1); ++i) { var marker = lines[i].gutterMarker; var text = options.lineNumbers ? i + options.firstLineNumber : null; if (marker && marker.text) @@ -850,10 +895,9 @@ var CodeMirror = (function() { if (posEq(sel.from, from) && posEq(sel.to, to)) return; if (posLess(to, from)) {var tmp = to; to = from; from = tmp;} - var startEq = posEq(sel.to, to), endEq = posEq(sel.from, from); if (posEq(from, to)) sel.inverted = false; - else if (startEq && !endEq) sel.inverted = true; - else if (endEq && !startEq) sel.inverted = false; + else if (posEq(from, sel.to)) sel.inverted = false; + else if (posEq(to, sel.from)) sel.inverted = true; // Some ugly logic used to only mark the lines that actually did // see a change in selection as changed, rather than the whole @@ -926,12 +970,17 @@ var CodeMirror = (function() { indentLine(sel.from.line, options.enterMode == "keep" ? "prev" : "smart"); } function handleTab(shift) { + function indentSelected(mode) { + if (posEq(sel.from, sel.to)) return indentLine(sel.from.line, mode); + var e = sel.to.line - (sel.to.ch ? 0 : 1); + for (var i = sel.from.line; i <= e; ++i) indentLine(i, mode); + } shiftSelecting = null; switch (options.tabMode) { case "default": return false; case "indent": - for (var i = sel.from.line, e = sel.to.line; i <= e; ++i) indentLine(i, "smart"); + indentSelected("smart"); break; case "classic": if (posEq(sel.from, sel.to)) { @@ -940,7 +989,7 @@ var CodeMirror = (function() { break; } case "shift": - for (var i = sel.from.line, e = sel.to.line; i <= e; ++i) indentLine(i, shift ? "subtract" : "add"); + indentSelected(shift ? "subtract" : "add"); break; } return true; @@ -1121,7 +1170,9 @@ var CodeMirror = (function() { function paddingLeft() {return lineSpace.offsetLeft;} function posFromMouse(e, liberal) { - var offW = eltOffset(scroller, true), x = e.e.clientX, y = e.e.clientY; + var offW = eltOffset(scroller, true), x, y; + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX; y = e.clientY; } catch (e) { return null; } // This is a mess of a heuristic to try and determine whether a // scroll-bar was clicked or not, and to return null if one was // (and !liberal). @@ -1135,18 +1186,21 @@ var CodeMirror = (function() { var pos = posFromMouse(e); if (!pos || window.opera) return; // Opera is difficult. if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to)) - setCursor(pos.line, pos.ch); + operation(setCursor)(pos.line, pos.ch); var oldCSS = input.style.cssText; - input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.pageY() - 1) + - "px; left: " + (e.pageX() - 1) + "px; z-index: 1000; background: white; " + - "border-width: 0; outline: none; overflow: hidden;"; + inputDiv.style.position = "absolute"; + input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e_pageY(e) - 1) + + "px; left: " + (e_pageX(e) - 1) + "px; z-index: 1000; background: white; " + + "border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; + leaveInputAlone = true; var val = input.value = getSelection(); focusInput(); setSelRange(input, 0, input.value.length); - leaveInputAlone = true; function rehide() { - if (input.value != val) operation(replaceSelection)(input.value, "end"); + var newVal = splitLines(input.value).join("\n"); + if (newVal != val) operation(replaceSelection)(newVal, "end"); + inputDiv.style.position = "relative"; input.style.cssText = oldCSS; leaveInputAlone = false; prepareInput(); @@ -1154,7 +1208,7 @@ var CodeMirror = (function() { } if (gecko) { - e.stop() + e_stop(e); var mouseup = connect(window, "mouseup", function() { mouseup(); setTimeout(rehide, 20); @@ -1201,19 +1255,20 @@ var CodeMirror = (function() { } } } - for (var i = head.line, e = forward ? Math.min(i + 50, lines.length) : Math.max(-1, i - 50); i != e; i+=d) { + for (var i = head.line, e = forward ? Math.min(i + 100, lines.length) : Math.max(-1, i - 100); i != e; i+=d) { var line = lines[i], first = i == head.line; var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length); - if (found) { - var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; - var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style), - two = markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style); - var clear = operation(function(){one(); two();}); - if (autoclear) setTimeout(clear, 800); - else bracketHighlighted = clear; - break; - } + if (found) break; } + if (!found) found = {pos: null, match: false}; + var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; + var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style), + two = found.pos != null + ? markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style) + : function() {}; + var clear = operation(function(){one(); two();}); + if (autoclear) setTimeout(clear, 800); + else bracketHighlighted = clear; } // Finds the line to start with when starting a parse. Tries to @@ -1244,38 +1299,49 @@ var CodeMirror = (function() { line.highlight(mode, state); line.stateAfter = copyState(mode, state); } - if (!lines[n].stateAfter) work.push(n); + if (n < lines.length && !lines[n].stateAfter) work.push(n); return state; } + function highlightLines(start, end) { + var state = getStateBefore(start); + for (var i = start; i < end; ++i) { + var line = lines[i]; + line.highlight(mode, state); + line.stateAfter = copyState(mode, state); + } + } function highlightWorker() { var end = +new Date + options.workTime; - var didSomething = false; + var foundWork = work.length; while (work.length) { if (!lines[showingFrom].stateAfter) var task = showingFrom; else var task = work.pop(); if (task >= lines.length) continue; - didSomething = true; var start = findStartLine(task), state = start && lines[start-1].stateAfter; if (state) state = copyState(mode, state); else state = startState(mode); - var unchanged = 0; + var unchanged = 0, compare = mode.compareStates; for (var i = start, l = lines.length; i < l; ++i) { var line = lines[i], hadState = line.stateAfter; if (+new Date > end) { work.push(i); startWorker(options.workDelay); - changes.push({from: task, to: i}); + changes.push({from: task, to: i + 1}); return; } var changed = line.highlight(mode, state); line.stateAfter = copyState(mode, state); - if (changed || !hadState) unchanged = 0; - else if (++unchanged > 3) break; + if (compare) { + if (hadState && compare(hadState, state)) break; + } else { + if (changed || !hadState) unchanged = 0; + else if (++unchanged > 3) break; + } } - changes.push({from: task, to: i}); + changes.push({from: task, to: i + 1}); } - if (didSomething && options.onHighlightComplete) + if (foundWork && options.onHighlightComplete) options.onHighlightComplete(instance); } function startWorker(time) { @@ -1300,7 +1366,8 @@ var CodeMirror = (function() { // updateInput can be set to a boolean value to force/prevent an // update. - if (!leaveInputAlone && (updateInput === true || (updateInput !== false && selectionChanged))) + if (focused && !leaveInputAlone && + (updateInput === true || (updateInput !== false && selectionChanged))) prepareInput(); if (selectionChanged && options.matchBrackets) @@ -1427,9 +1494,21 @@ var CodeMirror = (function() { }, from: function() {if (this.atOccurrence) return copyPos(this.pos.from);}, - to: function() {if (this.atOccurrence) return copyPos(this.pos.to);} + to: function() {if (this.atOccurrence) return copyPos(this.pos.to);}, + + replace: function(newText) { + var self = this; + if (this.atOccurrence) + operation(function() { + self.pos.to = replaceRange(newText, self.pos.from, self.pos.to); + })(); + } }; + for (var ext in extensions) + if (extensions.propertyIsEnumerable(ext) && + !instance.propertyIsEnumerable(ext)) + instance[ext] = extensions[ext]; return instance; } // (end of function CodeMirror) @@ -1437,6 +1516,7 @@ var CodeMirror = (function() { CodeMirror.defaults = { value: "", mode: null, + theme: "default", indentUnit: 2, indentWithTabs: false, tabMode: "classic", @@ -1482,7 +1562,7 @@ var CodeMirror = (function() { return CodeMirror.getMode(options, "text/plain"); } return mfactory(options, config || {}); - } + }; CodeMirror.listModes = function() { var list = []; for (var m in modes) @@ -1496,6 +1576,11 @@ var CodeMirror = (function() { return list; }; + var extensions = {}; + CodeMirror.defineExtension = function(name, func) { + extensions[name] = func; + }; + CodeMirror.fromTextArea = function(textarea, options) { if (!options) options = {}; options.value = textarea.value; @@ -1727,7 +1812,7 @@ var CodeMirror = (function() { var str = st[i], l = str.length; if (ch + l > len) str = str.slice(0, len - ch); ch += l; - span(str, st[i+1]); + span(str, "cm-" + st[i+1]); } else { var pos = 0, i = 0, text = "", style, sg = 0; @@ -1759,12 +1844,12 @@ var CodeMirror = (function() { } for (;;) { var end = pos + text.length; - var apliedStyle = style; - if (extraStyle) apliedStyle = style ? style + extraStyle : extraStyle; - span(end > upto ? text.slice(0, upto - pos) : text, apliedStyle); + var appliedStyle = style; + if (extraStyle) appliedStyle = style ? style + extraStyle : extraStyle; + span(end > upto ? text.slice(0, upto - pos) : text, appliedStyle); if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} pos = end; - text = st[i++]; style = st[i++]; + text = st[i++]; style = "cm-" + st[i++]; } } if (sfrom != null && sto == null) span(" ", "CodeMirror-selected"); @@ -1822,44 +1907,44 @@ var CodeMirror = (function() { } }; - // Event stopping compatibility wrapper. - function stopEvent() { - if (this.preventDefault) {this.preventDefault(); this.stopPropagation();} - else {this.returnValue = false; this.cancelBubble = true;} - } + function stopMethod() {e_stop(this);} // Ensure an event has a stop method. function addStop(event) { - if (!event.stop) event.stop = stopEvent; + if (!event.stop) event.stop = stopMethod; return event; } - // Event wrapper, exposing the few operations we need. - function Event(orig) {this.e = orig;} - Event.prototype = { - stop: function() {stopEvent.call(this.e);}, - target: function() {return this.e.target || this.e.srcElement;}, - button: function() { - if (this.e.which) return this.e.which; - else if (this.e.button & 1) return 1; - else if (this.e.button & 2) return 3; - else if (this.e.button & 4) return 2; - }, - pageX: function() { - if (this.e.pageX != null) return this.e.pageX; - var doc = this.target().ownerDocument; - return this.e.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft; - }, - pageY: function() { - if (this.e.pageY != null) return this.e.pageY; - var doc = this.target().ownerDocument; - return this.e.clientY + doc.body.scrollTop + doc.documentElement.scrollTop; - } - }; + function e_preventDefault(e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + } + function e_stopPropagation(e) { + if (e.stopPropagation) e.stopPropagation(); + else e.cancelBubble = true; + } + function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);} + function e_target(e) {return e.target || e.srcElement;} + function e_button(e) { + if (e.which) return e.which; + else if (e.button & 1) return 1; + else if (e.button & 2) return 3; + else if (e.button & 4) return 2; + } + function e_pageX(e) { + if (e.pageX != null) return e.pageX; + var doc = e_target(e).ownerDocument; + return e.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft; + } + function e_pageY(e) { + if (e.pageY != null) return e.pageY; + var doc = e_target(e).ownerDocument; + return e.clientY + doc.body.scrollTop + doc.documentElement.scrollTop; + } // Event handler registration. If disconnect is true, it'll return a // function that unregisters the handler. function connect(node, type, handler, disconnect) { - function wrapHandler(event) {handler(new Event(event || window.event));} + function wrapHandler(event) {handler(event || window.event);} if (typeof node.addEventListener == "function") { node.addEventListener(type, wrapHandler, false); if (disconnect) return function() {node.removeEventListener(type, wrapHandler, false);}; @@ -1881,6 +1966,8 @@ var CodeMirror = (function() { })(); var gecko = /gecko\/\d{7}/i.test(navigator.userAgent); + var ie = /MSIE \d/.test(navigator.userAgent); + var safari = /Apple Computer/.test(navigator.vendor); var lineSep = "\n"; // Feature-detect whether newlines in textareas are converted to \r\n @@ -1910,17 +1997,21 @@ var CodeMirror = (function() { return n; } + function computedStyle(elt) { + if (elt.currentStyle) return elt.currentStyle; + return window.getComputedStyle(elt, null); + } // Find the position of an element by following the offsetParent chain. // If screen==true, it returns screen (rather than page) coordinates. function eltOffset(node, screen) { var doc = node.ownerDocument.body; - var x = 0, y = 0, hitDoc = false; + var x = 0, y = 0, skipDoc = false; for (var n = node; n; n = n.offsetParent) { x += n.offsetLeft; y += n.offsetTop; - // Fixed-position elements don't have the document in their offset chain - if (n == doc) hitDoc = true; + if (screen && computedStyle(n).position == "fixed") + skipDoc = true; } - var e = screen && hitDoc ? null : doc; + var e = screen && !skipDoc ? null : doc; for (var n = node.parentNode; n != e; n = n.parentNode) if (n.scrollLeft != null) { x -= n.scrollLeft; y -= n.scrollTop;} return {left: x, top: y}; @@ -1935,10 +2026,10 @@ var CodeMirror = (function() { function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);} function copyPos(x) {return {line: x.line, ch: x.ch};} + var escapeElement = document.createElement("div"); function htmlEscape(str) { - return str.replace(/[<>&]/g, function(str) { - return str == "&" ? "&" : str == "<" ? "<" : ">"; - }); + escapeElement.innerText = escapeElement.textContent = str; + return escapeElement.innerHTML; } CodeMirror.htmlEscape = htmlEscape; @@ -1961,8 +2052,9 @@ var CodeMirror = (function() { // See if "".split is the broken IE version, if so, provide an // alternative way to split lines. + var splitLines, selRange, setSelRange; if ("\n\nb".split(/\n/).length != 3) - var splitLines = function(string) { + splitLines = function(string) { var pos = 0, nl, result = []; while ((nl = string.indexOf("\n", pos)) > -1) { result.push(string.slice(pos, string.charAt(nl-1) == "\r" ? nl - 1 : nl)); @@ -1972,23 +2064,39 @@ var CodeMirror = (function() { return result; }; else - var splitLines = function(string){return string.split(/\r?\n/);}; + splitLines = function(string){return string.split(/\r?\n/);}; CodeMirror.splitLines = splitLines; // Sane model of finding and setting the selection in a textarea if (window.getSelection) { - var selRange = function(te) { + selRange = function(te) { try {return {start: te.selectionStart, end: te.selectionEnd};} catch(e) {return null;} }; - var setSelRange = function(te, start, end) { - try {te.setSelectionRange(start, end);} - catch(e) {} // Fails on Firefox when textarea isn't part of the document - }; + if (safari) + // On Safari, selection set with setSelectionRange are in a sort + // of limbo wrt their anchor. If you press shift-left in them, + // the anchor is put at the end, and the selection expanded to + // the left. If you press shift-right, the anchor ends up at the + // front. This is not what CodeMirror wants, so it does a + // spurious modify() call to get out of limbo. + setSelRange = function(te, start, end) { + if (start == end) + te.setSelectionRange(start, end); + else { + te.setSelectionRange(start, end - 1); + window.getSelection().modify("extend", "forward", "character"); + } + }; + else + setSelRange = function(te, start, end) { + try {te.setSelectionRange(start, end);} + catch(e) {} // Fails on Firefox when textarea isn't part of the document + }; } // IE model. Don't ask. else { - var selRange = function(te) { + selRange = function(te) { try {var range = te.ownerDocument.selection.createRange();} catch(e) {return null;} if (!range || range.parentElement() != te) return null; @@ -2010,7 +2118,7 @@ var CodeMirror = (function() { for (var i = val.indexOf("\r"); i > -1 && i < end; i = val.indexOf("\r", i+1), end++) {} return {start: start, end: end}; }; - var setSelRange = function(te, start, end) { + setSelRange = function(te, start, end) { var range = te.createTextRange(); range.collapse(true); var endrange = range.duplicate(); @@ -2032,4 +2140,5 @@ var CodeMirror = (function() { CodeMirror.defineMIME("text/plain", "null"); return CodeMirror; -})(); +})() +; \ No newline at end of file diff --git a/libraries/config/config_functions.lib.php b/libraries/config/config_functions.lib.php index 31d4305e2d..7b71748743 100644 --- a/libraries/config/config_functions.lib.php +++ b/libraries/config/config_functions.lib.php @@ -17,35 +17,9 @@ */ function PMA_lang($lang_key) { - static $search, $replace; - - // some quick cache'ing - if ($search === null) { - $replace_pairs = array( - '<' => '<', - '>' => '>', - '[em]' => '', - '[/em]' => '', - '[strong]' => '', - '[/strong]' => '', - '[code]' => '', - '[/code]' => '', - '[kbd]' => '', - '[/kbd]' => '', - '[br]' => '
', - '[sup]' => '', - '[/sup]' => ''); - if (defined('PMA_SETUP')) { - $replace_pairs['[a@Documentation.html'] = '[a@../Documentation.html'; - } - $search = array_keys($replace_pairs); - $replace = array_values($replace_pairs); - } $message = isset($GLOBALS["strConfig$lang_key"]) ? $GLOBALS["strConfig$lang_key"] : $lang_key; - $message = str_replace($search, $replace, $message); - // replace [a@"$1"]$2[/a] with $2 - $message = preg_replace('#\[a@("?)([^\]]+)\1\]([^\[]+)\[/a\]#e', - "PMA_lang_link_replace('$2', '$3')", $message); + + $message = PMA_sanitize($message); if (func_num_args() == 1) { return $message; diff --git a/libraries/sanitizing.lib.php b/libraries/sanitizing.lib.php index b308f1ceab..6d9c4bfec0 100644 --- a/libraries/sanitizing.lib.php +++ b/libraries/sanitizing.lib.php @@ -6,6 +6,66 @@ * @package phpMyAdmin */ +/** + * Checks whether given link is valid + * + * @param string $url URL to check. + * + * @return boolean True if string can be used as link. + */ +function PMA_checkLink($url) +{ + $valid_starts = array( + 'http://', + 'https://', + ); + if (defined('PMA_SETUP')) { + $valid_starts[] = '../Documentation.html'; + } else { + $valid_starts[] = './Documentation.html'; + } + foreach ($valid_starts as $val) { + if (substr($url, 0, strlen($val)) == $val) { + return true; + } + } + return false; +} + +/** + * Callback function for replacing [a@link@target] links in bb code. + * + * @param array $found Array of preg matches + * + * @return string Replaced string + */ +function PMA_replaceBBLink($found) +{ + /* Check for valid link */ + if (! PMA_checkLink($found[1])) { + return $found[0]; + } + /* a-z and _ allowed in target */ + if (! empty($found[3]) && preg_match('/[^a-z_]+/i', $found[3])) { + return $found[0]; + } + + /* Construct target */ + $target = ''; + if (! empty($found[3])) { + $target = ' target="' . $found[3] . '"'; + } + + /* Construct url */ + if (substr($found[1], 0, 4) == 'http') { + $url = PMA_linkURL($found[1]); + } else { + $url = $found[1]; + } + + return ''; +} + /** * Sanitizes $message, taking into account our special codes * for formatting. @@ -18,8 +78,9 @@ * * bar * - * @param string the message - * @param boolean whether to escape html in result + * @param string $message the message + * @param boolean $escape whether to escape html in result + * @param boolean $safe whether string is safe (can keep < and > chars) * * @return string the sanitized message * @@ -30,6 +91,7 @@ function PMA_sanitize($message, $escape = false, $safe = false) if (!$safe) { $message = strtr($message, array('<' => '<', '>' => '>')); } + /* Interpret bb code */ $replace_pairs = array( '[i]' => '', // deprecated by em '[/i]' => '', // deprecated by em @@ -50,34 +112,21 @@ function PMA_sanitize($message, $escape = false, $safe = false) '[sup]' => '', '[/sup]' => '', ); + /* Adjust links for setup, which lives in subfolder */ + if (defined('PMA_SETUP')) { + $replace_pairs['[a@Documentation.html'] = '[a@../Documentation.html'; + } else { + $replace_pairs['[a@Documentation.html'] = '[a@./Documentation.html'; + } $message = strtr($message, $replace_pairs); - $pattern = '/\[a@([^"@]*)@([^]"]*)\]/'; + /* Match links in bb code ([a@url@target], where @target is options) */ + $pattern = '/\[a@([^]"@]*)(@([^]"]*))?\]/'; - if (preg_match_all($pattern, $message, $founds, PREG_SET_ORDER)) { - $valid_links = array( - 'http', // default http:// links (and https://) - './Do', // ./Documentation - ); - - foreach ($founds as $found) { - // only http... and ./Do... allowed - if (! in_array(substr($found[1], 0, 4), $valid_links)) { - return $message; - } - // a-z and _ allowed in target - if (! empty($found[2]) && preg_match('/[^a-z_]+/i', $found[2])) { - return $message; - } - } - - if (substr($found[1], 0, 4) == 'http') { - $message = preg_replace($pattern, '', $message); - } else { - $message = preg_replace($pattern, '', $message); - } - } + /* Find and replace all links */ + $message = preg_replace_callback($pattern, 'PMA_replaceBBLink', $message); + /* Possibly escape result */ if ($escape) { $message = htmlspecialchars($message); } diff --git a/po/ar.po b/po/ar.po index d6022b7041..39cf4de9ba 100644 --- a/po/ar.po +++ b/po/ar.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-25 11:36+0200\n" -"PO-Revision-Date: 2011-07-09 03:43+0200\n" +"PO-Revision-Date: 2011-07-25 22:07+0200\n" "Last-Translator: Abdullah Al-Saedi \n" "Language-Team: arabic \n" "Language: ar\n" @@ -1122,15 +1122,14 @@ msgstr "اتصالات / عمليات" #. l10n: Questions is the name of a MySQL Status variable #: js/messages.php:87 -#, fuzzy #| msgid "Connections since last refresh" msgid "Questions since last refresh" -msgstr "الإتصالات منذ آخر تحديث" +msgstr "العمليات منذ آخر تحديث" #. l10n: Questions is the name of a MySQL Status variable #: js/messages.php:89 msgid "Questions (executed statements by the server)" -msgstr "" +msgstr "العمليات (الجمل المنفذة بواسطة الخادم)" #: js/messages.php:91 server_status.php:617 msgid "Query statistics" @@ -1138,11 +1137,11 @@ msgstr "إحصائيات الإستعلام" #: js/messages.php:94 msgid "System CPU Usage" -msgstr "" +msgstr "إستخدام النظام للمعالج (CPU)" #: js/messages.php:95 msgid "System memory" -msgstr "" +msgstr "ذاكرة النظام" #: js/messages.php:96 msgid "System swap" @@ -1158,14 +1157,13 @@ msgstr "كيلوبايت" #: js/messages.php:100 msgid "Average load" -msgstr "" +msgstr "متوسط التحميل" #. l10n: Questions is the name of a MySQL Status variable #: js/messages.php:102 -#, fuzzy #| msgid "Versions" msgid "Questions" -msgstr "نسخ" +msgstr "العمليات" #: js/messages.php:103 server_status.php:894 msgid "Traffic" @@ -1173,20 +1171,18 @@ msgstr "بيانات سير" #: js/messages.php:104 libraries/server_links.inc.php:73 #: server_status.php:1324 -#, fuzzy #| msgid "General relation features" msgid "Settings" -msgstr "المزايا العامّة للرابط" +msgstr "الإعدادات" #: js/messages.php:105 -#, fuzzy #| msgid "Remove database" msgid "Remove chart" -msgstr "حذف قاعدة البيانات" +msgstr "حذف الرسم البياني" #: js/messages.php:106 msgid "Edit labels and series" -msgstr "" +msgstr "حذف العناوين والسلاسل" #: js/messages.php:107 msgid "Add chart to grid" @@ -1194,7 +1190,7 @@ msgstr "" #: js/messages.php:109 msgid "Please add at least one variable to the series" -msgstr "" +msgstr "فضلا , أضف متغير واحد على الأقل للسلسلة" #: js/messages.php:110 libraries/display_export.lib.php:306 #: libraries/display_tbl.lib.php:561 libraries/export/sql.php:1052 @@ -10591,7 +10587,7 @@ msgstr "صيانة الجدول" #: tbl_operations.php:614 msgid "Defragment table" -msgstr "" +msgstr "إلغاء تجزئة الجدول" #: tbl_operations.php:662 #, php-format @@ -10599,26 +10595,23 @@ msgid "Table %s has been flushed" msgstr "لقد تم إعادة تحميل الجدول %s بنجاح" #: tbl_operations.php:668 -#, fuzzy #| msgid "Flush the table (\"FLUSH\")" msgid "Flush the table (FLUSH)" -msgstr "إعادة تحميل الجدول (\"FLUSH\")" +msgstr "إعادة تحميل الجدول (FLUSH)" #: tbl_operations.php:677 -#, fuzzy #| msgid "Dumping data for table" msgid "Delete data or table" -msgstr "إرجاع أو استيراد بيانات الجدول" +msgstr "حذف البيانات او الجدول" #: tbl_operations.php:692 msgid "Empty the table (TRUNCATE)" -msgstr "" +msgstr "إفراغ الجدول (TRUNCATE)" #: tbl_operations.php:712 -#, fuzzy #| msgid "Copy database to" msgid "Delete the table (DROP)" -msgstr "إنسخ قاعدة البيانات إلى" +msgstr "حذف الجدول (DROP)" #: tbl_operations.php:733 msgid "Partition maintenance" @@ -10627,7 +10620,7 @@ msgstr "" #: tbl_operations.php:741 #, php-format msgid "Partition %s" -msgstr "" +msgstr "تقسيم %s" #: tbl_operations.php:744 msgid "Analyze" @@ -10639,19 +10632,19 @@ msgstr "تحقق" #: tbl_operations.php:746 msgid "Optimize" -msgstr "" +msgstr "تحسين" #: tbl_operations.php:747 msgid "Rebuild" -msgstr "" +msgstr "إعادة بناء" #: tbl_operations.php:748 msgid "Repair" -msgstr "صلح" +msgstr "إصلاح" #: tbl_operations.php:760 msgid "Remove partitioning" -msgstr "" +msgstr "إزالة التقسيم" #: tbl_operations.php:786 msgid "Check referential integrity:" @@ -10659,15 +10652,15 @@ msgstr "تحديد التكامل المرجعي:" #: tbl_printview.php:72 msgid "Show tables" -msgstr "شاهد الجدول" +msgstr "عرض الجداول" #: tbl_printview.php:307 tbl_structure.php:789 msgid "Space usage" -msgstr "المساحة المستغلة" +msgstr "المساحة المستخدمة" #: tbl_printview.php:311 tbl_structure.php:793 msgid "Usage" -msgstr "المساحة" +msgstr "الإستخدام" #: tbl_printview.php:338 tbl_structure.php:820 msgid "Effective" @@ -10699,7 +10692,6 @@ msgid "Error creating foreign key on %1$s (check data types)" msgstr "" #: tbl_relation.php:402 -#, fuzzy #| msgid "Internal relations" msgid "Internal relation" msgstr "العلاقات الداخلية" @@ -10712,21 +10704,20 @@ msgstr "" #: tbl_relation.php:410 msgid "Foreign key constraint" -msgstr "" +msgstr "قيود المفتاح الغريب" #: tbl_select.php:110 msgid "Do a \"query by example\" (wildcard: \"%\")" -msgstr "تجعل \"استعلام بواسطة المثال\" (wildcard: \"%\")" +msgstr "عمل \"استعلام بواسطة المثال\" (بدل: \"%\")" #: tbl_select.php:260 -#, fuzzy #| msgid "Select fields (at least one):" msgid "Select columns (at least one):" -msgstr "اختيار حقول (على الأقل واحد):" +msgstr "اختيار الأعمدة (واحد على الأقل):" #: tbl_select.php:278 msgid "Add search conditions (body of the \"where\" clause):" -msgstr "أضف شروط البحث (جسم من الفقره \"where\" clause):" +msgstr "أضف شروط البحث (الفقرة \"where\" ):" #: tbl_select.php:285 msgid "Number of rows per page" @@ -10742,21 +10733,20 @@ msgstr "" #: tbl_structure.php:165 tbl_structure.php:169 msgid "Browse distinct values" -msgstr "" +msgstr "إستعرض القيم المميزة" #: tbl_structure.php:170 tbl_structure.php:171 msgid "Add primary key" -msgstr "" +msgstr "إضافة مفتاح رئيسي" #: tbl_structure.php:172 tbl_structure.php:173 -#, fuzzy #| msgid "Add new field" msgid "Add index" -msgstr "إضافة حقل جديد" +msgstr "إضافة فهرس" #: tbl_structure.php:174 tbl_structure.php:175 msgid "Add unique index" -msgstr "" +msgstr "إضافة فهرس مميز" #: tbl_structure.php:176 tbl_structure.php:177 #, fuzzy @@ -10769,49 +10759,46 @@ msgid "Add FULLTEXT index" msgstr "" #: tbl_structure.php:391 -#, fuzzy #| msgid "None" msgctxt "None for default" msgid "None" msgstr "لا شيء" #: tbl_structure.php:404 -#, fuzzy, php-format +#, php-format #| msgid "Table %s has been dropped" msgid "Column %s has been dropped" -msgstr "جدول %s حذفت" +msgstr "تم حذف العمود %s" #: tbl_structure.php:415 tbl_structure.php:509 #, php-format msgid "A primary key has been added on %s" -msgstr "لقد أُضيف المفتاح الأساسي في %s" +msgstr "تم إضافة المفتاح الأساسي في %s" #: tbl_structure.php:430 tbl_structure.php:445 tbl_structure.php:465 #: tbl_structure.php:480 tbl_structure.php:522 tbl_structure.php:535 #: tbl_structure.php:548 tbl_structure.php:561 #, php-format msgid "An index has been added on %s" -msgstr "لقد أُضيف الفهرس في %s" +msgstr "تم إضافة الفهرس في %s" #: tbl_structure.php:497 -#, fuzzy #| msgid "Show PHP information" msgid "Show more actions" -msgstr "عرض المعلومات المتعلقة ب PHP" +msgstr "عرض المزيد من العمليات" #: tbl_structure.php:642 tbl_structure.php:644 msgid "Relation view" -msgstr "عرض الروابط" +msgstr "عرض العلاقات" #: tbl_structure.php:651 tbl_structure.php:653 msgid "Propose table structure" msgstr "اقترح بناء الجدول" #: tbl_structure.php:676 -#, fuzzy #| msgid "Add into comments" msgid "Add column" -msgstr "أضف إلى الملاحظات" +msgstr "إضافة عمود" #: tbl_structure.php:690 msgid "At End of Table" @@ -10827,38 +10814,38 @@ msgid "After %s" msgstr "بعد %s" #: tbl_structure.php:732 -#, fuzzy, php-format +#, php-format #| msgid "Create an index on %s columns" msgid "Create an index on  %s columns" -msgstr "تصميم فهرسه على %s عمود" +msgstr "إنشاء فهرس للعمود %s" #: tbl_structure.php:889 msgid "partitioned" -msgstr "" +msgstr "مقسم" #: tbl_tracking.php:109 #, php-format msgid "Tracking report for table `%s`" -msgstr "" +msgstr "تتبع التقرير للجدول %s" #: tbl_tracking.php:182 #, php-format msgid "Version %s is created, tracking for %s.%s is activated." -msgstr "" +msgstr "تم إنشاء الإصدار %s , التتبع نشط لـ %s.%s" #: tbl_tracking.php:190 #, php-format msgid "Tracking for %s.%s , version %s is deactivated." -msgstr "" +msgstr "اللتبع لـ %s.%s , الإصدار %s معطل ." #: tbl_tracking.php:198 #, php-format msgid "Tracking for %s.%s , version %s is activated." -msgstr "" +msgstr "اللتبع لـ %s.%s , الإصدار %s مفعل." #: tbl_tracking.php:208 msgid "SQL statements executed." -msgstr "" +msgstr "تم تنفيذ جمل SQL." #: tbl_tracking.php:214 msgid "" @@ -10884,10 +10871,9 @@ msgid "Tracking data definition successfully deleted" msgstr "" #: tbl_tracking.php:384 tbl_tracking.php:401 -#, fuzzy #| msgid "errors." msgid "Query error" -msgstr "أخطاء." +msgstr "خطأ في الإستعلام" #: tbl_tracking.php:399 msgid "Tracking data manipulation successfully deleted" @@ -10909,10 +10895,9 @@ msgid "Delete tracking data row from report" msgstr "يسمح بإضافة واستبدال البيانات." #: tbl_tracking.php:443 -#, fuzzy #| msgid "No databases" msgid "No data" -msgstr "لايوجد قواعد بيانات" +msgstr "لايوجد بيانات" #: tbl_tracking.php:453 tbl_tracking.php:510 msgid "Date" @@ -10940,16 +10925,16 @@ msgstr "" #: tbl_tracking.php:560 msgid "SQL execution" -msgstr "" +msgstr "تنفيذ SQL" #: tbl_tracking.php:572 #, php-format msgid "Export as %s" -msgstr "" +msgstr "تصدير كـ %s" #: tbl_tracking.php:612 msgid "Show versions" -msgstr "" +msgstr "عرض الإصدارات" #: tbl_tracking.php:644 msgid "Version" @@ -10958,48 +10943,48 @@ msgstr "نسخة" #: tbl_tracking.php:692 #, php-format msgid "Deactivate tracking for %s.%s" -msgstr "" +msgstr "تعطيل التتبع لـ %s.%s" #: tbl_tracking.php:694 msgid "Deactivate now" -msgstr "" +msgstr "تعطيل الآن" #: tbl_tracking.php:705 #, php-format msgid "Activate tracking for %s.%s" -msgstr "" +msgstr "تنشيط التتبع لـ %s.%s" #: tbl_tracking.php:707 msgid "Activate now" -msgstr "" +msgstr "تنشيط الآن" #: tbl_tracking.php:720 #, php-format msgid "Create version %s of %s.%s" -msgstr "" +msgstr "انشئ إصدار %s لـ %s.s%s" #: tbl_tracking.php:724 msgid "Track these data definition statements:" -msgstr "" +msgstr "تتبع تقارير تعريف البيانات:" #: tbl_tracking.php:732 msgid "Track these data manipulation statements:" -msgstr "" +msgstr "تتبع تقارير التلاعب بالبيانات:" #: tbl_tracking.php:740 msgid "Create version" -msgstr "" +msgstr "إنشاء إصدار" #: themes.php:31 #, php-format msgid "" "No themes support; please check your configuration and/or your themes in " "directory %s." -msgstr "" +msgstr "لايوجد سمة مدعومة , فضلا راجع إعدادات السمات في المسار %s." #: themes.php:41 msgid "Get more themes!" -msgstr "" +msgstr "الحصول على سمات جديدة!" #: transformation_overview.php:24 msgid "Available MIME types" @@ -11015,7 +11000,6 @@ msgid "Available transformations" msgstr "التحويلات المتوفرة" #: transformation_overview.php:47 -#, fuzzy #| msgid "Description" msgctxt "for MIME transformation" msgid "Description" @@ -11027,18 +11011,17 @@ msgstr "ليس لديك الحقوق الكافية بأن تكون هنا ال #: user_password.php:96 msgid "The profile has been updated." -msgstr "لقد تم تجديد العرض الجانبي." +msgstr "لقد تم تجديد الملف الشخصي." #: view_create.php:141 msgid "VIEW name" -msgstr "" +msgstr "اسم VIEW" #: view_operations.php:91 msgid "Rename view to" msgstr "أعد تسمية العرض الـ" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "حدث" diff --git a/po/be.po b/po/be.po index 9c7e172b0c..28f6ee50af 100644 --- a/po/be.po +++ b/po/be.po @@ -11648,7 +11648,6 @@ msgid "Rename view to" msgstr "Перайменаваць табліцу ў" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Абнавіць" diff --git a/po/be@latin.po b/po/be@latin.po index 7c76c9186d..928983c390 100644 --- a/po/be@latin.po +++ b/po/be@latin.po @@ -11615,7 +11615,6 @@ msgid "Rename view to" msgstr "" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Abnavić" diff --git a/po/bn.po b/po/bn.po index cfb42ccf76..abe4be133b 100644 --- a/po/bn.po +++ b/po/bn.po @@ -11503,7 +11503,6 @@ msgid "Rename view to" msgstr "টেবিল রিনেম করুন" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Refresh" diff --git a/po/ca.po b/po/ca.po index d021361480..088a75a93d 100644 --- a/po/ca.po +++ b/po/ca.po @@ -11506,7 +11506,6 @@ msgid "Rename view to" msgstr "Reanomena la vista a" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Refresca" diff --git a/po/cs.po b/po/cs.po index 0af5c53296..cbd868b0c5 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-25 11:36+0200\n" -"PO-Revision-Date: 2011-07-21 15:18+0200\n" +"PO-Revision-Date: 2011-07-25 15:03+0200\n" "Last-Translator: Michal Čihař \n" "Language-Team: czech \n" "Language: cs\n" @@ -1205,7 +1205,6 @@ msgid "Pause monitor" msgstr "Přerušit monitor" #: js/messages.php:114 -#, fuzzy #| msgid "general_log and slow_query_log is enabled." msgid "general_log and slow_query_log are enabled." msgstr "general_log a slow_query_log jsou povoleny." @@ -1219,7 +1218,6 @@ msgid "slow_query_log is enabled." msgstr "slow_query_log je povolen." #: js/messages.php:117 -#, fuzzy #| msgid "slow_query_log and general_log is disabled." msgid "slow_query_log and general_log are disabled." msgstr "slow_query_log a general_log jsou zakázány." @@ -1350,10 +1348,9 @@ msgstr "" #. l10n: A collection of available filters #: js/messages.php:151 -#, fuzzy #| msgid "Filter" msgid "Filters" -msgstr "Filtr" +msgstr "Filtry" #. l10n: Filter as in "Start Filtering" #: js/messages.php:153 navigation.php:270 @@ -1362,23 +1359,21 @@ msgstr "Filtr" #: js/messages.php:154 msgid "Filter queries by word/regexp:" -msgstr "" +msgstr "Filtrovat dotazy podle slova nebo regulárního výrazu:" #: js/messages.php:155 msgid "Group queries, ignoring variable data in WHERE statements" -msgstr "" +msgstr "Sloučit dotazy ignorováním dat ve WHERE" #: js/messages.php:156 -#, fuzzy #| msgid "Number of inserted rows" msgid "Sum of grouped rows:" -msgstr "Počet vkládaných řádků" +msgstr "Součet sloučených řádků:" #: js/messages.php:157 -#, fuzzy #| msgid "Total" msgid "Total:" -msgstr "Celkem" +msgstr "Celkem:" #: js/messages.php:161 libraries/tbl_properties.inc.php:780 #: pmd_general.php:388 pmd_general.php:425 pmd_general.php:545 @@ -1515,10 +1510,9 @@ msgid "Change" msgstr "Změnit" #: js/messages.php:208 -#, fuzzy #| msgid "Maximum execution time" msgid "Query execution time" -msgstr "Časový limit běhu skriptu" +msgstr "Doba běhu dotazu" #: js/messages.php:211 msgid "Hide search criteria" @@ -1534,10 +1528,9 @@ msgid "Ignore" msgstr "Ignorovat" #: js/messages.php:218 -#, fuzzy #| msgid "Add column" msgid "Add columns" -msgstr "Přidat sloupec" +msgstr "Přidat sloupce" #: js/messages.php:221 msgid "Select referenced key" @@ -6212,10 +6205,9 @@ msgid "" msgstr "Následující tabulky byly vytvořeny nebo změněny. Teď můžete:" #: libraries/import.lib.php:1069 -#, fuzzy #| msgid "View a structure`s contents by clicking on its name" msgid "View a structure's contents by clicking on its name" -msgstr "Zobrazit obsah tabulky kliknutím na její jméno" +msgstr "Obsah struktury se zobrazí po kliknutí na její jméno" #: libraries/import.lib.php:1070 msgid "" @@ -6223,10 +6215,9 @@ msgid "" msgstr "Změnit jakákoliv její nastavení kliknutím na odkaz „Nastavení“" #: libraries/import.lib.php:1071 -#, fuzzy #| msgid "Edit its structure by following the \"Structure\" link" msgid "Edit structure by following the \"Structure\" link" -msgstr "Upravit strukturu kliknutím na odkaz „Struktura“" +msgstr "Strukturu upravíte kliknutím na odkaz „Struktura“" #: libraries/import.lib.php:1074 msgid "Go to database" @@ -9929,11 +9920,11 @@ msgstr "Zvolený časový rozsah:" #: server_status.php:1465 msgid "Only retrieve SELECT,INSERT,UPDATE and DELETE Statements" -msgstr "" +msgstr "Stáhnout jen příkazy SELECT, INSERT, UPDATE a DELETE" #: server_status.php:1470 msgid "Remove variable data in INSERT statements for better grouping" -msgstr "" +msgstr "Před sloučením odstranit proměnná data v příkazech INSERT" #: server_status.php:1473 msgid "" @@ -9942,10 +9933,9 @@ msgid "" msgstr "" #: server_status.php:1476 -#, fuzzy #| msgid "Query type" msgid "Query analyzer" -msgstr "Typ dotazu" +msgstr "Analýza dotazu" #: server_status.php:1512 #, php-format diff --git a/po/cy.po b/po/cy.po index cf036eb15a..d644c83333 100644 --- a/po/cy.po +++ b/po/cy.po @@ -11032,7 +11032,6 @@ msgid "Rename view to" msgstr "Ailenwch golwg i" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Adfywio" diff --git a/po/de.po b/po/de.po index c69619d9ea..aff9d3f4f7 100644 --- a/po/de.po +++ b/po/de.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-25 11:36+0200\n" -"PO-Revision-Date: 2011-07-24 21:55+0200\n" -"Last-Translator: \n" +"PO-Revision-Date: 2011-07-25 14:55+0200\n" +"Last-Translator: Sven Strickroth \n" "Language-Team: german \n" "Language: de\n" "MIME-Version: 1.0\n" @@ -581,7 +581,7 @@ msgstr "Die Wörter werden durch Leerzeichen (\" \") getrennt." #: db_search.php:298 msgid "Inside tables:" -msgstr "In der / den Tabelle(n):" +msgstr "In der/den Tabelle(n):" #: db_search.php:328 msgid "Inside column:" @@ -9154,7 +9154,7 @@ msgstr "Überwachung" #: server_status.php:629 server_status.php:651 msgid "Refresh rate: " -msgstr "Aktualisierungs-Intervall:" +msgstr "Aktualisierungs-Intervall: " #: server_status.php:672 msgid "Containing the word:" diff --git a/po/et.po b/po/et.po index 1e2b2af610..f8d9780d1f 100644 --- a/po/et.po +++ b/po/et.po @@ -11502,7 +11502,6 @@ msgid "Rename view to" msgstr "Nimeta tabel ümber" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Uuenda" diff --git a/po/fi.po b/po/fi.po index 0114dab0c1..42f819a474 100644 --- a/po/fi.po +++ b/po/fi.po @@ -11852,7 +11852,6 @@ msgid "Rename view to" msgstr "Nimeä taulu uudelleen" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Päivitä" diff --git a/po/gl.po b/po/gl.po index e0089bb6da..3b22d3bed5 100644 --- a/po/gl.po +++ b/po/gl.po @@ -12097,7 +12097,6 @@ msgid "Rename view to" msgstr "Mudar o nome da táboa para" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Refrescar" diff --git a/po/he.po b/po/he.po index 660649934d..bcee84273a 100644 --- a/po/he.po +++ b/po/he.po @@ -11152,7 +11152,6 @@ msgid "Rename view to" msgstr "שינוי שם טבלה אל" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "רענון" diff --git a/po/hi.po b/po/hi.po index 07ba4d8799..4b19111967 100644 --- a/po/hi.po +++ b/po/hi.po @@ -10935,7 +10935,6 @@ msgid "Rename view to" msgstr "दृश्य का नाम बदलो" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "ताज़ा करना" diff --git a/po/hr.po b/po/hr.po index ce92bb5bf6..9c6623d0dc 100644 --- a/po/hr.po +++ b/po/hr.po @@ -11602,7 +11602,6 @@ msgid "Rename view to" msgstr "Preimenuj prikaz u" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Osvježi" diff --git a/po/hu.po b/po/hu.po index 98b5bcc708..bf9f033c20 100644 --- a/po/hu.po +++ b/po/hu.po @@ -11675,7 +11675,6 @@ msgid "Rename view to" msgstr "Nézet átnevezése" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Frissítés" diff --git a/po/id.po b/po/id.po index e076b56414..ac23278b32 100644 --- a/po/id.po +++ b/po/id.po @@ -11251,7 +11251,6 @@ msgid "Rename view to" msgstr "Ubah nama tabel menjadi " #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Menyegarkan" diff --git a/po/ka.po b/po/ka.po index 2ee2cfb5d7..f62bc02896 100644 --- a/po/ka.po +++ b/po/ka.po @@ -11931,7 +11931,6 @@ msgid "Rename view to" msgstr "Rename table to" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "განახლება" diff --git a/po/lt.po b/po/lt.po index 704c6dc94a..36a71d5209 100644 --- a/po/lt.po +++ b/po/lt.po @@ -11345,7 +11345,6 @@ msgid "Rename view to" msgstr "Pervadinti lentelę į" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Atnaujinti" diff --git a/po/lv.po b/po/lv.po index a243ab1e97..ef3413ce08 100644 --- a/po/lv.po +++ b/po/lv.po @@ -11262,7 +11262,6 @@ msgid "Rename view to" msgstr "Pārsaukt tabulu uz" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Atjaunot" diff --git a/po/mk.po b/po/mk.po index 4d8a71c0ed..4d158ff175 100644 --- a/po/mk.po +++ b/po/mk.po @@ -11327,7 +11327,6 @@ msgid "Rename view to" msgstr "Промени го името на табелата во " #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Освежи" diff --git a/po/mn.po b/po/mn.po index 5f15197f8e..031ac321db 100644 --- a/po/mn.po +++ b/po/mn.po @@ -11331,7 +11331,6 @@ msgid "Rename view to" msgstr "" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Да.дуудах" diff --git a/po/nb.po b/po/nb.po index 6cf7c3fd67..b9970edc0c 100644 --- a/po/nb.po +++ b/po/nb.po @@ -11591,7 +11591,6 @@ msgid "Rename view to" msgstr "Endre tabellens navn" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Oppdater" diff --git a/po/nl.po b/po/nl.po index 2949d4e079..3bfb92a75a 100644 --- a/po/nl.po +++ b/po/nl.po @@ -11502,7 +11502,6 @@ msgid "Rename view to" msgstr "Hernoem view naar" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Vernieuw" diff --git a/po/pl.po b/po/pl.po index c226d1891e..00cc12aaeb 100644 --- a/po/pl.po +++ b/po/pl.po @@ -11875,7 +11875,6 @@ msgid "Rename view to" msgstr "Zmień nazwę perspektywy na" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Odśwież" diff --git a/po/pt_BR.po b/po/pt_BR.po index 7c0625077e..59d5d14409 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -11380,7 +11380,6 @@ msgstr "Renomear a visão para " #~ msgstr "Agrupar INSERTs na mesma tabela" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Atualizar" diff --git a/po/ro.po b/po/ro.po index 999b8b6a2d..bddba046e9 100644 --- a/po/ro.po +++ b/po/ro.po @@ -11616,7 +11616,6 @@ msgid "Rename view to" msgstr "Redenumire tabel la" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Reîncarcă" diff --git a/po/si.po b/po/si.po index 9c1c0141c2..36319763be 100644 --- a/po/si.po +++ b/po/si.po @@ -11164,7 +11164,6 @@ msgid "Rename view to" msgstr "දසුනේ නම වෙනස් කරන්න" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "අලුත් කරන්න" diff --git a/po/sk.po b/po/sk.po index 66671a0215..99677c066a 100644 --- a/po/sk.po +++ b/po/sk.po @@ -11146,7 +11146,6 @@ msgid "Rename view to" msgstr "Premenovať pohľad na" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Obnoviť" diff --git a/po/sq.po b/po/sq.po index 75e07a476e..79c1dca9fc 100644 --- a/po/sq.po +++ b/po/sq.po @@ -11251,7 +11251,6 @@ msgid "Rename view to" msgstr "Riemërto tabelën në" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Rifresko" diff --git a/po/sr.po b/po/sr.po index f45c5850e1..48416bb441 100644 --- a/po/sr.po +++ b/po/sr.po @@ -11523,7 +11523,6 @@ msgid "Rename view to" msgstr "Промени име табеле у " #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Освежи" diff --git a/po/sr@latin.po b/po/sr@latin.po index 9189ccde64..b56197daa4 100644 --- a/po/sr@latin.po +++ b/po/sr@latin.po @@ -11511,7 +11511,6 @@ msgid "Rename view to" msgstr "Promeni ime tabele u " #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Osveži" diff --git a/po/th.po b/po/th.po index 843fbf097a..02be1b23c4 100644 --- a/po/th.po +++ b/po/th.po @@ -11127,7 +11127,6 @@ msgid "Rename view to" msgstr "เปลี่ยนชื่อตารางเป็น" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "เรียกใหม่" diff --git a/po/tr.po b/po/tr.po index 65f554ddd0..2c9833bc00 100644 --- a/po/tr.po +++ b/po/tr.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2011-07-25 11:36+0200\n" -"PO-Revision-Date: 2011-07-24 11:06+0200\n" +"PO-Revision-Date: 2011-07-25 19:31+0200\n" "Last-Translator: Burak Yavuz \n" "Language-Team: turkish \n" "Language: tr\n" @@ -705,7 +705,7 @@ msgstr "Tabloyu onar" #: db_structure.php:513 tbl_operations.php:627 msgid "Analyze table" -msgstr "Tabloyu incele" +msgstr "Tabloyu çözümle" #: db_structure.php:515 msgid "Add prefix to table" @@ -1199,10 +1199,9 @@ msgid "Pause monitor" msgstr "İzlemeyi duraklat" #: js/messages.php:114 -#, fuzzy #| msgid "general_log and slow_query_log is enabled." msgid "general_log and slow_query_log are enabled." -msgstr "general_log ve slow_query_log etkinleştirildi." +msgstr "general_log ve slow_query_log etkin." #: js/messages.php:115 msgid "general_log is enabled." @@ -1213,10 +1212,9 @@ msgid "slow_query_log is enabled." msgstr "slow_query_log etkinleştirildi." #: js/messages.php:117 -#, fuzzy #| msgid "slow_query_log and general_log is disabled." msgid "slow_query_log and general_log are disabled." -msgstr "slow_query_log ve general_log etkisizleştirildi." +msgstr "slow_query_log ve general_log etkisiz." #: js/messages.php:118 msgid "log_output is not set to TABLE." @@ -1314,7 +1312,7 @@ msgstr "Genel günlükten" #: js/messages.php:142 msgid "Analysing & loading logs. This may take a while." -msgstr "Günlükler inceleniyor ve yükleniyor. Bu biraz zaman alabilir." +msgstr "Günlükler çözümleniyor ve yükleniyor. Bu biraz zaman alabilir." #: js/messages.php:143 msgid "" @@ -1346,14 +1344,13 @@ msgstr "Günlük tablosuna atla" #: js/messages.php:148 msgid "Log analysed, but not data found in this time span." -msgstr "Günlük incelendi, ama bu zaman aralığında bulunan veri yok." +msgstr "Günlük çözümlendi, ama bu zaman aralığında bulunan veri yok." #. l10n: A collection of available filters #: js/messages.php:151 -#, fuzzy #| msgid "Filter" msgid "Filters" -msgstr "Süzgeç" +msgstr "Süzgeçler" #. l10n: Filter as in "Start Filtering" #: js/messages.php:153 navigation.php:270 @@ -1362,23 +1359,21 @@ msgstr "Süzgeç" #: js/messages.php:154 msgid "Filter queries by word/regexp:" -msgstr "" +msgstr "Kelime/düzenli ifadeye göre sorguları süz" #: js/messages.php:155 msgid "Group queries, ignoring variable data in WHERE statements" -msgstr "" +msgstr "Sorguları grupla, WHERE ifadelerindeki değişken veri yoksayılıyor" #: js/messages.php:156 -#, fuzzy #| msgid "Number of inserted rows" msgid "Sum of grouped rows:" -msgstr "Eklenmiş satır sayısı" +msgstr "Gruplanmış satırların toplamı:" #: js/messages.php:157 -#, fuzzy #| msgid "Total" msgid "Total:" -msgstr "Toplam" +msgstr "Toplam:" #: js/messages.php:161 libraries/tbl_properties.inc.php:780 #: pmd_general.php:388 pmd_general.php:425 pmd_general.php:545 @@ -1517,10 +1512,9 @@ msgid "Change" msgstr "Değiştir" #: js/messages.php:208 -#, fuzzy #| msgid "Maximum execution time" msgid "Query execution time" -msgstr "En fazla yürütme süresi" +msgstr "Sorgu yürütme süresi" #: js/messages.php:211 msgid "Hide search criteria" @@ -1536,10 +1530,9 @@ msgid "Ignore" msgstr "Yoksay" #: js/messages.php:218 -#, fuzzy #| msgid "Add column" msgid "Add columns" -msgstr "Sütun ekle" +msgstr "Sütunları ekle" #: js/messages.php:221 msgid "Select referenced key" @@ -6255,10 +6248,9 @@ msgid "" msgstr "Aşağıdaki yapılar ya oluşturuldu ya da değiştirildi. Buyurun:" #: libraries/import.lib.php:1069 -#, fuzzy #| msgid "View a structure`s contents by clicking on its name" msgid "View a structure's contents by clicking on its name" -msgstr "İsmine tıklayarak yapının içeriklerini görüntüleyin" +msgstr "Adına tıklayarak yapının içeriklerini görün" #: libraries/import.lib.php:1070 msgid "" @@ -6268,10 +6260,9 @@ msgstr "" "değiştirin" #: libraries/import.lib.php:1071 -#, fuzzy #| msgid "Edit its structure by following the \"Structure\" link" msgid "Edit structure by following the \"Structure\" link" -msgstr "Aşağıdaki \"Yapı\" bağlantısıyla bunun yapısını düzenleyin" +msgstr "Aşağıdaki \"Yapı\" bağlantısıyla yapısını düzenleyin" #: libraries/import.lib.php:1074 msgid "Go to database" @@ -6920,7 +6911,7 @@ msgstr "Her olay için geçerli aralık değeri vermek zorundasınız." #: libraries/rte/rte_events.lib.php:549 msgid "You must provide a valid execution time for the event." -msgstr "Olay için geçerli bir çalıştırma zamanı vermek zorundasınız." +msgstr "Olay için geçerli bir yürütme zamanı vermek zorundasınız." #: libraries/rte/rte_events.lib.php:553 msgid "You must provide a valid type for the event." @@ -6966,7 +6957,7 @@ msgid "" "b> Please use the improved 'mysqli' extension to avoid any problems." msgstr "" "Çoklu sorguları kullanma kabiliyeti olmayan PHP'nin onaylamadığı 'mysql' " -"uzantısını kullanıyorsunuz. Bazı depolanmış yordamların çalıştırılması " +"uzantısını kullanıyorsunuz. Bazı depolanmış yordamların yürütülmesi " "başarısız olabilir! Lütfen herhangi bir sorundan kaçınmak için gelişmiş " "'mysql' uzantısı kullanın." @@ -7085,7 +7076,7 @@ msgstr[0] "İşlemin içindeki son ifade tarafından %d satır etkilendi" #: libraries/rte/rte_routines.lib.php:1214 #, php-format msgid "Execution results of routine %s" -msgstr "%s yordamı çalıştırma sonuçları" +msgstr "%s yordamı yürütme sonuçları" #: libraries/rte/rte_routines.lib.php:1288 #: libraries/rte/rte_routines.lib.php:1294 @@ -10025,11 +10016,11 @@ msgstr "Seçili zaman aralığı:" #: server_status.php:1465 msgid "Only retrieve SELECT,INSERT,UPDATE and DELETE Statements" -msgstr "" +msgstr "Sadece SELECT,INSERT,UPDATE ve DELETE İfadeleri erişir" #: server_status.php:1470 msgid "Remove variable data in INSERT statements for better grouping" -msgstr "" +msgstr "Daha iyi gruplama için INSERT ifadelerindeki değişken veriyi kaldır" #: server_status.php:1473 msgid "" @@ -10040,10 +10031,9 @@ msgstr "" "metnine göre gruplandırılır." #: server_status.php:1476 -#, fuzzy #| msgid "Query type" msgid "Query analyzer" -msgstr "Sorgu türü" +msgstr "Sorgu çözümleyici" #: server_status.php:1512 #, php-format @@ -10845,7 +10835,7 @@ msgstr "Bölüm %s" #: tbl_operations.php:744 msgid "Analyze" -msgstr "İncele" +msgstr "Çözümle" #: tbl_operations.php:745 msgid "Check" @@ -11140,7 +11130,7 @@ msgstr "Bu seçenek tablolarınızı ve içerdiği veriyi değiştirecektir." #: tbl_tracking.php:560 msgid "SQL execution" -msgstr "SQL çalıştırma" +msgstr "SQL yürütme" #: tbl_tracking.php:572 #, php-format diff --git a/po/tt.po b/po/tt.po index e7c397c377..e5bb03dc1c 100644 --- a/po/tt.po +++ b/po/tt.po @@ -11331,7 +11331,6 @@ msgid "Rename view to" msgstr "Tüşämä adın üzgärtü" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Yañart" diff --git a/po/ug.po b/po/ug.po index 226eb9d41c..391a3f6922 100644 --- a/po/ug.po +++ b/po/ug.po @@ -10891,7 +10891,6 @@ msgid "Rename view to" msgstr "" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "يېڭلاش" diff --git a/po/ur.po b/po/ur.po index 9eaf711351..744e8caed6 100644 --- a/po/ur.po +++ b/po/ur.po @@ -10904,7 +10904,6 @@ msgid "Rename view to" msgstr "" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "تازہ کریں" diff --git a/po/uz.po b/po/uz.po index 78ac713267..43965a64e4 100644 --- a/po/uz.po +++ b/po/uz.po @@ -12115,7 +12115,6 @@ msgid "Rename view to" msgstr "Кўриниш номини ўзгартириш" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Янгилаш" diff --git a/po/uz@latin.po b/po/uz@latin.po index 9b6ce5d274..37764d0987 100644 --- a/po/uz@latin.po +++ b/po/uz@latin.po @@ -12179,7 +12179,6 @@ msgid "Rename view to" msgstr "Ko‘rinish nomini o‘zgartirish" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "Yangilash" diff --git a/po/zh_CN.po b/po/zh_CN.po index 1ab27ce543..8a3c6d6100 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -11019,7 +11019,6 @@ msgid "Rename view to" msgstr "将视图改名为" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "刷新" diff --git a/po/zh_TW.po b/po/zh_TW.po index 2829c52979..e3f951ff11 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -10990,7 +10990,6 @@ msgid "Rename view to" msgstr "將 view改名爲" #, fuzzy -#~| msgid "Refresh" #~ msgid "Refresh rate" #~ msgstr "重新整理" diff --git a/test/libraries/PMA_sanitize_test.php b/test/libraries/PMA_sanitize_test.php index 0e7704c634..d6f855607f 100644 --- a/test/libraries/PMA_sanitize_test.php +++ b/test/libraries/PMA_sanitize_test.php @@ -10,34 +10,92 @@ * Include to test */ require_once 'libraries/sanitizing.lib.php'; +require_once 'libraries/url_generating.lib.php'; require_once 'libraries/core.lib.php'; class PMA_sanitize_test extends PHPUnit_Framework_TestCase { + /** + * Tests for proper escaping of XSS. + */ public function testXssInHref() { $this->assertEquals('[a@javascript:alert(\'XSS\');@target]link', PMA_sanitize('[a@javascript:alert(\'XSS\');@target]link[/a]')); } -/* + /** + * Tests correct generating of link redirector. + */ public function testLink() { - $this->assertEquals('link', + unset($GLOBALS['server']); + unset($GLOBALS['lang']); + $this->assertEquals('link', PMA_sanitize('[a@http://www.phpmyadmin.net/@target]link[/a]')); } -*/ + /** + * Tests links to documentation. + */ + public function testLinkDoc() + { + $this->assertEquals('doc', + PMA_sanitize('[a@./Documentation.html]doc[/a]')); + } + + /** + * Tests link target validation. + */ + public function testInvalidTarget() + { + $this->assertEquals('[a@./Documentation.html@INVALID9]doc', + PMA_sanitize('[a@./Documentation.html@INVALID9]doc[/a]')); + } + + /** + * Tests XSS escaping after valid link. + */ + public function testLinkDocXss() + { + $this->assertEquals('[a@./Documentation.html" onmouseover="alert(foo)"]doc', + PMA_sanitize('[a@./Documentation.html" onmouseover="alert(foo)"]doc[/a]')); + } + + /** + * Tests proper handling of multi link code. + */ + public function testLinkAndXssInHref() + { + $this->assertEquals('doc[a@javascript:alert(\'XSS\');@target]link', + PMA_sanitize('[a@./Documentation.html]doc[/a][a@javascript:alert(\'XSS\');@target]link[/a]')); + } + + /** + * Test escaping of HTML tags + */ public function testHtmlTags() { $this->assertEquals('<div onclick="">', PMA_sanitize('
')); } - public function testBbcoe() + /** + * Tests basic BB code. + */ + public function testBBCode() { $this->assertEquals('strong', PMA_sanitize('[b]strong[/b]')); } + + /** + * Tests output escaping. + */ + public function testEscape() + { + $this->assertEquals('<strong>strong</strong>', + PMA_sanitize('[strong]strong[/strong]', true)); + } } ?> diff --git a/themes/original/css/theme_left.css.php b/themes/original/css/theme_left.css.php index f1b6ef889c..5cd64b0456 100644 --- a/themes/original/css/theme_left.css.php +++ b/themes/original/css/theme_left.css.php @@ -89,6 +89,7 @@ button { .ic_b_view { background-position: 0 -1044px; } .ic_b_minus { background-position: 0 -440px; width: 9px; height: 9px; } .ic_b_plus { background-position: 0 -523px; width: 9px; height: 9px; } +.ic_b_snewtbl { background-position: 0 -726px; width: 10px; height: 10px; } /******************************************************************************/ /* classes */ diff --git a/themes/pmahomme/css/theme_left.css.php b/themes/pmahomme/css/theme_left.css.php index 247df0808f..8ed6707553 100644 --- a/themes/pmahomme/css/theme_left.css.php +++ b/themes/pmahomme/css/theme_left.css.php @@ -96,6 +96,7 @@ button { .ic_b_minus { background-position: -471px 0; } .ic_b_views, .ic_s_views { background-position: -1094px 0; } +.ic_b_snewtbl { background-position: -788px 0; } /******************************************************************************/ /* classes */ @@ -140,15 +141,22 @@ ul#databaseList span { } ul#databaseList a { + color: #333; + background: url(./themes/pmahomme/img/database.png) no-repeat 0% 50% transparent; display: block; - padding:5px; + padding: 5px; font-style: normal; } +div#navidbpageselector { + margin: 0.1em; + text-align: center; +} + div#navidbpageselector a, -ul#databaseList a { - background:url(./themes/pmahomme/img/database.png) no-repeat 0% 50% transparent; - color: #333; +div#navidbpageselector select{ + color: #333; + margin: 0.2em; } ul#databaseList ul {