[Phpmyadmin-git] [SCM] phpMyAdmin branch, gettext, updated. RELEASE_3_3_1RC1-888-g9a26625

Michal Čihař nijel at users.sourceforge.net
Tue Mar 30 10:18:03 CEST 2010


The branch, gettext has been updated
       via  9a26625560c3bcbeb0169bff625f09bcc8bcfe46 (commit)
       via  38f5107524466c63b88152139d23573678d004ff (commit)
       via  589504fe8a423b794797f72cf61b60fc8b770b3e (commit)
       via  bd0c89b630be5a3bff087cae788afeac228daa00 (commit)
       via  b452564b8320789a580e86ab272327f048654bfc (commit)
       via  dbd83fa123f951fce7795ca38bb117b64a5c2aaf (commit)
      from  1c241775fc95e3a9fcec0265cf122907dfeb46c2 (commit)


- Log -----------------------------------------------------------------
commit 9a26625560c3bcbeb0169bff625f09bcc8bcfe46
Merge: 1c241775fc95e3a9fcec0265cf122907dfeb46c2 38f5107524466c63b88152139d23573678d004ff
Author: Michal Čihař <mcihar at novell.com>
Date:   Tue Mar 30 10:17:39 2010 +0200

    Merge branch 'master' into gettext

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                        |    4 +++
 Documentation.html               |    2 +-
 libraries/config.default.php     |   10 ++++++-
 libraries/header_scripts.inc.php |    5 +++
 pmd/scripts/move.js              |   53 +++++++++++++++++++++++++++++++++++---
 tbl_select.php                   |   18 ++++++++++++-
 6 files changed, 85 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 51febbb..7a1717f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -53,6 +53,10 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
   to Pavel Konnikov and Herman van Rink
 + patch #2974341 [structure] Clicking on table name in db Structure should 
   Browse the table if possible, thanks to bhdouglass - dougboybhd
++ patch #2975533 [search] New search operators, thanks to
+  Martynas Mickevičius
++ patch #2967320 [designer] Colored relations based on the primary key,
+  thanks to GreenRover - greenrover
 
 3.3.2.0 (not yet released)
 - patch #2969449 [core] Name for MERGE engine varies depending on the
diff --git a/Documentation.html b/Documentation.html
index e7880a9..fb465b9 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -4356,7 +4356,7 @@ chmod o+rwx tmp
     </li>
 </ol>
 
-<p>More details on git are available on <a href="http://wiki.phpmyadmin.net/pma/Devel:git">our wiki</a>.</p>
+<p>More details on git are available on <a href="http://wiki.phpmyadmin.net/pma/Devel:Git">our wiki</a>.</p>
 
 <p> Write access to the repository is granted only to experienced developers who
     have already contributed something useful to phpMyAdmin.<br />
diff --git a/libraries/config.default.php b/libraries/config.default.php
index 35f603d..1aa1348 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -2990,6 +2990,10 @@ $cfg['NumOperators'] = array(
    '!=',
    'LIKE',
    'NOT LIKE',
+   'IN (...)',
+   'NOT IN (...)',
+   'BETWEEN',
+   'NOT BETWEEN',
 );
 
 /**
@@ -3007,7 +3011,11 @@ $cfg['TextOperators'] = array(
    'REGEXP ^...$',
    'NOT REGEXP',
    "= ''",
-   "!= ''"
+   "!= ''",
+   'IN (...)',
+   'NOT IN (...)',
+   'BETWEEN',
+   'NOT BETWEEN',
 );
 
 /**
diff --git a/libraries/header_scripts.inc.php b/libraries/header_scripts.inc.php
index d924bbd..a1611ac 100644
--- a/libraries/header_scripts.inc.php
+++ b/libraries/header_scripts.inc.php
@@ -112,6 +112,11 @@ $GLOBALS['js_events'][] = array(
     'function'  => 'PMA_TT_init',
 );
 
+/**
+ * Here we add a timestamp when loading the file, so that users who
+ * upgrade phpMyAdmin are not stuck with older .js files in their
+ * browser cache. This produces an HTTP 304 request for each file.
+ */
 foreach ($GLOBALS['js_include'] as $js_script_file) {
     echo '<script src="./js/' . $js_script_file . '?ts=' . filemtime('./js/' . $js_script_file) . '" type="text/javascript"></script>' . "\n";
 }
diff --git a/pmd/scripts/move.js b/pmd/scripts/move.js
index df1b972..35d6239 100644
--- a/pmd/scripts/move.js
+++ b/pmd/scripts/move.js
@@ -291,7 +291,7 @@ function Re_load()
                         + height_field;
 
                     //alert(y1 + ' - ' + key2 + "." + key3);
-                    Line0(x1 - sm_x, y1 - sm_y, x2 - sm_x, y2 - sm_y, "rgba(0,100,150,1)");
+                    Line0(x1 - sm_x, y1 - sm_y, x2 - sm_x, y2 - sm_y, getColorByTarget( contr[K][key][key2][key3][0]+'.'+contr[K][key][key2][key3][1] ) );
                 }
 }
 
@@ -315,8 +315,8 @@ function Line(x1, y1, x2, y2, color_line)
  */
 function Line0(x1, y1, x2, y2, color_line)
 {
-    Circle(x1, y1, 3, 3, "rgba(0,0,255,1)");
-    Rect(x2 - 1, y2 - 2, 4, 4, "rgba(0,0,255,1)");
+    Circle(x1, y1, 3, 3, color_line);
+    Rect(x2 - 1, y2 - 2, 4, 4, color_line);
 
     if (ON_angular_direct) {
         Line2(x1, y1, x2, y2, color_line);
@@ -717,7 +717,7 @@ function Canvas_click(id)
                         Key2 = key2; Key3 = key3;
                         Key = K;
                     } else {
-                        Line0(x1 - sm_x, y1 - sm_y, x2 - sm_x, y2 - sm_y, "rgba(0,100,150,1)");
+                        Line0(x1 - sm_x, y1 - sm_y, x2 - sm_x, y2 - sm_y, getColorByTarget( contr[K][key][key2][key3][0]+'.'+contr[K][key][key2][key3][1] ));
                     }
                 }
     if (selected) {
@@ -920,3 +920,48 @@ function Start_display_field()
         ON_display_field = 0;
     }
 }
+//------------------------------------------------------------------------------
+var TargetColors = new Array();
+function getColorByTarget( target ) 
+{ 
+  var color = '';  //"rgba(0,100,150,1)";
+
+  for (i in TargetColors)
+   if (TargetColors[i][0]==target) {
+    color = TargetColors[i][1];
+    break; 
+   } 
+
+
+  if (color.length==0)
+  {  
+   var i = TargetColors.length+1;
+   var d = i % 6;
+   var j = (i - d) / 6;
+   j = j % 4;
+   j++;
+   var color_case = new Array(
+                        new Array(1, 0, 0),
+                        new Array(0, 1, 0),
+                        new Array(0, 0, 1),
+                        new Array(1, 1, 0),
+                        new Array(1, 0, 1),
+                        new Array(0, 1, 1)
+                        );
+    var a = color_case[d][0];
+    var b = color_case[d][1];
+    var c = color_case[d][2];
+    e = (1 - (j - 1) / 6);
+                    
+    var r = Math.round(a * 200 * e);
+    var g = Math.round(b * 200 * e);
+    var b = Math.round(c * 200 * e);
+    var color = "rgba("+r+","+g+","+b+",1)";
+
+    TargetColors.push( new Array(target, color) );
+
+    
+  }
+
+  return color;    
+}
diff --git a/tbl_select.php b/tbl_select.php
index 874502e..0fbd24c 100644
--- a/tbl_select.php
+++ b/tbl_select.php
@@ -408,7 +408,23 @@ else {
                     $func_type = 'REGEXP';
                     $fields[$i] = '^' . $fields[$i] . '$';
                 }
-                $w[] = PMA_backquote($names[$i]) . ' ' . $func_type . ' ' . $quot . PMA_sqlAddslashes($fields[$i]) . $quot;
+
+                if ($func_type == 'IN (...)' || $func_type == 'NOT IN (...)' || $func_type == 'BETWEEN' || $func_type == 'NOT BETWEEN') {
+                    $func_type = str_replace(' (...)', '', $func_type);
+
+                    // quote values one by one
+                    $values = explode(',', $fields[$i]);
+                    foreach ($values as &$value)
+                        $value = $quot . PMA_sqlAddslashes(trim($value)) . $quot;
+
+                    if ($func_type == 'BETWEEN' || $func_type == 'NOT BETWEEN')
+                        $w[] = PMA_backquote($names[$i]) . ' ' . $func_type . ' ' . (isset($values[0]) ? $values[0] : '')  . ' AND ' . (isset($values[1]) ? $values[1] : '');
+                    else
+                        $w[] = PMA_backquote($names[$i]) . ' ' . $func_type . ' (' . implode(',', $values) . ')';
+                }
+                else {
+                    $w[] = PMA_backquote($names[$i]) . ' ' . $func_type . ' ' . $quot . PMA_sqlAddslashes($fields[$i]) . $quot;;
+                }
 
             } // end if
         } // end for


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list