]> git.donarmstrong.com Git - roundcube.git/commitdiff
Refresh all patches so that they apply without any fuzz
authorVincent Bernat <bernat@debian.org>
Sat, 17 Jul 2010 15:35:07 +0000 (15:35 +0000)
committerJérémy Bobbio <lunar@debian.org>
Sat, 18 Jun 2011 18:39:29 +0000 (20:39 +0200)
debian/patches/changeset_r3170.patch
debian/patches/changeset_r3202.patch
debian/patches/correct-magic-path.patch
debian/patches/correct_install_path.patch
debian/patches/dbconfig-common_support.patch
debian/patches/default-charset-utf8.patch
debian/patches/disable-dns-prefetch.patch
debian/patches/dont-limit-email-local-part.patch
debian/patches/loginbox-size.patch
debian/patches/use_packaged_tinymce.patch
debian/patches/use_pspell.patch

index f820edcd32ad4695b80e3e77151a95a7316d8c1c..962a62698eeabaeafd3924b6d4e2f517a97a8dc3 100644 (file)
 Use json_encode to ensure compatibility with JQuery 1.4.\r
 \r
-Index: roundcubemail/program/include/rcube_template.php\r
-===================================================================\r
---- roundcubemail/program/include/rcube_template.php (revision 2980)\r
-+++ roundcubemail/program/include/rcube_template.php (revision 3170)\r
-@@ -415,10 +415,10 @@\r
-         $out = '';\r
-         if (!$this->framed && !empty($this->js_env)) {\r
--            $out .= JS_OBJECT_NAME . '.set_env('.json_serialize($this->js_env).");\n";\r
-+            $out .= JS_OBJECT_NAME . '.set_env('.json_encode($this->js_env).");\n";\r
-         }\r
-         foreach ($this->js_commands as $i => $args) {\r
-             $method = array_shift($args);\r
-             foreach ($args as $i => $arg) {\r
--                $args[$i] = json_serialize($arg);\r
-+                $args[$i] = json_encode($arg);\r
-             }\r
-             $parent = $this->framed || preg_match('/^parent\./', $method);\r
-Index: roundcubemail/program/include/rcube_shared.inc\r
-===================================================================\r
---- roundcubemail/program/include/rcube_shared.inc (revision 3132)\r
-+++ roundcubemail/program/include/rcube_shared.inc (revision 3170)\r
-@@ -106,95 +106,4 @@\r
-     exit;\r
-     }\r
--}\r
--\r
--\r
--/**\r
-- * Returns whether an $str is a reserved word for any of the version of Javascript or ECMAScript\r
-- * @param str String to check\r
-- * @return boolean True if $str is a reserver word, False if not\r
-- */\r
--function is_js_reserved_word($str)\r
--{\r
--  return in_array($str, array(\r
--    // ECMASript ver 4 reserved words\r
--    'as','break','case','catch','class','const','continue',\r
--    'default','delete','do','else','export','extends','false','finally','for','function',\r
--    'if','import','in','instanceof','is','namespace','new','null','package','private',\r
--    'public','return','super','switch','this','throw','true','try','typeof','use','var',\r
--    'void','while','with',\r
--    // ECMAScript ver 4 future reserved words\r
--    'abstract','debugger','enum','goto','implements','interface','native','protected',\r
--    'synchronized','throws','transient','volatile',\r
--    // special meaning in some contexts\r
--    'get','set',\r
--    // were reserved in ECMAScript ver 3\r
--    'boolean','byte','char','double','final','float','int','long','short','static'\r
--  ));\r
--}\r
--\r
--\r
--/**\r
-- * Convert a variable into a javascript object notation\r
-- *\r
-- * @param mixed Input value\r
-- * @return string Serialized JSON string\r
-- */\r
--function json_serialize($var)\r
--{\r
--  if (is_object($var))\r
--    $var = get_object_vars($var);\r
--\r
--  if (is_array($var))\r
--  {\r
--    // empty array\r
--    if (!sizeof($var))\r
--      return '[]';\r
--    else\r
--    {\r
--      $keys_arr = array_keys($var);\r
--      $is_assoc = $have_numeric = 0;\r
--\r
--      for ($i=0; $i<sizeof($keys_arr); ++$i)\r
--      {\r
--        if (is_numeric($keys_arr[$i]))\r
--          $have_numeric = 1;\r
--        if (!is_numeric($keys_arr[$i]) || $keys_arr[$i] != $i)\r
--          $is_assoc = 1;\r
--        if ($is_assoc && $have_numeric)\r
--          break;\r
--      }\r
--      \r
--      $brackets = $is_assoc ? '{}' : '[]';\r
--      $pairs = array();\r
--\r
--      foreach ($var as $key => $value)\r
--      {\r
--        // enclose key with quotes if it is not variable-name conform\r
--        if (!preg_match('/^[_a-zA-Z]{1}[_a-zA-Z0-9]*$/', $key) || is_js_reserved_word($key))\r
--          $key = "'$key'";\r
--\r
--        $pairs[] = sprintf("%s%s", $is_assoc ? "$key:" : '', json_serialize($value));\r
--      }\r
--\r
--      return $brackets{0} . implode(',', $pairs) . $brackets{1};\r
--    }\r
--  }\r
--  else if (!is_string($var) && strval(intval($var)) === strval($var))\r
--    return $var;\r
--  else if (is_bool($var))\r
--    return $var ? '1' : '0';\r
--  else\r
--    return "'".JQ($var)."'";\r
--}\r
--\r
--\r
--/**\r
-- * Function to convert an array to a javascript array\r
-- * Actually an alias function for json_serialize()\r
-- * @deprecated\r
-- */\r
--function array2js($arr, $type='')\r
--{\r
--  return json_serialize($arr);\r
- }\r
\r
-Index: roundcubemail/program/include/rcube_json_output.php\r
-===================================================================\r
---- roundcubemail/program/include/rcube_json_output.php (revision 2905)\r
-+++ roundcubemail/program/include/rcube_json_output.php (revision 3170)\r
-@@ -240,5 +240,5 @@\r
-           $response['callbacks'] = $this->callbacks;\r
\r
--        echo json_serialize($response);\r
-+        echo json_encode($response);\r
-     }\r
-     \r
-@@ -256,5 +256,5 @@\r
-             $method = array_shift($args);\r
-             foreach ($args as $i => $arg) {\r
--                $args[$i] = json_serialize($arg);\r
-+                $args[$i] = json_encode($arg);\r
-             }\r
\r
-Index: roundcubemail/program/steps/mail/func.inc\r
-===================================================================\r
---- roundcubemail/program/steps/mail/func.inc (revision 3099)\r
-+++ roundcubemail/program/steps/mail/func.inc (revision 3170)\r
-@@ -523,5 +523,5 @@\r
-   if (is_array($quota)) {\r
-     $OUTPUT->add_script('$(document).ready(function(){\r
--      rcmail.set_quota('.json_serialize($quota).')});', 'foot');\r
-+      rcmail.set_quota('.json_encode($quota).')});', 'foot');\r
-     $quota = '';\r
-     }\r
-Index: roundcubemail/program/steps/mail/compose.inc\r
-===================================================================\r
---- roundcubemail/program/steps/mail/compose.inc (revision 3166)\r
-+++ roundcubemail/program/steps/mail/compose.inc (revision 3170)\r
-@@ -507,5 +507,5 @@\r
-       JQ(Q(rcube_label('revertto'))),\r
-       JQ(Q(rcube_label('nospellerrors'))),\r
--      json_serialize($spellcheck_langs),\r
-+      json_encode($spellcheck_langs),\r
-       $lang,\r
-       $attrib['id'],\r
+Index: b/program/include/rcube_json_output.php
+===================================================================
+--- a/program/include/rcube_json_output.php    2009-09-01 17:13:45.000000000 +0200
++++ b/program/include/rcube_json_output.php    2010-07-17 17:33:24.000000000 +0200
+@@ -239,7 +239,7 @@
+         if (!empty($this->callbacks))
+           $response['callbacks'] = $this->callbacks;
+-        echo json_serialize($response);
++        echo json_encode($response);
+     }
+     
+     
+@@ -255,7 +255,7 @@
+         foreach ($this->commands as $i => $args) {
+             $method = array_shift($args);
+             foreach ($args as $i => $arg) {
+-                $args[$i] = json_serialize($arg);
++                $args[$i] = json_encode($arg);
+             }
+             $out .= sprintf(
+Index: b/program/include/rcube_shared.inc
+===================================================================
+--- a/program/include/rcube_shared.inc 2009-10-27 10:43:39.000000000 +0100
++++ b/program/include/rcube_shared.inc 2010-07-17 17:33:24.000000000 +0200
+@@ -109,97 +109,6 @@
+ /**
+- * Returns whether an $str is a reserved word for any of the version of Javascript or ECMAScript
+- * @param str String to check
+- * @return boolean True if $str is a reserver word, False if not
+- */
+-function is_js_reserved_word($str)
+-{
+-  return in_array($str, array(
+-    // ECMASript ver 4 reserved words
+-    'as','break','case','catch','class','const','continue',
+-    'default','delete','do','else','export','extends','false','finally','for','function',
+-    'if','import','in','instanceof','is','namespace','new','null','package','private',
+-    'public','return','super','switch','this','throw','true','try','typeof','use','var',
+-    'void','while','with',
+-    // ECMAScript ver 4 future reserved words
+-    'abstract','debugger','enum','goto','implements','interface','native','protected',
+-    'synchronized','throws','transient','volatile',
+-    // special meaning in some contexts
+-    'get','set',
+-    // were reserved in ECMAScript ver 3
+-    'boolean','byte','char','double','final','float','int','long','short','static'
+-  ));
+-}
+-
+-
+-/**
+- * Convert a variable into a javascript object notation
+- *
+- * @param mixed Input value
+- * @return string Serialized JSON string
+- */
+-function json_serialize($var)
+-{
+-  if (is_object($var))
+-    $var = get_object_vars($var);
+-
+-  if (is_array($var))
+-  {
+-    // empty array
+-    if (!sizeof($var))
+-      return '[]';
+-    else
+-    {
+-      $keys_arr = array_keys($var);
+-      $is_assoc = $have_numeric = 0;
+-
+-      for ($i=0; $i<sizeof($keys_arr); ++$i)
+-      {
+-        if (is_numeric($keys_arr[$i]))
+-          $have_numeric = 1;
+-        if (!is_numeric($keys_arr[$i]) || $keys_arr[$i] != $i)
+-          $is_assoc = 1;
+-        if ($is_assoc && $have_numeric)
+-          break;
+-      }
+-      
+-      $brackets = $is_assoc ? '{}' : '[]';
+-      $pairs = array();
+-
+-      foreach ($var as $key => $value)
+-      {
+-        // enclose key with quotes if it is not variable-name conform
+-        if (!preg_match('/^[_a-zA-Z]{1}[_a-zA-Z0-9]*$/', $key) || is_js_reserved_word($key))
+-          $key = "'$key'";
+-
+-        $pairs[] = sprintf("%s%s", $is_assoc ? "$key:" : '', json_serialize($value));
+-      }
+-
+-      return $brackets{0} . implode(',', $pairs) . $brackets{1};
+-    }
+-  }
+-  else if (!is_string($var) && strval(intval($var)) === strval($var))
+-    return $var;
+-  else if (is_bool($var))
+-    return $var ? '1' : '0';
+-  else
+-    return "'".JQ($var)."'";
+-}
+-
+-
+-/**
+- * Function to convert an array to a javascript array
+- * Actually an alias function for json_serialize()
+- * @deprecated
+- */
+-function array2js($arr, $type='')
+-{
+-  return json_serialize($arr);
+-}
+-
+-
+-/**
+  * Similar function as in_array() but case-insensitive
+  *
+  * @param mixed Needle value
+Index: b/program/include/rcube_template.php
+===================================================================
+--- a/program/include/rcube_template.php       2009-09-22 20:08:45.000000000 +0200
++++ b/program/include/rcube_template.php       2010-07-17 17:33:24.000000000 +0200
+@@ -414,12 +414,12 @@
+     {
+         $out = '';
+         if (!$this->framed && !empty($this->js_env)) {
+-            $out .= JS_OBJECT_NAME . '.set_env('.json_serialize($this->js_env).");\n";
++            $out .= JS_OBJECT_NAME . '.set_env('.json_encode($this->js_env).");\n";
+         }
+         foreach ($this->js_commands as $i => $args) {
+             $method = array_shift($args);
+             foreach ($args as $i => $arg) {
+-                $args[$i] = json_serialize($arg);
++                $args[$i] = json_encode($arg);
+             }
+             $parent = $this->framed || preg_match('/^parent\./', $method);
+             $out .= sprintf(
+Index: b/program/steps/mail/compose.inc
+===================================================================
+--- a/program/steps/mail/compose.inc   2009-10-06 08:55:08.000000000 +0200
++++ b/program/steps/mail/compose.inc   2010-07-17 17:33:24.000000000 +0200
+@@ -493,7 +493,7 @@
+       JQ(Q(rcube_label('close'))),
+       JQ(Q(rcube_label('revertto'))),
+       JQ(Q(rcube_label('nospellerrors'))),
+-      json_serialize($spellcheck_langs),
++      json_encode($spellcheck_langs),
+       $lang,
+       $attrib['id'],
+       JS_OBJECT_NAME), 'foot');
+Index: b/program/steps/mail/func.inc
+===================================================================
+--- a/program/steps/mail/func.inc      2009-10-24 21:09:23.000000000 +0200
++++ b/program/steps/mail/func.inc      2010-07-17 17:33:24.000000000 +0200
+@@ -522,7 +522,7 @@
+   
+   if (is_array($quota)) {
+     $OUTPUT->add_script('$(document).ready(function(){
+-      rcmail.set_quota('.json_serialize($quota).')});', 'foot');
++      rcmail.set_quota('.json_encode($quota).')});', 'foot');
+     $quota = '';
+     }
+   
index 645734beb28dc823301c6438653ab8c2032ff520..5b889ee0d07665ce88f3f9c136aa0ce6270af327 100644 (file)
@@ -1,12 +1,14 @@
 Compatibility with jQuery 1.4.\r
 \r
-Index: roundcubemail/program/include/rcube_json_output.php\r
-===================================================================\r
---- roundcubemail/program/include/rcube_json_output.php (revision 3175)\r
-+++ roundcubemail/program/include/rcube_json_output.php (revision 3202)\r
-@@ -219,5 +219,4 @@\r
-             send_nocacheing_headers();\r
-             header('Content-Type: text/plain; charset=' . $this->get_charset());\r
--            print '/** ajax response ['.date('d/M/Y h:i:s O')."] **/\n";\r
-         }\r
\r
+Index: b/program/include/rcube_json_output.php
+===================================================================
+--- a/program/include/rcube_json_output.php    2010-07-17 17:33:24.000000000 +0200
++++ b/program/include/rcube_json_output.php    2010-07-17 17:33:24.000000000 +0200
+@@ -218,7 +218,6 @@
+             $s_header_sent = true;
+             send_nocacheing_headers();
+             header('Content-Type: text/plain; charset=' . $this->get_charset());
+-            print '/** ajax response ['.date('d/M/Y h:i:s O')."] **/\n";
+         }
+         // unset default env vars
index de9330f217e418d01c34fcaaa9ca7955d7ada2e9..e2ca99fa8e487826ab1a94c92956a8fad8504033 100644 (file)
@@ -1,13 +1,15 @@
 On Debian, the magic file is in /usr/share/file/magic.
 
---- roundcube-0.1/config/main.inc.php.dist~    2008-02-21 11:27:19.000000000 +0100
-+++ roundcube-0.1/config/main.inc.php.dist     2008-03-06 14:04:53.000000000 +0100
-@@ -277,7 +277,7 @@
+Index: b/config/main.inc.php.dist
+===================================================================
+--- a/config/main.inc.php.dist 2009-10-21 10:47:40.000000000 +0200
++++ b/config/main.inc.php.dist 2010-07-17 17:33:23.000000000 +0200
+@@ -338,7 +338,7 @@
  $rcmail_config['max_pagesize'] = 200;
  
  // mime magic database
 -$rcmail_config['mime_magic'] = '/usr/share/misc/magic';
 +$rcmail_config['mime_magic'] = '/usr/share/file/magic';
  
- // end of config file
- ?>
+ // default sort col
+ $rcmail_config['message_sort_col'] = 'date';
index b8e6daa45abcec466b34ac85a7ecabf65bf0df84..04ec738a1c854a90511b0e9d39611721e8bb9750 100644 (file)
@@ -1,7 +1,9 @@
 Install path is /var/lib/roundcube for Debian. Don't try to guess it.
 
---- a/program/include/iniset.php~      2008-06-09 22:57:53.000000000 +0200
-+++ a/program/include/iniset.php       2008-06-22 12:10:55.000000000 +0200
+Index: b/program/include/iniset.php
+===================================================================
+--- a/program/include/iniset.php       2010-07-17 17:33:04.000000000 +0200
++++ b/program/include/iniset.php       2010-07-17 17:33:23.000000000 +0200
 @@ -27,7 +27,7 @@
  define('JS_OBJECT_NAME', 'rcmail');
  
@@ -10,4 +12,4 @@ Install path is /var/lib/roundcube for Debian. Don't try to guess it.
 +  define('INSTALL_PATH', '/var/lib/roundcube/');
  }
  
- // make sure path_separator is defined
+ define('RCMAIL_CONFIG_DIR', INSTALL_PATH . 'config');
index 61938fa841b027cb52fb7fc58f8320c1fdd7b95b..fbc2c0e0589e2a9db3b834f00551050d98268c60 100644 (file)
@@ -1,22 +1,23 @@
 The default db.inc.php is modified to adapt it to the use of dbconfig-common package.
 
---- roundcube_0.1~beta2.2/config/db.inc.php.dist        2006-03-20 23:08:51.000000000 +0100
-+++ roundcube_0.1~beta2.2/config/db.inc.php.dist  2007-03-13 14:33:38.000000000 +0100
+Index: b/config/db.inc.php.dist
+===================================================================
+--- a/config/db.inc.php.dist   2010-07-17 17:33:04.000000000 +0200
++++ b/config/db.inc.php.dist   2010-07-17 17:33:23.000000000 +0200
 @@ -14,15 +14,20 @@
-
  $rcmail_config = array();
-
 -// PEAR database DSN for read/write operations
 -// format is db_provider://user:password@host/database 
 -// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
 -// currently supported db_providers: mysql, mysqli, pgsql, sqlite, mssql
--
++/* Do not set db_dsnw here, use dpkg-reconfigure roundcube to configure database ! */
 -$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
 -// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
 -// Warning: for SQLite use absolute path in DSN:
 -// sqlite example: 'sqlite:////full/path/to/sqlite.db?mode=0646';
-+/* Do not set db_dsnw here, use dpkg-reconfigure roundcube to configure database ! */
-+
 +include_once("/etc/roundcube/debian-db.php");
 +
 +switch ($dbtype) {
@@ -29,6 +30,6 @@ The default db.inc.php is modified to adapt it to the use of dbconfig-common pac
 +   $rcmail_config['db_dsnw'] = "$dbtype://$dbuser:$dbpass@$dbserver$dbport/$dbname";
 +   break;
 + }
-
  // PEAR database DSN for read only operations (if empty write database will be used)
  // useful for database replication
index 2122f215ff548bfabe7a76ca82d45ce37a50f0c3..24c3ea5a244a208badd732bd2f605d76d5db9b50 100644 (file)
@@ -1,7 +1,9 @@
 Switch to UTF-8 as default charset
 
---- roundcubemail-0.3.1-dep/config/main.inc.php.dist~  2009-10-21 10:47:40.000000000 +0200
-+++ roundcubemail-0.3.1-dep/config/main.inc.php.dist   2010-07-10 18:06:50.000000000 +0200
+Index: b/config/main.inc.php.dist
+===================================================================
+--- a/config/main.inc.php.dist 2010-07-17 17:33:24.000000000 +0200
++++ b/config/main.inc.php.dist 2010-07-17 17:33:25.000000000 +0200
 @@ -215,7 +215,7 @@
  $rcmail_config['mdn_requests'] = 0;
  
index 450145fb77ea4d2cb21188cc137d711865d2128c..6f6c6d8e14c7d85d4f03e41ea79ee9b159ecbeed 100644 (file)
@@ -1,9 +1,9 @@
 Disable DNS prefetching to solve CVE-2010-0464.
 
-Index: program/include/rcube_html_page.php
+Index: b/program/include/rcube_html_page.php
 ===================================================================
---- rcube/program/include/rcube_html_page.php  (revision 3214)
-+++ rcube/program/include/rcube_html_page.php  (working copy)
+--- a/program/include/rcube_html_page.php      2009-06-22 18:20:34.000000000 +0200
++++ b/program/include/rcube_html_page.php      2010-07-17 17:33:25.000000000 +0200
 @@ -165,6 +165,13 @@
              $__page_header.= $this->charset . '" />'."\n";
          }
index c9852aa2dd37158a0cdb22bc014da5cfea74a162..27cb519066147010e6ff93bb65ff6a9c0cfc58ef 100644 (file)
@@ -1,6 +1,8 @@
 To fix #568360 and #568537, don't limit local part size.
---- roundcube-0.3.1/program/include/main.inc~  2009-10-31 14:44:19.751802878 +0100
-+++ roundcube-0.3.1/program/include/main.inc   2010-02-05 19:46:12.000000000 +0100
+Index: b/program/include/main.inc
+===================================================================
+--- a/program/include/main.inc 2009-10-31 14:44:19.000000000 +0100
++++ b/program/include/main.inc 2010-07-17 17:33:25.000000000 +0200
 @@ -1427,7 +1427,7 @@
      return false;
  
index 7e04ce5c31922ae845b4cbcf8a874993211a1bf0..ce56b9f1d9f89ca36d76eced5d9581ccee72c3db 100644 (file)
@@ -1,8 +1,10 @@
 Fix size of login box to accommodate sk_SK locale
 
---- r/skins/default/common.css~        2009-09-04 12:42:24.000000000 +0200
-+++ r/skins/default/common.css 2009-09-27 11:27:25.000000000 +0200
-@@ -494,7 +494,7 @@
+Index: b/skins/default/common.css
+===================================================================
+--- a/skins/default/common.css 2009-10-06 12:00:33.000000000 +0200
++++ b/skins/default/common.css 2010-07-17 17:33:24.000000000 +0200
+@@ -506,7 +506,7 @@
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
index f2a7a91b4b6f455476c66b88a8c853b48c8cd91e..a498c599608b568ccaf0bf5f296aad89da98a285 100644 (file)
@@ -1,8 +1,10 @@
 Use tinymce from tinycme package instead of the shipped one.
 
---- roundcube-0.1~rc2.orig/program/steps/mail/sendmail.inc     2007-11-26 11:42:36.000000000 +0100
-+++ roundcube-0.1~rc2/program/steps/mail/sendmail.inc  2007-11-26 11:44:04.000000000 +0100
-@@ -123,7 +123,7 @@
+Index: b/program/steps/mail/sendmail.inc
+===================================================================
+--- a/program/steps/mail/sendmail.inc  2009-10-14 12:52:27.000000000 +0200
++++ b/program/steps/mail/sendmail.inc  2010-07-17 17:33:23.000000000 +0200
+@@ -128,7 +128,7 @@
  
          // sanitize image name so resulting attachment doesn't leave images dir
          $image_name = preg_replace('/[^a-zA-Z0-9_\.\-]/i', '', $image_name);
index 843097df77c2e957c1b19f06b7bb29ce47046cf4..d3ade031ee4ce024aba4f7d797f614214976d216 100644 (file)
@@ -1,8 +1,10 @@
 Instead of using Google by default, we use pspell to avoid to send each mail to Google...
 
---- roundcube-0.1/config/main.inc.php.dist~    2009-05-15 12:22:29.000000000 +0200
-+++ roundcube-0.1/config/main.inc.php.dist     2009-07-05 09:59:26.000000000 +0200
-@@ -199,7 +199,7 @@
+Index: b/config/main.inc.php.dist
+===================================================================
+--- a/config/main.inc.php.dist 2010-07-17 17:33:23.000000000 +0200
++++ b/config/main.inc.php.dist 2010-07-17 17:33:24.000000000 +0200
+@@ -224,7 +224,7 @@
  
  // Set the spell checking engine. 'googie' is the default. 'pspell' is also available,
  // but requires the Pspell extensions. When using Nox Spell Server, also set 'googie' here.