commit 6eb8d15f64841cfbcc0a88110f7e7e3cb08cce6a
Author: Assos Assos <assos+forge@centrale-marseille.fr>
Date:   Wed May 21 22:41:42 2014 +0200

    Weekly update of contrib modules

diff --git a/drupal7/sites/all/modules/imce/imce.info b/drupal7/sites/all/modules/imce/imce.info
index e8699c8c..9fd852c5 100644
--- a/drupal7/sites/all/modules/imce/imce.info
+++ b/drupal7/sites/all/modules/imce/imce.info
@@ -4,9 +4,9 @@ core = "7.x"
 package = "Media"
 configure = "admin/config/media/imce"
 
-; Information added by Drupal.org packaging script on 2013-12-17
-version = "7.x-1.8"
+; Information added by Drupal.org packaging script on 2014-05-16
+version = "7.x-1.9"
 core = "7.x"
 project = "imce"
-datestamp = "1387302359"
+datestamp = "1400275428"
 
diff --git a/drupal7/sites/all/modules/imce/imce.install b/drupal7/sites/all/modules/imce/imce.install
index 688c6b5b..40ddcd3f 100644
--- a/drupal7/sites/all/modules/imce/imce.install
+++ b/drupal7/sites/all/modules/imce/imce.install
@@ -101,4 +101,24 @@ function imce_update_7001(&$sandbox) {
     db_drop_table('imce_files');
     return t('Migrated IMCE files.');
   }
+}
+
+/**
+ * Fixes misconfigurations where anonymous user is given User-1 profile
+ */
+function imce_update_7002() {
+  $roles = variable_get('imce_roles_profiles', array());
+  $rid = DRUPAL_ANONYMOUS_RID;
+  if (!empty($roles[$rid])) {
+    $update = FALSE;
+    foreach ($roles[$rid] as $key => $value) {
+      if ($value == 1 && substr($key, -4) == '_pid') {
+        $roles[$rid][$key] = '0';
+        $update = TRUE;
+      }
+    }
+    if ($update) {
+      variable_set('imce_roles_profiles', $roles);
+    }
+  }
 }
\ No newline at end of file
diff --git a/drupal7/sites/all/modules/imce/inc/imce.admin.inc b/drupal7/sites/all/modules/imce/inc/imce.admin.inc
index d88cd28d..c2d3625c 100644
--- a/drupal7/sites/all/modules/imce/inc/imce.admin.inc
+++ b/drupal7/sites/all/modules/imce/inc/imce.admin.inc
@@ -35,6 +35,18 @@ function imce_admin() {
     '#attributes' => array('id' => 'imce-profiles-list'),
   );
   $output['form'] = drupal_get_form('imce_admin_form');
+
+  // Display security warnings
+  if (empty($_POST)) {
+    $roles = variable_get('imce_roles_profiles', array());
+    if (!empty($roles[DRUPAL_ANONYMOUS_RID]['public_pid']) || !empty($roles[DRUPAL_ANONYMOUS_RID]['private_pid'])) {
+      drupal_set_message(t('Anonymous user role has access to IMCE.') . ' ' . t('Make sure this is not a misconfiguration.'), 'warning');
+    }
+    if (imce_admin_check_wildcard_upload(DRUPAL_AUTHENTICATED_RID, $roles)) {
+      drupal_set_message(t('Authenticated user role is assigned a configuration profile with unrestricted file extensions.') . ' ' . t('Make sure this is not a misconfiguration.'), 'warning');
+    }
+  }
+
   return $output;
 }
 
@@ -146,6 +158,17 @@ function imce_admin_theme($variables) {
   return $output;
 }
 
+/**
+ * Validate admin form.
+ */
+function imce_admin_form_validate($form, &$form_state) {
+  $roles = $form_state['values']['roles'];
+  // Check anonymous profile. Do not allow wildcard upload.
+  if ($key = imce_admin_check_wildcard_upload(DRUPAL_ANONYMOUS_RID, $roles)) {
+    form_error($form['roles'][DRUPAL_ANONYMOUS_RID][$key], t('Anonymous user role can not have a configuration profile with unrestricted file extensions.'));
+  }
+}
+
 /**
  * Submit admin form.
  */
@@ -173,7 +196,7 @@ function imce_profile_operations($op = 'add', $pid = 0) {
     return drupal_get_form('imce_profile_delete_form', $pid);
   }
   //add-edit
-  if ($pid != 1 || $GLOBALS['user']->uid == 1) {
+  if ($op === 'add' || $op === 'edit') {
     return drupal_get_form('imce_profile_form', $pid);
   }
   drupal_access_denied();
@@ -688,5 +711,30 @@ function imce_rolesort($r1, $r2) {
   return $r1['weight']-$r2['weight'];
 }
 
+/**
+ * Checks if the given role can upload all extensions.
+ */
+function imce_admin_check_wildcard_upload($rid, $conf = NULL) {
+  if (!isset($conf)) {
+    $conf = variable_get('imce_roles_profiles', array());
+  }
+  if (!empty($conf[$rid])) {
+    foreach ($conf[$rid] as $key => $pid) {
+      if ($pid && substr($key, -4) == '_pid') {
+        if ($profile = imce_load_profile($pid)) {
+          if ($profile['extensions'] === '*' && !empty($profile['directories'])) {
+            foreach ($profile['directories'] as $dirconf) {
+              if (!empty($dirconf['upload'])) {
+                return $key;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+  return FALSE;
+}
+
 //Include core profile functions.
 include_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'imce') . '/inc/imce.core.profiles.inc';
\ No newline at end of file
diff --git a/drupal7/sites/all/modules/imce/inc/imce.page.inc b/drupal7/sites/all/modules/imce/inc/imce.page.inc
index bcb00b2d..ab52aa78 100644
--- a/drupal7/sites/all/modules/imce/inc/imce.page.inc
+++ b/drupal7/sites/all/modules/imce/inc/imce.page.inc
@@ -116,7 +116,7 @@ function imce_js($user, $scheme, $jsop = '') {
   //disable devel log.
   $GLOBALS['devel_shutdown'] = FALSE;
   //for upload we must return plain text header.
-  drupal_add_http_header('Content-Type', 'text/' . ($jsop == 'upload' ? 'html' : 'javascript') . '; charset=utf-8');
+  drupal_add_http_header('Content-Type', (!empty($_POST['html_response']) ? 'text/html' : 'application/json') . '; charset=utf-8');
   print drupal_json_encode($response);
   exit();
 }
@@ -144,6 +144,7 @@ function imce_upload_form($form, &$form_state, $ref) {
     '#submit' => $imce['perm']['upload'] ? array('imce_upload_submit') : NULL,
   );
   $form = array('fset_upload' => array('#type' => 'fieldset', '#title' => t('Upload file')) + $form);
+  $form['html_response'] = array('#type' => 'hidden', '#default_value' => '1');
   $form['#attributes']['enctype'] = 'multipart/form-data';
   $form['#action'] = $imce['url'];
   return $form;
diff --git a/drupal7/sites/all/modules/imce/js/imce.js b/drupal7/sites/all/modules/imce/js/imce.js
index 2e97b4aa..4e8948d0 100644
--- a/drupal7/sites/all/modules/imce/js/imce.js
+++ b/drupal7/sites/all/modules/imce/js/imce.js
@@ -7,8 +7,8 @@ hooks: {load: [], list: [], navigate: [], cache: []},
 //initiate imce.
 initiate: function() {
   imce.conf = Drupal.settings.imce || {};
-  imce.ie = (navigator.userAgent.match(/msie (\d+)/i) || ['', 0])[1] * 1;
   if (imce.conf.error != false) return;
+  imce.ie = (navigator.userAgent.match(/msie (\d+)/i) || ['', 0])[1] * 1;
   imce.FLW = imce.el('file-list-wrapper'), imce.SBW = imce.el('sub-browse-wrapper');
   imce.NW = imce.el('navigation-wrapper'), imce.BW = imce.el('browse-wrapper');
   imce.PW = imce.el('preview-wrapper'), imce.FW = imce.el('forms-wrapper');
@@ -19,6 +19,8 @@ initiate: function() {
   imce.initiateList();//process file list
   imce.initiateOps();//prepare operation tabs
   imce.refreshOps();
+  // Bind global error handler
+  $(document).ajaxError(imce.ajaxError);
   imce.invoke('load', window);//run functions set by external applications.
 },
 
@@ -241,12 +243,19 @@ setHtmlOps: function () {
 
 //convert upload form to an op.
 setUploadOp: function () {
-  var form = imce.el('imce-upload-form');
+  var el, form = imce.el('imce-upload-form');
   if (!form) return;
   $(form).ajaxForm(imce.uploadSettings()).find('fieldset').each(function() {//clean up fieldsets
     this.removeChild(this.firstChild);
     $(this).after(this.childNodes);
   }).remove();
+  // Set html response flag
+  el = form.elements['files[imce]'];
+  if (el && el.files && window.FormData) {
+    if (el = form.elements.html_response) {
+      el.value = 0;
+    }
+  } 
   imce.opAdd({name: 'upload', title: Drupal.t('Upload'), content: form});//add op
 },
 
@@ -257,7 +266,7 @@ setFileOps: function () {
   $(form.elements.filenames).parent().remove();
   $(form).find('fieldset').each(function() {//remove fieldsets
     var $sbmt = $('input:submit', this);
-    if (!$sbmt.size()) return;
+    if (!$sbmt.length) return;
     var Op = {name: $sbmt.attr('id').substr(5)};
     var func = function() {imce.fopSubmit(Op.name); return false;};
     $sbmt.click(func);
@@ -279,7 +288,7 @@ refreshOps: function() {
 //add a new file operation
 opAdd: function (op) {
   var oplist = imce.el('ops-list'), opcons = imce.el('op-contents');
-  var name = op.name || ('op-'+ $(oplist).children('li').size());
+  var name = op.name || ('op-'+ $(oplist).children('li').length);
   var title = op.title || 'Untitled';
   var Op = imce.ops[name] = {title: title};
   if (op.content) {
@@ -323,7 +332,7 @@ opClick: function(name) {
           var $inputs = $('input', imce.ops[imce.vars.op].div);
           $inputs.eq(0).focus();
           //form inputs become invisible in IE. Solution is as stupid as the behavior.
-          $('html').is('.ie') && $inputs.addClass('dummyie').removeClass('dummyie');
+          $('html').hasClass('ie') && $inputs.addClass('dummyie').removeClass('dummyie');
        }
       });
     });
@@ -439,7 +448,19 @@ uploadValidate: function (data, form, options) {
 
 //settings for upload
 uploadSettings: function () {
-  return {beforeSubmit: imce.uploadValidate, success: function (response) {imce.processResponse($.parseJSON(response));}, complete: function () {imce.fopLoading('upload', false);}, resetForm: true};
+  return {
+    beforeSubmit: imce.uploadValidate,
+    success: function (response) {
+      try{
+        imce.processResponse($.parseJSON(response));
+      } catch(e) {}
+    },
+    complete: function () {
+      imce.fopLoading('upload', false);
+    },
+    resetForm: true,
+    dataType: 'text'
+  };
 },
 
 //validate default ops(delete, thumb, resize)
@@ -449,7 +470,7 @@ fopValidate: function(fop) {
     case 'delete':
       return confirm(Drupal.t('Delete selected files?'));
     case 'thumb':
-      if (!$('input:checked', imce.ops['thumb'].div).size()) {
+      if (!$('input:checked', imce.ops['thumb'].div).length) {
         return imce.setMessage(Drupal.t('Please select a thumbnail.'), 'error');
       }
       return imce.validateImage();
@@ -486,7 +507,7 @@ commonSubmit: function(fop) {
 
 //settings for default file operations
 fopSettings: function (fop) {
-  return {url: imce.ajaxURL(fop), type: 'POST', dataType: 'json', success: imce.processResponse, complete: function (response) {imce.fopLoading(fop, false);}, data: imce.vars.opform +'&filenames='+ escape(imce.serialNames()) +'&jsop='+ fop + (imce.ops[fop].div ? '&'+ $('input, select, textarea', imce.ops[fop].div).serialize() : '')};
+  return {url: imce.ajaxURL(fop), type: 'POST', dataType: 'json', success: imce.processResponse, complete: function (response) {imce.fopLoading(fop, false);}, data: imce.vars.opform +'&filenames='+ encodeURIComponent(imce.serialNames()) +'&jsop='+ fop + (imce.ops[fop].div ? '&'+ $('input, select, textarea', imce.ops[fop].div).serialize() : '')};
 },
 
 //toggle loading state
@@ -536,7 +557,7 @@ prepareMsgs: function () {
     $('>div', msgs).each(function (){
       var type = this.className.split(' ')[1];
       var li = $('>ul li', this);
-      if (li.size()) li.each(function () {imce.setMessage(this.innerHTML, type);});
+      if (li.length) li.each(function () {imce.setMessage(this.innerHTML, type);});
       else imce.setMessage(this.innerHTML, type);
     });
     $(msgs).remove();
@@ -703,7 +724,10 @@ processRow: function (row) {
 
 //decode urls. uses unescape. can be overridden to use decodeURIComponent
 decode: function (str) {
-  return unescape(str);
+  try {
+    return decodeURIComponent(str);
+  } catch(e) {}
+  return str;
 },
 
 //decode and convert to plain text
@@ -771,7 +795,7 @@ updateUI: function() {
     return false;
   }).appendTo('#op-contents')[0];
   //navigation-header
-  if (!$('#navigation-header').size()) {
+  if (!$('#navigation-header').length) {
     $(imce.NW).children('.navigation-text').attr('id', 'navigation-header').wrapInner('<span></span>');
   }
   //log
@@ -801,6 +825,6 @@ updateUI: function() {
 };
 
 //initiate
-$(document).ready(imce.initiate).ajaxError(imce.ajaxError);
+$(document).ready(imce.initiate);
 
 })(jQuery);
\ No newline at end of file
diff --git a/drupal7/sites/all/modules/imce/js/imce_extras.js b/drupal7/sites/all/modules/imce/js/imce_extras.js
index f5cff029..b558cc50 100644
--- a/drupal7/sites/all/modules/imce/js/imce_extras.js
+++ b/drupal7/sites/all/modules/imce/js/imce_extras.js
@@ -180,7 +180,7 @@ imce.setResizer = function (resizer, axis, area1, area2, Min, callback) {
 //get&set area dimensions of the last session from the cookie
 imce.recallDimensions = function() {
   var $body = $(document.body);
-  if (!$body.is('.imce')) return;
+  if (!$body.hasClass('imce')) return;
   //row heights
   imce.recallHeights(imce.cookie('imcebwh') * 1);
   $(window).resize(function(){imce.recallHeights()});
@@ -214,9 +214,9 @@ imce.recallHeights = function(bwFixedHeight) {
 //cookie get & set
 imce.cookie = function (name, value) {
   if (typeof(value) == 'undefined') {//get
-    return unescape((document.cookie.match(new RegExp('(^|;) *'+ name +'=([^;]*)(;|$)')) || ['', '', ''])[2]);
+    return document.cookie ? imce.decode((document.cookie.match(new RegExp('(?:^|;) *' + name + '=([^;]*)(?:;|$)')) || ['', ''])[1].replace(/\+/g, '%20')) : '';
   }
-  document.cookie = name +'='+ escape(value) +'; expires='+ (new Date(new Date() * 1 + 15 * 86400000)).toGMTString() +'; path=' + Drupal.settings.basePath + 'imce';//set
+  document.cookie = name +'='+ encodeURIComponent(value) +'; expires='+ (new Date(new Date() * 1 + 15 * 86400000)).toUTCString() +'; path=' + Drupal.settings.basePath + 'imce';//set
 };
 
 //view thumbnails(smaller than tMaxW x tMaxH) inside the rows.
diff --git a/drupal7/sites/all/modules/imce/js/imce_set_app.js b/drupal7/sites/all/modules/imce/js/imce_set_app.js
index 23908688..419f7df6 100644
--- a/drupal7/sites/all/modules/imce/js/imce_set_app.js
+++ b/drupal7/sites/all/modules/imce/js/imce_set_app.js
@@ -53,7 +53,7 @@ imce.hooks.load.push(function(win) {
     if (appFields.url.indexOf(',') > -1) {
       var arr = appFields.url.split(',');
       for (var i in arr) {
-        if ($('#'+ arr[i], appWindow.document).size()) {
+        if ($('#'+ arr[i], appWindow.document).length) {
           appFields.url = arr[i];
           break;
         }
diff --git a/drupal7/sites/all/modules/imce/js/imce_set_inline.js b/drupal7/sites/all/modules/imce/js/imce_set_inline.js
index 82706b74..08891a10 100644
--- a/drupal7/sites/all/modules/imce/js/imce_set_inline.js
+++ b/drupal7/sites/all/modules/imce/js/imce_set_inline.js
@@ -21,7 +21,7 @@ Drupal.behaviors.imceInline = {attach: function(context, settings) {
 //function to be executed when imce loads.
 ii.load = function(win) {
   win.imce.setSendTo(Drupal.t('Insert file'), ii.insert);
-  $(window).unload(function() {
+  $(window).bind('unload', function() {
     if (ii.pop && !ii.pop.closed) ii.pop.close();
   });
 };
diff --git a/drupal7/sites/all/modules/imce/js/jquery.form.js b/drupal7/sites/all/modules/imce/js/jquery.form.js
index 69bf8997..b750db69 100644
--- a/drupal7/sites/all/modules/imce/js/jquery.form.js
+++ b/drupal7/sites/all/modules/imce/js/jquery.form.js
@@ -1,6 +1,31 @@
-/*
+/*!
  * jQuery Form Plugin
- * version: 2.67 (12-MAR-2011)
+ * version: 3.17 (25-SEP-2012)
  * @requires jQuery v1.3.2 or later
  */
-(function(b){b.fn.ajaxSubmit=function(t){if(!this.length){a("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof t=="function"){t={success:t}}var h=this.attr("action");var d=(typeof h==="string")?b.trim(h):"";if(d){d=(d.match(/^([^#]+)/)||[])[1]}d=d||window.location.href||"";t=b.extend(true,{url:d,type:this[0].getAttribute("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var u={};this.trigger("form-pre-serialize",[this,t,u]);if(u.veto){a("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(t.beforeSerialize&&t.beforeSerialize(this,t)===false){a("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var f,p,m=this.formToArray(t.semantic);if(t.data){t.extraData=t.data;for(f in t.data){if(t.data[f] instanceof Array){for(var i in t.data[f]){m.push({name:f,value:t.data[f][i]})}}else{p=t.data[f];p=b.isFunction(p)?p():p;m.push({name:f,value:p})}}}if(t.beforeSubmit&&t.beforeSubmit(m,this,t)===false){a("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[m,this,t,u]);if(u.veto){a("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var c=b.param(m);if(t.type.toUpperCase()=="GET"){t.url+=(t.url.indexOf("?")>=0?"&":"?")+c;t.data=null}else{t.data=c}var s=this,l=[];if(t.resetForm){l.push(function(){s.resetForm()})}if(t.clearForm){l.push(function(){s.clearForm()})}if(!t.dataType&&t.target){var r=t.success||function(){};l.push(function(n){var k=t.replaceTarget?"replaceWith":"html";b(t.target)[k](n).each(r,arguments)})}else{if(t.success){l.push(t.success)}}t.success=function(w,n,x){var v=t.context||t;for(var q=0,k=l.length;q<k;q++){l[q].apply(v,[w,n,x||s,s])}};var g=b("input:file",this).length>0;var e="multipart/form-data";var j=(s.attr("enctype")==e||s.attr("encoding")==e);if(t.iframe!==false&&(g||t.iframe||j)){if(t.closeKeepAlive){b.get(t.closeKeepAlive,o)}else{o()}}else{b.ajax(t)}this.trigger("form-submit-notify",[this,t]);return this;function o(){var v=s[0];if(b(":input[name=submit],:input[id=submit]",v).length){alert('Error: Form elements must not have name or id of "submit".');return}var B=b.extend(true,{},b.ajaxSettings,t);B.context=B.context||B;var E="jqFormIO"+(new Date().getTime()),z="_"+E;var w=b('<iframe id="'+E+'" name="'+E+'" src="'+B.iframeSrc+'" />');var A=w[0];w.css({position:"absolute",top:"-1000px",left:"-1000px"});var x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){a("aborting upload...");var n="aborted";this.aborted=1;w.attr("src",B.iframeSrc);x.error=n;B.error&&B.error.call(B.context,x,"error",n);I&&b.event.trigger("ajaxError",[x,B,n]);B.complete&&B.complete.call(B.context,x,"error")}};var I=B.global;if(I&&!b.active++){b.event.trigger("ajaxStart")}if(I){b.event.trigger("ajaxSend",[x,B])}if(B.beforeSend&&B.beforeSend.call(B.context,x,B)===false){if(B.global){b.active--}return}if(x.aborted){return}var H=0;var y=v.clk;if(y){var F=y.name;if(F&&!y.disabled){B.extraData=B.extraData||{};B.extraData[F]=y.value;if(y.type=="image"){B.extraData[F+".x"]=v.clk_x;B.extraData[F+".y"]=v.clk_y}}}function G(){var O=s.attr("target"),M=s.attr("action");v.setAttribute("target",E);if(v.getAttribute("method")!="POST"){v.setAttribute("method","POST")}if(v.getAttribute("action")!=B.url){v.setAttribute("action",B.url)}if(!B.skipEncodingOverride){s.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(B.timeout){setTimeout(function(){H=true;D()},B.timeout)}var N=[];try{if(B.extraData){for(var P in B.extraData){N.push(b('<input type="hidden" name="'+P+'" value="'+B.extraData[P]+'" />').appendTo(v)[0])}}w.appendTo("body");A.attachEvent?A.attachEvent("onload",D):A.addEventListener("load",D,false);v.submit()}finally{v.setAttribute("action",M);if(O){v.setAttribute("target",O)}else{s.removeAttr("target")}b(N).remove()}}if(B.forceSync){G()}else{setTimeout(G,10)}var K,L,J=50;function D(){if(x.aborted){return}var R=A.contentWindow?A.contentWindow.document:A.contentDocument?A.contentDocument:A.document;if(!R||R.location.href==B.iframeSrc){return}A.detachEvent?A.detachEvent("onload",D):A.removeEventListener("load",D,false);var N=true;try{if(H){throw"timeout"}var S=B.dataType=="xml"||R.XMLDocument||b.isXMLDoc(R);a("isXml="+S);if(!S&&window.opera&&(R.body==null||R.body.innerHTML=="")){if(--J){a("requeing onLoad callback, DOM not available");setTimeout(D,250);return}}x.responseText=R.body?R.body.innerHTML:R.documentElement?R.documentElement.innerHTML:null;x.responseXML=R.XMLDocument?R.XMLDocument:R;x.getResponseHeader=function(U){var T={"content-type":B.dataType};return T[U]};var Q=/(json|script)/.test(B.dataType);if(Q||B.textarea){var M=R.getElementsByTagName("textarea")[0];if(M){x.responseText=M.value}else{if(Q){var P=R.getElementsByTagName("pre")[0];var n=R.getElementsByTagName("body")[0];if(P){x.responseText=P.textContent}else{if(n){x.responseText=n.innerHTML}}}}}else{if(B.dataType=="xml"&&!x.responseXML&&x.responseText!=null){x.responseXML=C(x.responseText)}}K=k(x,B.dataType,B)}catch(O){a("error caught:",O);N=false;x.error=O;B.error&&B.error.call(B.context,x,"error",O);I&&b.event.trigger("ajaxError",[x,B,O])}if(x.aborted){a("upload aborted");N=false}if(N){B.success&&B.success.call(B.context,K,"success",x);I&&b.event.trigger("ajaxSuccess",[x,B])}I&&b.event.trigger("ajaxComplete",[x,B]);if(I&&!--b.active){b.event.trigger("ajaxStop")}B.complete&&B.complete.call(B.context,x,N?"success":"error");setTimeout(function(){w.removeData("form-plugin-onload");w.remove();x.responseXML=null},100)}var C=b.parseXML||function(n,M){if(window.ActiveXObject){M=new ActiveXObject("Microsoft.XMLDOM");M.async="false";M.loadXML(n)}else{M=(new DOMParser()).parseFromString(n,"text/xml")}return(M&&M.documentElement&&M.documentElement.nodeName!="parsererror")?M:null};var q=b.parseJSON||function(n){return window["eval"]("("+n+")")};var k=function(Q,O,N){var M=Q.getResponseHeader("content-type")||"",n=O==="xml"||!O&&M.indexOf("xml")>=0,P=n?Q.responseXML:Q.responseText;if(n&&P.documentElement.nodeName==="parsererror"){b.error&&b.error("parsererror")}if(N&&N.dataFilter){P=N.dataFilter(P,O)}if(typeof P==="string"){if(O==="json"||!O&&M.indexOf("json")>=0){P=q(P)}else{if(O==="script"||!O&&M.indexOf("javascript")>=0){b.globalEval(P)}}}return P}}};b.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};if(!b.isReady&&d.s){a("DOM not ready, queuing ajaxForm");b(function(){b(d.s,d.c).ajaxForm(c)});return this}a("terminating; zero elements found by selector"+(b.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(f){if(!f.isDefaultPrevented()){f.preventDefault();b(this).ajaxSubmit(c)}}).bind("click.form-plugin",function(j){var i=j.target;var g=b(i);if(!(g.is(":submit,input:image"))){var f=g.closest(":submit");if(f.length==0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!=undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof b.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)})};b.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};b.fn.formToArray=function(q){var p=[];if(this.length===0){return p}var d=this[0];var g=q?d.getElementsByTagName("*"):d.elements;if(!g){return p}var k,h,f,r,e,m,c;for(k=0,m=g.length;k<m;k++){e=g[k];f=e.name;if(!f){continue}if(q&&d.clk&&e.type=="image"){if(!e.disabled&&d.clk==e){p.push({name:f,value:b(e).val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}continue}r=b.fieldValue(e,true);if(r&&r.constructor==Array){for(h=0,c=r.length;h<c;h++){p.push({name:f,value:r[h]})}}else{if(r!==null&&typeof r!="undefined"){p.push({name:f,value:r})}}}if(!q&&d.clk){var l=b(d.clk),o=l[0];f=o.name;if(f&&!o.disabled&&o.type=="image"){p.push({name:f,value:l.val()});p.push({name:f+".x",value:d.clk_x},{name:f+".y",value:d.clk_y})}}return p};b.fn.formSerialize=function(c){return b.param(this.formToArray(c))};b.fn.fieldSerialize=function(d){var c=[];this.each(function(){var h=this.name;if(!h){return}var f=b.fieldValue(this,d);if(f&&f.constructor==Array){for(var g=0,e=f.length;g<e;g++){c.push({name:h,value:f[g]})}}else{if(f!==null&&typeof f!="undefined"){c.push({name:this.name,value:f})}}});return b.param(c)};b.fn.fieldValue=function(h){for(var g=[],e=0,c=this.length;e<c;e++){var f=this[e];var d=b.fieldValue(f,h);if(d===null||typeof d=="undefined"||(d.constructor==Array&&!d.length)){continue}d.constructor==Array?b.merge(g,d):g.push(d)}return g};b.fieldValue=function(c,j){var e=c.name,p=c.type,q=c.tagName.toLowerCase();if(j===undefined){j=true}if(j&&(!e||c.disabled||p=="reset"||p=="button"||(p=="checkbox"||p=="radio")&&!c.checked||(p=="submit"||p=="image")&&c.form&&c.form.clk!=c||q=="select"&&c.selectedIndex==-1)){return null}if(q=="select"){var k=c.selectedIndex;if(k<0){return null}var m=[],d=c.options;var g=(p=="select-one");var l=(g?k+1:d.length);for(var f=(g?k:0);f<l;f++){var h=d[f];if(h.selected){var o=h.value;if(!o){o=(h.attributes&&h.attributes.value&&!(h.attributes.value.specified))?h.text:h.value}if(g){return o}m.push(o)}}return m}return b(c).val()};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var d=this.type,c=this.tagName.toLowerCase();if(d=="text"||d=="password"||c=="textarea"){this.value=""}else{if(d=="checkbox"||d=="radio"){this.checked=false}else{if(c=="select"){this.selectedIndex=-1}}}})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};b.fn.enable=function(c){if(c===undefined){c=true}return this.each(function(){this.disabled=!c})};b.fn.selected=function(c){if(c===undefined){c=true}return this.each(function(){var d=this.type;if(d=="checkbox"||d=="radio"){this.checked=c}else{if(this.tagName.toLowerCase()=="option"){var e=b(this).parent("select");if(c&&e[0]&&e[0].type=="select-one"){e.find("option").selected(false)}this.selected=c}}})};function a(){if(b.fn.ajaxSubmit.debug){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(c)}else{if(window.opera&&window.opera.postError){window.opera.postError(c)}}}}})(jQuery);
+(function(c){'use strict';function v(a){var d=a.data;a.isDefaultPrevented()||(a.preventDefault(),c(a.target).ajaxSubmit(d))}function y(a){var d=a.target,g=c(d);if(!g.is(":submit,input:image")){d=g.closest(":submit");if(0===d.length)return;d=d[0]}var f=this;f.clk=d;"image"==d.type&&(void 0!==a.offsetX?(f.clk_x=a.offsetX,f.clk_y=a.offsetY):"function"==typeof c.fn.offset?(g=g.offset(),f.clk_x=a.pageX-g.left,f.clk_y=a.pageY-g.top):(f.clk_x=a.pageX-d.offsetLeft,f.clk_y=a.pageY-d.offsetTop));setTimeout(function(){f.clk=
+f.clk_x=f.clk_y=null},100)}function s(){if(c.fn.ajaxSubmit.debug){var a="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(a):window.opera&&window.opera.postError&&window.opera.postError(a)}}var x,z;x=void 0!==c("<input type='file'/>").get(0).files;z=void 0!==window.FormData;c.fn.ajaxSubmit=function(a){function d(b){b=c.param(b,a.traditional).replace(/\+/g," ").split("&");var f=b.length,h=[],d,e;for(d=0;d<f;d++)e=b[d].split("="),h.push([decodeURIComponent(e[0]),
+decodeURIComponent(e[1])]);return h}function g(b){for(var f=new FormData,g=0;g<b.length;g++)f.append(b[g].name,b[g].value);if(a.extraData)for(b=d(a.extraData),g=0;g<b.length;g++)f.append(b[g][0],b[g][1]);a.data=null;g=c.extend(!0,{},c.ajaxSettings,a,{contentType:!1,processData:!1,cache:!1,type:h||"POST"});a.uploadProgress&&(g.xhr=function(){var e=c.ajaxSettings.xhr();e.upload&&(e.upload.onprogress=function(c){var e=0,b=c.loaded||c.position,f=c.total;c.lengthComputable&&(e=Math.ceil(b/f*100));a.uploadProgress(c,
+b,f,e)});return e});g.data=null;var l=g.beforeSend;g.beforeSend=function(c,b){b.data=a.formData||f;l&&l.call(this,c,b)};return c.ajax(g)}function f(b){function f(){function a(){try{var c=(q.contentWindow?q.contentWindow.document:q.contentDocument?q.contentDocument:q.document).readyState;s("state = "+c);c&&"uninitialized"==c.toLowerCase()&&setTimeout(a,50)}catch(b){s("Server abort: ",b," (",b.name,")"),g(x),v&&clearTimeout(v),v=void 0}}var b=d.target,k=d.action,l=d.enctype||d.encoding||"multipart/form-data";
+d.target=m;d.action=e.url;if(!h||/post/i.test(h))d.method="POST";e.skipEncodingOverride||h&&!/post/i.test(h)||(d.enctype="multipart/form-data");e.timeout&&(v=setTimeout(function(){w=!0;g(y)},e.timeout));var p=[];try{if(e.extraData)for(var n in e.extraData)e.extraData.hasOwnProperty(n)&&(e.extraData[n].constructor===Object&&e.extraData[n].hasOwnProperty("name")&&e.extraData[n].hasOwnProperty("value")?p.push(c('<input type="hidden" name="'+e.extraData[n].name+'">').val(e.extraData[n].value).appendTo(d)[0]):
+p.push(c('<input type="hidden" name="'+n+'">').val(e.extraData[n]).appendTo(d)[0]));e.iframeTarget||(r.appendTo("body"),q.attachEvent?q.attachEvent("onload",g):q.addEventListener("load",g,!1));setTimeout(a,15);d.submit.call?d.submit():document.createElement("form").submit.call(d)}finally{d.action=k,d.target=b,d.enctype=l,c(p).remove()}}function g(a){if(!k.aborted&&!C){try{t=q.contentWindow?q.contentWindow.document:q.contentDocument?q.contentDocument:q.document}catch(b){s("cannot access response document: ",
+b),a=x}if(a===y&&k)k.abort("timeout");else if(a==x&&k)k.abort("server abort");else if(t&&t.location.href!=e.iframeSrc||w){q.detachEvent?q.detachEvent("onload",g):q.removeEventListener("load",g,!1);a="success";var d;try{if(w)throw"timeout";var f="xml"==e.dataType||t.XMLDocument||c.isXMLDoc(t);s("isXml="+f);if(!f&&window.opera&&(null===t.body||!t.body.innerHTML)&&--E){s("requeing onLoad callback, DOM not available");setTimeout(g,250);return}var h=t.body?t.body:t.documentElement;k.responseText=h?h.innerHTML:
+null;k.responseXML=t.XMLDocument?t.XMLDocument:t;f&&(e.dataType="xml");k.getResponseHeader=function(a){return{"content-type":e.dataType}[a.toLowerCase()]};h&&(k.status=Number(h.getAttribute("status"))||k.status,k.statusText=h.getAttribute("statusText")||k.statusText);var m=(e.dataType||"").toLowerCase(),n=/(json|script|text)/.test(m);if(n||e.textarea){var p=t.getElementsByTagName("textarea")[0];if(p)k.responseText=p.value,k.status=Number(p.getAttribute("status"))||k.status,k.statusText=p.getAttribute("statusText")||
+k.statusText;else if(n){var u=t.getElementsByTagName("pre")[0],A=t.getElementsByTagName("body")[0];u?k.responseText=u.textContent?u.textContent:u.innerText:A&&(k.responseText=A.textContent?A.textContent:A.innerText)}}else"xml"==m&&!k.responseXML&&k.responseText&&(k.responseXML=F(k.responseText));try{z=G(k,m,e)}catch(D){a="parsererror",k.error=d=D||a}}catch(B){s("error caught: ",B),a="error",k.error=d=B||a}k.aborted&&(s("upload aborted"),a=null);k.status&&(a=200<=k.status&&300>k.status||304===k.status?
+"success":"error");"success"===a?(e.success&&e.success.call(e.context,z,"success",k),l&&c.event.trigger("ajaxSuccess",[k,e])):a&&(void 0===d&&(d=k.statusText),e.error&&e.error.call(e.context,k,a,d),l&&c.event.trigger("ajaxError",[k,e,d]));l&&c.event.trigger("ajaxComplete",[k,e]);l&&!--c.active&&c.event.trigger("ajaxStop");e.complete&&e.complete.call(e.context,k,a);C=!0;e.timeout&&clearTimeout(v);setTimeout(function(){e.iframeTarget||r.remove();k.responseXML=null},100)}}}var d=n[0],e,l,m,r,q,k,u,w,
+v;if(b)for(b=0;b<p.length;b++)p[b].disabled=!1;e=c.extend(!0,{},c.ajaxSettings,a);e.context=e.context||e;m="jqFormIO"+(new Date).getTime();e.iframeTarget?(r=c(e.iframeTarget),(u=r[0].name)?m=u:r[0].name=m):(r=c('<iframe name="'+m+'" src="'+e.iframeSrc+'" />'),r.css({position:"absolute",top:"-1000px",left:"-1000px"}));q=r[0];k={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(a){var b=
+"timeout"===a?"timeout":"aborted";s("aborting upload... "+b);this.aborted=1;try{q.contentWindow.document.execCommand&&q.contentWindow.document.execCommand("Stop")}catch(d){}q.src=e.iframeSrc;k.error=b;e.error&&e.error.call(e.context,k,b,a);l&&c.event.trigger("ajaxError",[k,e,b]);e.complete&&e.complete.call(e.context,k,b)}};(l=e.global)&&0===c.active++&&c.event.trigger("ajaxStart");l&&c.event.trigger("ajaxSend",[k,e]);if(e.beforeSend&&!1===e.beforeSend.call(e.context,k,e))e.global&&c.active--;else if(!k.aborted){(b=
+d.clk)&&(u=b.name)&&!b.disabled&&(e.extraData=e.extraData||{},e.extraData[u]=b.value,"image"==b.type&&(e.extraData[u+".x"]=d.clk_x,e.extraData[u+".y"]=d.clk_y));var y=1,x=2;b=c("meta[name=csrf-token]").attr("content");(u=c("meta[name=csrf-param]").attr("content"))&&b&&(e.extraData=e.extraData||{},e.extraData[u]=b);e.forceSync?f():setTimeout(f,10);var z,t,E=50,C,F=c.parseXML||function(a,b){window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,
+"text/xml");return b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},H=c.parseJSON||function(a){return window.eval("("+a+")")},G=function(a,b,e){var d=a.getResponseHeader("content-type")||"",f="xml"===b||!b&&0<=d.indexOf("xml");a=f?a.responseXML:a.responseText;f&&"parsererror"===a.documentElement.nodeName&&c.error&&c.error("parsererror");e&&e.dataFilter&&(a=e.dataFilter(a,b));"string"===typeof a&&("json"===b||!b&&0<=d.indexOf("json")?a=H(a):("script"===b||!b&&0<=d.indexOf("javascript"))&&
+c.globalEval(a));return a}}}if(!this.length)return s("ajaxSubmit: skipping submit process - no element selected"),this;var h,b,n=this;a?"function"===typeof a&&(a={success:a}):a={};h=a.type||n[0].method;b=a.url||n[0].action;(b=(b="string"===typeof b?c.trim(b):"")||window.location.href||"")&&(b=(b.match(/^([^#]+)/)||[])[1]);a=c.extend(!0,{url:b,success:c.ajaxSettings.success,type:h||c.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},a);b={};this.trigger("form-pre-serialize",
+[this,a,b]);if(b.veto)return s("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(a.beforeSerialize&&!1===a.beforeSerialize(this,a))return s("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var m=a.traditional;void 0===m&&(m=c.ajaxSettings.traditional);var p=[],l,r=this.formToArray(a.semantic,p);a.data&&(a.extraData=a.data,l=c.param(a.data,m));if(a.beforeSubmit&&!1===a.beforeSubmit(r,this,a))return s("ajaxSubmit: submit aborted via beforeSubmit callback"),this;this.trigger("form-submit-validate",
+[r,this,a,b]);if(b.veto)return s("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;b=c.param(r,m);l&&(b=b?b+"&"+l:l);"GET"==a.type.toUpperCase()?(a.url+=(0<=a.url.indexOf("?")?"&":"?")+b,a.data=null):a.data=b;var w=[];a.resetForm&&w.push(function(){n.resetForm()});a.clearForm&&w.push(function(){n.clearForm(a.includeHidden)});if(!a.dataType&&a.target){var v=a.success||function(){};w.push(function(b){var d=a.replaceTarget?"replaceWith":"html";c(a.target)[d](b).each(v,arguments)})}else a.success&&
+w.push(a.success);a.success=function(b,c,d){for(var f=a.context||this,e=0,g=w.length;e<g;e++)w[e].apply(f,[b,c,d||n,n])};l=0<c("input:file:enabled[value]",this).length;b="multipart/form-data"==n[0].enctype||"multipart/form-data"==n[0].encoding;m=x&&z;s("fileAPI :"+m);!1!==a.iframe&&(a.iframe||(l||b)&&!m)?a.closeKeepAlive?c.get(a.closeKeepAlive,function(){f(r)}):f(r):a.jqxhr=(l||b)&&m?g(r):c.ajax(a);for(l=0;l<p.length;l++)p[l]=null;this.trigger("form-submit-notify",[this,a]);return this};c.fn.ajaxForm=
+function(a){a=a||{};a.delegation=a.delegation&&c.isFunction(c.fn.on);if(!a.delegation&&0===this.length){var d=this.selector,g=this.context;if(!c.isReady&&d)return s("DOM not ready, queuing ajaxForm"),c(function(){c(d,g).ajaxForm(a)}),this;s("terminating; zero elements found by selector"+(c.isReady?"":" (DOM not ready)"));return this}return a.delegation?(c(document).off("submit.form-plugin",this.selector,v).off("click.form-plugin",this.selector,y).on("submit.form-plugin",this.selector,a,v).on("click.form-plugin",
+this.selector,a,y),this):this.ajaxFormUnbind().bind("submit.form-plugin",a,v).bind("click.form-plugin",a,y)};c.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};c.fn.formToArray=function(a,d){var g=[];if(0===this.length)return g;var f=this[0],h=a?f.getElementsByTagName("*"):f.elements;if(!h||!h.length)return g;var b,n,m,p,l,r;b=0;for(r=h.length;b<r;b++)if(l=h[b],(m=l.name)&&!l.disabled)if(a&&f.clk&&"image"==l.type)f.clk==l&&(g.push({name:m,value:c(l).val(),type:l.type}),
+g.push({name:m+".x",value:f.clk_x},{name:m+".y",value:f.clk_y}));else if((p=c.fieldValue(l,!0))&&p.constructor==Array)for(d&&d.push(l),n=0,l=p.length;n<l;n++)g.push({name:m,value:p[n]});else if(x&&"file"==l.type)if(d&&d.push(l),p=l.files,p.length)for(n=0;n<p.length;n++)g.push({name:m,value:p[n],type:l.type});else g.push({name:m,value:"",type:l.type});else null!==p&&"undefined"!=typeof p&&(d&&d.push(l),g.push({name:m,value:p,type:l.type,required:l.required}));!a&&f.clk&&(h=c(f.clk),b=h[0],(m=b.name)&&
+!b.disabled&&"image"==b.type&&(g.push({name:m,value:h.val()}),g.push({name:m+".x",value:f.clk_x},{name:m+".y",value:f.clk_y})));return g};c.fn.formSerialize=function(a){return c.param(this.formToArray(a))};c.fn.fieldSerialize=function(a){var d=[];this.each(function(){var g=this.name;if(g){var f=c.fieldValue(this,a);if(f&&f.constructor==Array)for(var h=0,b=f.length;h<b;h++)d.push({name:g,value:f[h]});else null!==f&&"undefined"!=typeof f&&d.push({name:this.name,value:f})}});return c.param(d)};c.fn.fieldValue=
+function(a){for(var d=[],g=0,f=this.length;g<f;g++){var h=c.fieldValue(this[g],a);null===h||"undefined"==typeof h||h.constructor==Array&&!h.length||(h.constructor==Array?c.merge(d,h):d.push(h))}return d};c.fieldValue=function(a,d){var g=a.name,f=a.type,h=a.tagName.toLowerCase();void 0===d&&(d=!0);if(d&&(!g||a.disabled||"reset"==f||"button"==f||("checkbox"==f||"radio"==f)&&!a.checked||("submit"==f||"image"==f)&&a.form&&a.form.clk!=a||"select"==h&&-1==a.selectedIndex))return null;if("select"==h){var b=
+a.selectedIndex;if(0>b)return null;for(var g=[],h=a.options,n=(f="select-one"==f)?b+1:h.length,b=f?b:0;b<n;b++){var m=h[b];if(m.selected){var p=m.value;p||(p=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value);if(f)return p;g.push(p)}}return g}return c(a).val()};c.fn.clearForm=function(a){return this.each(function(){c("input,select,textarea",this).clearFields(a)})};c.fn.clearFields=c.fn.clearInputs=function(a){var d=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;
+return this.each(function(g,f){var h=this.type,b=this.tagName.toLowerCase();d.test(h)||"textarea"==b?this.value="":"checkbox"==h||"radio"==h?this.checked=!1:"file"==h?c(this).val("").val()&&(h=document.createElement("form"),b=this.parentNode)&&(h.style.display="none",b.insertBefore(h,this),h.appendChild(this),h.reset(),b.insertBefore(this,h),b.removeChild(h)):"select"==b?this.selectedIndex=-1:a&&(!0===a&&/hidden/.test(h)||"string"==typeof a&&c(this).is(a))&&(this.value="")})};c.fn.resetForm=function(){return this.each(function(){("function"==
+typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})};c.fn.enable=function(a){void 0===a&&(a=!0);return this.each(function(){this.disabled=!a})};c.fn.selected=function(a){void 0===a&&(a=!0);return this.each(function(){var d=this.type;"checkbox"==d||"radio"==d?this.checked=a:"option"==this.tagName.toLowerCase()&&(d=c(this).parent("select"),a&&d[0]&&"select-one"==d[0].type&&d.find("option").selected(!1),this.selected=a)})};c.fn.ajaxSubmit.debug=!1})(jQuery);
diff --git a/drupal7/sites/all/modules/views/handlers/views_handler_area_messages.inc b/drupal7/sites/all/modules/views/handlers/views_handler_area_messages.inc
new file mode 100644
index 00000000..eb1e22ae
--- /dev/null
+++ b/drupal7/sites/all/modules/views/handlers/views_handler_area_messages.inc
@@ -0,0 +1,34 @@
+<?php
+
+/**
+ * @file
+ * Contains views_handler_area_messages.
+ */
+
+/**
+ * Provides an area for messages.
+ */
+class views_handler_area_messages extends views_handler_area {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function option_definition() {
+    $options = parent::option_definition();
+    // Set the default to TRUE so it shows on empty pages by default.
+    $options['empty']['default'] = TRUE;
+    return $options;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function render($empty = FALSE) {
+    $return = '';
+    if (!$empty || !empty($this->options['empty'])) {
+      $return = theme('status_messages');
+    }
+    return $return;
+  }
+
+}
diff --git a/drupal7/sites/all/modules/views/handlers/views_handler_field_date.inc b/drupal7/sites/all/modules/views/handlers/views_handler_field_date.inc
index 8517f0b5..f2c63710 100644
--- a/drupal7/sites/all/modules/views/handlers/views_handler_field_date.inc
+++ b/drupal7/sites/all/modules/views/handlers/views_handler_field_date.inc
@@ -16,6 +16,8 @@ class views_handler_field_date extends views_handler_field {
 
     $options['date_format'] = array('default' => 'small');
     $options['custom_date_format'] = array('default' => '');
+    $options['second_date_format_custom'] = array('default' => '');
+    $options['second_date_format'] = array('default' => 'small');
     $options['timezone'] = array('default' => '');
 
     return $options;
@@ -36,6 +38,7 @@ class views_handler_field_date extends views_handler_field {
         'custom' => t('Custom'),
         'raw time ago' => t('Time ago'),
         'time ago' => t('Time ago (with "ago" appended)'),
+        'today time ago' => t('Time ago (with "ago" appended) for today\'s date, but not for other dates'),
         'raw time hence' => t('Time hence'),
         'time hence' => t('Time hence (with "hence" appended)'),
         'raw time span' => t('Time span (future dates have "-" prepended)'),
@@ -49,8 +52,39 @@ class views_handler_field_date extends views_handler_field {
       '#title' => t('Custom date format'),
       '#description' => t('If "Custom", see the <a href="@url" target="_blank">PHP manual</a> for date formats. Otherwise, enter the number of different time units to display, which defaults to 2.', array('@url' => 'http://php.net/manual/function.date.php')),
       '#default_value' => isset($this->options['custom_date_format']) ? $this->options['custom_date_format'] : '',
-      '#dependency' => array('edit-options-date-format' => array('custom', 'raw time ago', 'time ago', 'raw time hence', 'time hence', 'raw time span', 'time span', 'raw time span', 'inverse time span', 'time span')),
+      '#dependency' => array('edit-options-date-format' => array('custom', 'raw time ago', 'time ago', 'today time ago', 'raw time hence', 'time hence', 'raw time span', 'time span', 'raw time span', 'inverse time span', 'time span')),
     );
+    $form['second_date_format'] = array(
+     '#type' => 'select',
+     '#title' => t('Second date format'),
+     '#options' => $date_formats + array(
+       'custom' => t('Custom'),
+     ),
+     '#description' => t('The date format which will be used for rendering dates other than today.'),
+     '#default_value' => isset($this->options['second_date_format']) ? $this->options['second_date_format'] : 'small',
+     '#dependency' => array('edit-options-date-format' => array('today time ago')),
+   );
+   $form['second_date_format_custom'] = array(
+     '#type' => 'textfield',
+     '#title' => t('Custom date format of second date'),
+     '#description' => t('If "Custom" is selected in "Second date format", see the <a href="@url" target="_blank">PHP manual</a> for date formats. Otherwise, enter the number of different time units to display, which defaults to 2.', array('@url' => 'http://php.net/manual/function.date.php')),
+     '#default_value' => isset($this->options['second_date_format_custom']) ? $this->options['second_date_format_custom'] : '',
+     // We have to use states instead of ctools dependency because dependency
+     // doesn't handle multiple conditions.
+     '#states' => array(
+       'visible' => array(
+         '#edit-options-date-format' => array('value' => 'today time ago'),
+         '#edit-options-second-date-format' => array('value' => 'custom'),
+       ),
+     ),
+     // We have to use ctools dependency too because states doesn't add the
+     // correct left margin to the element's wrapper.
+     '#dependency' => array(
+       // This condition is handled by form API's states.
+//        'edit-options-date-format' => array('today time ago'),
+       'edit-options-second-date-format' => array('custom'),
+     ),
+   );
     $form['timezone'] = array(
       '#type' => 'select',
       '#title' => t('Timezone'),
@@ -66,7 +100,7 @@ class views_handler_field_date extends views_handler_field {
   function render($values) {
     $value = $this->get_value($values);
     $format = $this->options['date_format'];
-    if (in_array($format, array('custom', 'raw time ago', 'time ago', 'raw time hence', 'time hence', 'raw time span', 'time span', 'raw time span', 'inverse time span', 'time span'))) {
+    if (in_array($format, array('custom', 'raw time ago', 'time ago', 'today time ago', 'raw time hence', 'time hence', 'raw time span', 'time span', 'raw time span', 'inverse time span', 'time span'))) {
       $custom_format = $this->options['custom_date_format'];
     }
 
@@ -78,6 +112,21 @@ class views_handler_field_date extends views_handler_field {
           return format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2);
         case 'time ago':
           return t('%time ago', array('%time' => format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
+        case 'today time ago':
+          $second_format = $this->options['second_date_format'];
+          $second_custom_format = $this->options['second_date_format_custom'];
+          if (format_date(REQUEST_TIME, 'custom', 'Y-m-d', $timezone) == format_date($value, 'custom', 'Y-m-d', $timezone)) {
+            return t('%time ago', array('%time' => format_interval($time_diff, is_numeric($custom_format) ? $custom_format : 2)));
+          }
+          elseif ($second_format == 'custom') {
+            if ($second_custom_format == 'r') {
+              return format_date($value, $second_format, $second_custom_format, $timezone, 'en');
+            }
+            return format_date($value, $second_format, $second_custom_format, $timezone);
+          }
+          else {
+            return format_date($value, $this->options['second_date_format'], '', $timezone);
+          }
         case 'raw time hence':
           return format_interval(-$time_diff, is_numeric($custom_format) ? $custom_format : 2);
         case 'time hence':
diff --git a/drupal7/sites/all/modules/views/handlers/views_handler_filter.inc b/drupal7/sites/all/modules/views/handlers/views_handler_filter.inc
index f5db70f9..8583605b 100644
--- a/drupal7/sites/all/modules/views/handlers/views_handler_filter.inc
+++ b/drupal7/sites/all/modules/views/handlers/views_handler_filter.inc
@@ -91,7 +91,11 @@ class views_handler_filter extends views_handler {
     }
 
     if ($this->multiple_exposed_input()) {
-      $this->group_info = array_filter($options['group_info']['default_group_multiple']);
+      $this->group_info = NULL;
+      if (!empty($options['group_info']['default_group_multiple'])) {
+        $this->group_info = array_filter($options['group_info']['default_group_multiple']);
+      }
+
       $this->options['expose']['multiple'] = TRUE;
     }
 
@@ -116,6 +120,7 @@ class views_handler_filter extends views_handler {
         'label' => array('default' => '', 'translatable' => TRUE),
         'description' => array('default' => '', 'translatable' => TRUE),
         'use_operator' => array('default' => FALSE, 'bool' => TRUE),
+        'operator_label' => array('default' => '', 'translatable' => TRUE),
         'operator' => array('default' => ''),
         'identifier' => array('default' => ''),
         'required' => array('default' => FALSE, 'bool' => TRUE),
@@ -510,6 +515,16 @@ class views_handler_filter extends views_handler {
         '#description' => t('Allow the user to choose the operator.'),
         '#default_value' => !empty($this->options['expose']['use_operator']),
       );
+      $form['expose']['operator_label'] = array(
+        '#type' => 'textfield',
+        '#default_value' => $this->options['expose']['operator_label'],
+        '#title' => t('Operator label'),
+        '#size' => 40,
+        '#description' => t('This will appear before your operator select field.'),
+        '#dependency' => array(
+          'edit-options-expose-use-operator' => array(1)
+        ),
+      );
       $form['expose']['operator_id'] = array(
         '#type' => 'textfield',
         '#default_value' => $this->options['expose']['operator_id'],
@@ -754,10 +769,8 @@ class views_handler_filter extends views_handler {
       $operator = $this->options['expose']['operator_id'];
       $this->operator_form($form, $form_state);
       $form[$operator] = $form['operator'];
-
-      if (isset($form[$operator]['#title'])) {
-        unset($form[$operator]['#title']);
-      }
+      $form[$operator]['#title'] =  $this->options['expose']['operator_label'];
+      $form[$operator]['#title_display'] = 'invisible';
 
       $this->exposed_translate($form[$operator], 'operator');
 
diff --git a/drupal7/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc b/drupal7/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc
index b49dde94..080ac50a 100644
--- a/drupal7/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc
+++ b/drupal7/sites/all/modules/views/handlers/views_handler_filter_boolean_operator_string.inc
@@ -30,6 +30,6 @@ class views_handler_filter_boolean_operator_string extends views_handler_filter_
     else {
       $where .= "<> ''";
     }
-    $this->query->add_where($this->options['group'], $where);
+    $this->query->add_where_expression($this->options['group'], $where);
   }
 }
diff --git a/drupal7/sites/all/modules/views/handlers/views_handler_filter_fields_compare.inc b/drupal7/sites/all/modules/views/handlers/views_handler_filter_fields_compare.inc
new file mode 100644
index 00000000..fe94ce76
--- /dev/null
+++ b/drupal7/sites/all/modules/views/handlers/views_handler_filter_fields_compare.inc
@@ -0,0 +1,142 @@
+<?php
+
+/**
+ * @file
+ * Definition of views_handler_filter_fields_compare.
+ */
+
+/**
+ * A handler to filter a view using fields comparison.
+ *
+ * @ingroup views_filter_handlers
+ */
+
+class views_handler_filter_fields_compare extends views_handler_filter {
+
+  function can_expose() {
+    return FALSE;
+  }
+
+  /**
+   * Overrides views_handler_filter#option_definition().
+   */
+  function option_definition() {
+    $options = parent::option_definition();
+
+    $options['left_field'] = $options['right_field'] = array('default' => '');
+
+    return $options;
+  }
+
+  /**
+   * Provide a list of all operators.
+   */
+  function fields_operator_options() {
+    return array(
+      '<' => t('Is less than'),
+      '<=' => t('Is less than or equal to'),
+      '=' => t('Is equal to'),
+      '<>' =>  t('Is not equal to'),
+      '>=' => t('Is greater than or equal to'),
+      '>' => t('Is greater than')
+    );
+  }
+
+  /**
+   * Provide a list of available fields.
+   */
+  function field_options() {
+    $options = array();
+
+    $field_handlers = $this->view->display_handler->get_handlers('field');
+    foreach ($field_handlers as $field => $handler) {
+      if ($handler->table != 'views') {
+        $options[$field] = $handler->ui_name();
+      }
+    }
+
+    return $options;
+  }
+
+  /**
+   * Overrides views_handler_filter#options_form().
+   */
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+
+    $field_options = $this->field_options();
+
+    $form['left_field'] = array(
+      '#type' => 'select',
+      '#title' => t('Left field'),
+      '#default_value' => $this->options['left_field'],
+      '#options' => $field_options,
+      '#weight' => -3,
+    );
+
+    $form['operator'] = array(
+      '#type' => 'select',
+      '#title' => t('Operator'),
+      '#default_value' => $this->options['operator'],
+      '#options' => $this->fields_operator_options(),
+      '#weight' => -2,
+    );
+
+    $form['right_field'] = array(
+      '#type' => 'select',
+      '#title' => t('Right field'),
+      '#default_value' => $this->options['right_field'],
+      '#options' => $field_options,
+      '#weight' => -1,
+    );
+
+  }
+
+  /**
+   * Overrides views_handler_filter#query().
+   *
+   * Build extra condition from existing fields (from existing joins).
+   */
+  function query() {
+    $left = $this->options['left_field'];
+    $right = $this->options['right_field'];
+
+    // Get all existing field handlers.
+    $field_handlers = $this->view->display_handler->get_handlers('field');
+
+    // Make sure the selected fields still exist.
+    if (!isset($field_handlers[$left], $field_handlers[$right])) {
+      return;
+    }
+
+    // Get the left table and field.
+    $left_handler = $field_handlers[$left];
+    $left_handler->set_relationship();
+    $left_table_alias = $this->query->ensure_table($left_handler->table, $left_handler->relationship);
+
+    // Get the left table and field.
+    $right_handler = $field_handlers[$right];
+    $right_handler->set_relationship();
+    $right_table_alias = $this->query->ensure_table($right_handler->table, $right_handler->relationship);
+
+    // Build piece of SQL.
+    $snippet =
+      $left_table_alias . '.' . $left_handler->real_field .
+      ' ' . $this->options['operator'] . ' ' .
+      $right_table_alias . '.' . $right_handler->real_field;
+
+    $this->query->add_where_expression($this->options['group'], $snippet);
+  }
+
+  /**
+   * Overrides views_handler_filter#admin_summary().
+   */
+  function admin_summary() {
+    return check_plain(
+      $this->options['left_field'] . ' ' .
+      $this->options['operator'] . ' ' .
+      $this->options['right_field']
+    );
+  }
+
+}
diff --git a/drupal7/sites/all/modules/views/includes/admin.inc b/drupal7/sites/all/modules/views/includes/admin.inc
index 160a61a1..1f247bd0 100644
--- a/drupal7/sites/all/modules/views/includes/admin.inc
+++ b/drupal7/sites/all/modules/views/includes/admin.inc
@@ -408,7 +408,7 @@ function views_ui_add_form($form, &$form_state) {
  */
 function views_element_validate_integer($element, &$form_state) {
   $value = $element['#value'];
-  if ($value !== '' && (!is_numeric($value) || intval($value) != $value)) {
+  if ($value !== '' && (!is_numeric($value) || intval($value) != $value || abs($value) != $value)) {
     form_error($element, t('%name must be a positive integer.', array('%name' => $element['#title'])));
   }
 }
diff --git a/drupal7/sites/all/modules/views/includes/cache.inc b/drupal7/sites/all/modules/views/includes/cache.inc
index 59c1733d..b74752f1 100644
--- a/drupal7/sites/all/modules/views/includes/cache.inc
+++ b/drupal7/sites/all/modules/views/includes/cache.inc
@@ -23,16 +23,31 @@ function _views_fetch_data($table = NULL, $move = TRUE, $reset = FALSE) {
   if ($table) {
     if (!isset($cache[$table])) {
       $cid = 'views_data:' . $table;
-      $data = views_cache_get($cid, TRUE);
-      if (!empty($data->data)) {
+      if ($data = views_cache_get($cid, TRUE)) {
         $cache[$table] = $data->data;
       }
       else {
         if (!$fully_loaded) {
-          // No cache entry, rebuild.
-          $cache = _views_fetch_data_build();
+          // Try to load the full views cache.
+          if ($data = views_cache_get('views_data', TRUE)) {
+            $cache = $data->data;
+          }
+          else {
+            // No cache entry, rebuild.
+            $cache = _views_fetch_data_build();
+          }
           $fully_loaded = TRUE;
         }
+
+        // Write back a cache for this table.
+        if (isset($cache[$table])) {
+          views_cache_set($cid, $cache[$table], TRUE);
+        }
+        else {
+          // If there is still no information about that table, it is missing.
+          // Write an empty array to avoid repeated rebuilds.
+          views_cache_set($cid, array(), TRUE);
+        }
       }
     }
     if (isset($cache[$table])) {
@@ -82,11 +97,6 @@ function _views_fetch_data_build() {
 
   // Keep a record with all data.
   views_cache_set('views_data', $cache, TRUE);
-  // Save data in seperate cache entries.
-  foreach ($cache as $key => $data) {
-    $cid = 'views_data:' . $key;
-    views_cache_set($cid, $data, TRUE);
-  }
   return $cache;
 }
 
diff --git a/drupal7/sites/all/modules/views/includes/handlers.inc b/drupal7/sites/all/modules/views/includes/handlers.inc
index 2a33d5d5..43461331 100644
--- a/drupal7/sites/all/modules/views/includes/handlers.inc
+++ b/drupal7/sites/all/modules/views/includes/handlers.inc
@@ -1581,7 +1581,7 @@ class views_join {
             // With an array of values, we need multiple placeholders and the
             // 'IN' operator is implicit.
             foreach ($info['value'] as $value) {
-              $placeholder_i = ':views_join_condition_' . $select_query->nextPlaceholder();
+              $placeholder_i = $view_query->placeholder('views_join_condition_');
               $arguments[$placeholder_i] = $value;
             }
 
@@ -1591,10 +1591,9 @@ class views_join {
           else {
             // With a single value, the '=' operator is implicit.
             $operator = !empty($info['operator']) ? $info['operator'] : '=';
-            $placeholder = ':views_join_condition_' . $select_query->nextPlaceholder();
+            $placeholder = $view_query->placeholder('views_join_condition_');
             $arguments[$placeholder] = $info['value'];
           }
-
           $extras[] = "$join_table$info[field] $operator $placeholder";
         }
 
diff --git a/drupal7/sites/all/modules/views/includes/view.inc b/drupal7/sites/all/modules/views/includes/view.inc
index d8c0c1f5..d082a0b6 100644
--- a/drupal7/sites/all/modules/views/includes/view.inc
+++ b/drupal7/sites/all/modules/views/includes/view.inc
@@ -756,7 +756,7 @@ class view extends views_db_object {
    */
   function _init_handler($key, $info) {
     // Load the requested items from the display onto the object.
-    $this->$key = $this->display_handler->get_handlers($key);
+    $this->$key = &$this->display_handler->get_handlers($key);
 
     // This reference deals with difficult PHP indirection.
     $handlers = &$this->$key;
diff --git a/drupal7/sites/all/modules/views/js/ajax_view.js b/drupal7/sites/all/modules/views/js/ajax_view.js
index e3bc8213..780691c4 100644
--- a/drupal7/sites/all/modules/views/js/ajax_view.js
+++ b/drupal7/sites/all/modules/views/js/ajax_view.js
@@ -66,6 +66,11 @@ Drupal.views.ajaxView = function(settings) {
     // to a given element.
     .filter(jQuery.proxy(this.filterNestedViews, this))
     .once(jQuery.proxy(this.attachPagerAjax, this));
+
+  // Add a trigger to update this view specifically.
+  var self_settings = this.element_settings;
+  self_settings.event = 'RefreshView';
+  this.refreshViewAjax = new Drupal.ajax(this.selector, this.$view, self_settings);
 };
 
 Drupal.views.ajaxView.prototype.attachExposedFormAjax = function() {
diff --git a/drupal7/sites/all/modules/views/modules/field/views_handler_field_field.inc b/drupal7/sites/all/modules/views/modules/field/views_handler_field_field.inc
index b50a0aea..a91e13a0 100644
--- a/drupal7/sites/all/modules/views/modules/field/views_handler_field_field.inc
+++ b/drupal7/sites/all/modules/views/modules/field/views_handler_field_field.inc
@@ -820,7 +820,10 @@ class views_handler_field_field extends views_handler_field {
    * Return an array of items for the field.
    */
   function set_items($values, $row_id) {
-    if (empty($values->_field_data[$this->field_alias]) || empty($values->_field_data[$this->field_alias]['entity'])) {
+    // In some cases the instance on the entity might be easy, see
+    // https://drupal.org/node/1161708 and https://drupal.org/node/1461536 for
+    // more information.
+    if (empty($values->_field_data[$this->field_alias]) || empty($values->_field_data[$this->field_alias]['entity']) || !isset($values->_field_data[$this->field_alias]['entity']->{$this->definition['field_name']})) {
       return array();
     }
 
diff --git a/drupal7/sites/all/modules/views/modules/profile/views_handler_field_profile_date.inc b/drupal7/sites/all/modules/views/modules/profile/views_handler_field_profile_date.inc
index 2d9fe966..c2cf691b 100644
--- a/drupal7/sites/all/modules/views/modules/profile/views_handler_field_profile_date.inc
+++ b/drupal7/sites/all/modules/views/modules/profile/views_handler_field_profile_date.inc
@@ -51,20 +51,21 @@ class views_handler_field_profile_date extends views_handler_field_date {
 
     // But we *can* deal with non-year stuff:
     $date = gmmktime(0, 0, 0, $value['month'], $value['day'], $value['year']);
+
     $replace = array(
       // day
       'd' => sprintf('%02d', $value['day']),
       'D' => NULL,
       'l' => NULL,
       'N' => NULL,
-      'S' => date('S', $date),
+      'S' => gmdate('S', $date),
       'w' => NULL,
       'j' => $value['day'],
       // month
-      'F' => date('F', $date),
+      'F' => gmdate('F', $date),
       'm' => sprintf('%02d', $value['month']),
-      'M' => date('M', $date),
-      'n' => date('n', $date),
+      'M' => gmdate('M', $date),
+      'n' => gmdate('n', $date),
 
       'Y' => $value['year'],
       'y' => substr($value['year'], 2, 2),
diff --git a/drupal7/sites/all/modules/views/modules/system/views_handler_field_file_extension.inc b/drupal7/sites/all/modules/views/modules/system/views_handler_field_file_extension.inc
index 6f9a03fe..b543d8a2 100644
--- a/drupal7/sites/all/modules/views/modules/system/views_handler_field_file_extension.inc
+++ b/drupal7/sites/all/modules/views/modules/system/views_handler_field_file_extension.inc
@@ -10,10 +10,40 @@
  * @ingroup views_field_handlers
  */
 class views_handler_field_file_extension extends views_handler_field {
+  public function option_definition() {
+    $options = parent::option_definition();
+    $options['extension_detect_tar'] = array('default' => FALSE, 'bool' => TRUE);
+    return $options;
+  }
+
+  public function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+    $form['extension_detect_tar'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Detect if tar is part of the extension'),
+      '#description' => t("See if the previous extension is '.tar' and if so, add that, so we see 'tar.gz' or 'tar.bz2' instead of just 'gz'."),
+      '#default_value' => $this->options['extension_detect_tar'],
+    );
+  }
+
   function render($values) {
     $value = $this->get_value($values);
-    if (preg_match('/\.([^\.]+)$/', $value, $match)) {
-      return $this->sanitize_value($match[1]);
+    if (!$this->options['extension_detect_tar']) {
+      if (preg_match('/\.([^\.]+)$/', $value, $match)) {
+        return $this->sanitize_value($match[1]);
+      }
+    }
+    else {
+      $file_parts = explode('.', basename($value));
+      // If there is an extension.
+      if (count($file_parts) > 1) {
+        $extension = array_pop($file_parts);
+        $last_part_in_name = array_pop($file_parts);
+        if ($last_part_in_name === 'tar') {
+          $extension = 'tar.' . $extension;
+        }
+        return $this->sanitize_value($extension);
+      }
     }
   }
 }
diff --git a/drupal7/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc b/drupal7/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
index 7eb868f7..8938ca9f 100644
--- a/drupal7/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
+++ b/drupal7/sites/all/modules/views/modules/taxonomy/views_handler_filter_term_node_tid.inc
@@ -98,15 +98,12 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
     if ($this->options['type'] == 'textfield') {
       $default = '';
       if ($this->value) {
-        $result = db_select('taxonomy_term_data', 'td')
-          ->fields('td')
-          ->condition('td.tid', $this->value)
-          ->execute();
-        foreach ($result as $term) {
+        $result = taxonomy_term_load_multiple($this->value);
+        foreach ($result as $entity_term) {
           if ($default) {
             $default .= ', ';
           }
-          $default .= $term->name;
+          $default .= entity_label('taxonomy_term', $entity_term);
         }
       }
 
@@ -122,13 +119,14 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
     }
     else {
       if (!empty($this->options['hierarchy']) && $this->options['limit']) {
-        $tree = taxonomy_get_tree($vocabulary->vid);
+        $tree = taxonomy_get_tree($vocabulary->vid, 0, NULL, TRUE);
         $options = array();
 
         if ($tree) {
+          // Translation system needs full entity objects, so we have access to label.
           foreach ($tree as $term) {
             $choice = new stdClass();
-            $choice->option = array($term->tid => str_repeat('-', $term->depth) . $term->name);
+            $choice->option = array($term->tid => str_repeat('-', $term->depth) . entity_label('taxonomy_term', $term));
             $options[] = $choice;
           }
         }
@@ -147,8 +145,14 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
           $query->condition('tv.machine_name', $vocabulary->machine_name);
         }
         $result = $query->execute();
+
+        $tids = array();
         foreach ($result as $term) {
-          $options[$term->tid] = $term->name;
+          $tids[] = $term->tid;
+        }
+        $entities = taxonomy_term_load_multiple($tids);
+        foreach ($entities as $entity_term) {
+          $options[$entity_term->tid] = entity_label('taxonomy_term', $entity_term);
         }
       }
 
@@ -238,7 +242,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
     $rc = parent::accept_exposed_input($input);
     if ($rc) {
       // If we have previously validated input, override.
-      if (isset($this->validated_exposed_input)) {
+      if (!$this->is_a_group() && isset($this->validated_exposed_input)) {
         $this->value = $this->validated_exposed_input;
       }
     }
@@ -347,12 +351,9 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
 
     if ($this->value) {
       $this->value = array_filter($this->value);
-      $result = db_select('taxonomy_term_data', 'td')
-        ->fields('td')
-        ->condition('td.tid', $this->value)
-        ->execute();
-      foreach ($result as $term) {
-        $this->value_options[$term->tid] = $term->name;
+      $result = taxonomy_term_load_multiple($this->value);
+      foreach ($result as $entity_term) {
+        $this->value_options[$entity_term->tid] = entity_label('taxonomy_term', $entity_term);
       }
     }
     return parent::admin_summary();
diff --git a/drupal7/sites/all/modules/views/modules/taxonomy/views_handler_relationship_node_term_data.inc b/drupal7/sites/all/modules/views/modules/taxonomy/views_handler_relationship_node_term_data.inc
index d7fbb4c9..cf722883 100644
--- a/drupal7/sites/all/modules/views/modules/taxonomy/views_handler_relationship_node_term_data.inc
+++ b/drupal7/sites/all/modules/views/modules/taxonomy/views_handler_relationship_node_term_data.inc
@@ -75,7 +75,9 @@ class views_handler_relationship_node_term_data extends views_handler_relationsh
       $query->addJoin($def['type'], 'taxonomy_vocabulary', 'tv', 'td.vid = tv.vid');
       $query->addJoin($def['type'], 'taxonomy_index', 'tn', 'tn.tid = td.tid');
       $query->condition('tv.machine_name', array_filter($this->options['vocabularies']));
-      $query->addTag('term_access');
+      if (empty($this->query->options['disable_sql_rewrite'])) {
+        $query->addTag('term_access');
+      }
       $query->fields('td');
       $query->fields('tn', array('nid'));
       $def['table formula'] = $query;
diff --git a/drupal7/sites/all/modules/views/modules/user/views_handler_field_user_link_cancel.inc b/drupal7/sites/all/modules/views/modules/user/views_handler_field_user_link_cancel.inc
index 9129c017..fe038dad 100644
--- a/drupal7/sites/all/modules/views/modules/user/views_handler_field_user_link_cancel.inc
+++ b/drupal7/sites/all/modules/views/modules/user/views_handler_field_user_link_cancel.inc
@@ -22,7 +22,7 @@ class views_handler_field_user_link_cancel extends views_handler_field_user_link
     if ($uid && user_cancel_access($account)) {
       $this->options['alter']['make_link'] = TRUE;
 
-      $text = !empty($this->options['text']) ? $this->options['text'] : t('cancel');
+      $text = !empty($this->options['text']) ? $this->options['text'] : t('Cancel account');
 
       $this->options['alter']['path'] = "user/$uid/cancel";
       $this->options['alter']['query'] = drupal_get_destination();
diff --git a/drupal7/sites/all/modules/views/modules/views.views.inc b/drupal7/sites/all/modules/views/modules/views.views.inc
index 2029aa8b..7c3f4db9 100644
--- a/drupal7/sites/all/modules/views/modules/views.views.inc
+++ b/drupal7/sites/all/modules/views/modules/views.views.inc
@@ -81,6 +81,14 @@ function views_views_data() {
     ),
   );
 
+  $data['views']['messages'] = array(
+    'title' => t('Messages'),
+    'help' => t('Displays messages in the area.'),
+    'area' => array(
+      'handler' => 'views_handler_area_messages',
+    ),
+  );
+
   if (module_exists('contextual')) {
     $data['views']['contextual_links'] = array(
       'title' => t('Contextual Links'),
@@ -110,5 +118,14 @@ function views_views_data() {
     );
   }
 
+  $data['views']['fields_compare'] = array(
+    'title' => t('Fields comparison'),
+    'help' => t('Compare database fields against eachother.'),
+    'filter' => array(
+      'help' => t('Use fields comparison to filter the result of the view.'),
+      'handler' => 'views_handler_filter_fields_compare',
+    )
+  );
+
   return $data;
 }
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_cache.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_cache.inc
index 4d21701f..81f71bfb 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_cache.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_cache.inc
@@ -200,25 +200,28 @@ class views_plugin_cache extends views_plugin {
       $this->storage['head'] = '';
     }
 
+    // Check if the advanced mapping function of D 7.23 is available.
+    $array_mapping_func = function_exists('drupal_array_diff_assoc_recursive') ? 'drupal_array_diff_assoc_recursive' : 'array_diff_assoc';
+
     // Slightly less simple for CSS:
     $css = drupal_add_css();
     $css_start = isset($this->storage['css']) ? $this->storage['css'] : array();
-    $this->storage['css'] = array_diff_assoc($css, $css_start);
+    $this->storage['css'] = $array_mapping_func($css, $css_start);
 
     // Get javascript after/before views renders.
     $js = drupal_add_js();
     $js_start = isset($this->storage['js']) ? $this->storage['js'] : array();
     // If there are any differences between the old and the new javascript then
     // store them to be added later.
-    $this->storage['js'] = array_diff_assoc($js, $js_start);
+    $this->storage['js'] = $array_mapping_func($js, $js_start);
 
     // Special case the settings key and get the difference of the data.
     $settings = isset($js['settings']['data']) ? $js['settings']['data'] : array();
     $settings_start = isset($js_start['settings']['data']) ? $js_start['settings']['data'] : array();
-    $this->storage['js']['settings'] = array_diff_assoc($settings, $settings_start);
+    $this->storage['js']['settings'] = $array_mapping_func($settings, $settings_start);
 
     // Get difference of HTTP headers.
-    $this->storage['headers'] = array_diff_assoc(drupal_get_http_header(), $this->storage['headers']);
+    $this->storage['headers'] = $array_mapping_func(drupal_get_http_header(), $this->storage['headers']);
   }
 
   /**
@@ -253,59 +256,61 @@ class views_plugin_cache extends views_plugin {
   }
 
   function get_results_key() {
-    global $user;
-
     if (!isset($this->_results_key)) {
-
-      $build_info = $this->view->build_info;
-
-      $query_plugin = $this->view->display_handler->get_plugin('query');
-
-      foreach (array('query','count_query') as $index) {
-        // If the default query back-end is used generate SQL query strings from
-        // the query objects.
-        if ($build_info[$index] instanceof SelectQueryInterface) {
-          $query = clone $build_info[$index];
-          $query->preExecute();
-          $build_info[$index] = (string) $query;
-        }
-      }
-      $key_data = array(
-        'build_info' => $build_info,
-        'roles' => array_keys($user->roles),
-        'super-user' => $user->uid == 1, // special caching for super user.
-        'language' => $GLOBALS['language']->language,
-        'base_url' => $GLOBALS['base_url'],
-      );
-      foreach (array('exposed_info', 'page', 'sort', 'order', 'items_per_page', 'offset') as $key) {
-        if (isset($_GET[$key])) {
-          $key_data[$key] = $_GET[$key];
-        }
-      }
-
-      $this->_results_key = $this->view->name . ':' . $this->display->id . ':results:' . md5(serialize($key_data));
+      $this->_results_key = $this->view->name . ':' . $this->display->id . ':results:' . $this->get_cache_key();
     }
 
     return $this->_results_key;
   }
 
   function get_output_key() {
-    global $user;
     if (!isset($this->_output_key)) {
       $key_data = array(
-        'result' => $this->view->result,
-        'roles' => array_keys($user->roles),
-        'super-user' => $user->uid == 1, // special caching for super user.
         'theme' => $GLOBALS['theme'],
-        'language' => $GLOBALS['language']->language,
-        'base_url' => $GLOBALS['base_url'],
       );
-
-      $this->_output_key = $this->view->name . ':' . $this->display->id . ':output:' . md5(serialize($key_data));
+      $this->_output_key = $this->view->name . ':' . $this->display->id . ':output:' . $this->get_cache_key($key_data);
     }
 
     return $this->_output_key;
   }
+
+  /**
+   * Returns cache key.
+   *
+   * @param array $key_data
+   *   Additional data for cache segmentation and/or overrides for default
+   *   segmentation.
+   *
+   * @return string
+   */
+  function get_cache_key($key_data = array()) {
+    global $user;
+
+    $key_data += array(
+      'roles' => array_keys($user->roles),
+      'super-user' => $user->uid == 1, // special caching for super user.
+      'language' => $GLOBALS['language']->language,
+      'base_url' => $GLOBALS['base_url'],
+    );
+
+    if (empty($key_data['build_info'])) {
+      $build_info = $this->view->build_info;
+      foreach (array('query','count_query') as $index) {
+        // If the default query back-end is used generate SQL query strings from
+        // the query objects.
+        if ($build_info[$index] instanceof SelectQueryInterface) {
+          $query = clone $build_info[$index];
+          $query->preExecute();
+          $key_data['build_info'][$index] = array(
+            'sql' => (string) $query,
+            'arguments' => $query->getArguments(),
+          );
+        }
+      }
+    }
+    $key = md5(serialize($key_data));
+    return $key;
+  }
 }
 
 /**
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_display.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_display.inc
index 75a32c51..db124de0 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_display.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_display.inc
@@ -918,7 +918,7 @@ class views_plugin_display extends views_plugin {
   /**
    * Get a full array of handlers for $type. This caches them.
    */
-  function get_handlers($type) {
+  function &get_handlers($type) {
     if (!isset($this->handlers[$type])) {
       $this->handlers[$type] = array();
       $types = views_object_types();
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_display_feed.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_display_feed.inc
index bfd220c5..5eb68e32 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_display_feed.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_display_feed.inc
@@ -37,7 +37,7 @@ class views_plugin_display_feed extends views_plugin_display_page {
   function execute() {
     $output = $this->view->render();
     if (empty($output)) {
-      return drupal_not_found();
+      return MENU_NOT_FOUND;
     }
     print $output;
   }
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_display_page.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_display_page.inc
index 7ca4bf7f..4bcec0bc 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_display_page.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_display_page.inc
@@ -216,11 +216,11 @@ class views_plugin_display_page extends views_plugin_display {
     // display, and arguments should be set on the view.
     $this->view->build();
     if (!empty($this->view->build_info['fail'])) {
-      return drupal_not_found();
+      return MENU_NOT_FOUND;
     }
 
     if (!empty($this->view->build_info['denied'])) {
-      return drupal_access_denied();
+      return MENU_ACCESS_DENIED;
     }
 
     $this->view->get_breadcrumb(TRUE);
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_exposed_form.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
index 343eee81..5d546004 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_exposed_form.inc
@@ -173,7 +173,7 @@ class views_plugin_exposed_form extends views_plugin {
     $view = $this->view;
     $exposed_data = isset($view->exposed_data) ? $view->exposed_data : array();
     $sort_by = isset($exposed_data['sort_by']) ? $exposed_data['sort_by'] : NULL;
-    if (!empty($sort_by)) {
+    if (!empty($sort_by) && $this->view->style_plugin->build_sort()) {
       // Make sure the original order of sorts is preserved
       // (e.g. a sticky sort is often first)
       if (isset($view->sort[$sort_by])) {
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc
index 4f2c2d2a..ca97674e 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_exposed_form_input_required.inc
@@ -71,6 +71,7 @@ class views_plugin_exposed_form_input_required extends views_plugin_exposed_form
         'group_type' => 'group',
         'content' => $this->options['text_input_required'],
         'format' => $this->options['text_input_required_format'],
+        'empty' => TRUE,
       );
       $handler = views_get_handler('views', 'area', 'area');
       $handler->init($this->view, $options);
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_pager.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_pager.inc
index 416d6625..312f54b9 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_pager.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_pager.inc
@@ -107,7 +107,7 @@ class views_plugin_pager extends views_plugin {
    * Get the pager id, if it exists
    */
   function get_pager_id() {
-    return isset($this->options['id']) ? $this->options['id'] : 0;
+    return !empty($this->options['id']) ? $this->options['id'] : 0;
   }
 
   /**
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_pager_full.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_pager_full.inc
index d4c22038..aedb2237 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_pager_full.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_pager_full.inc
@@ -276,7 +276,7 @@ class views_plugin_pager_full extends views_plugin_pager {
     );
     $output = theme($pager_theme, array(
       'tags' => $tags,
-      'element' => $this->options['id'],
+      'element' => $this->get_pager_id(),
       'parameters' => $input,
       'quantity' => $this->options['quantity'],
     ));
@@ -308,11 +308,12 @@ class views_plugin_pager_full extends views_plugin_pager {
     // array hasn't been initialized before.
     $page = isset($_GET['page']) ? explode(',', $_GET['page']) : array();
 
-    for ($i = 0; $i <= $this->options['id'] || $i < count($pager_page_array); $i++) {
+    $pager_id = $this->get_pager_id();
+    for ($i = 0; $i <= $pager_id || $i < count($pager_page_array); $i++) {
       $pager_page_array[$i] = empty($page[$i]) ? 0 : $page[$i];
     }
 
-    $this->current_page = intval($pager_page_array[$this->options['id']]);
+    $this->current_page = intval($pager_page_array[$pager_id]);
 
     if ($this->current_page < 0) {
       $this->current_page = 0;
@@ -348,24 +349,25 @@ class views_plugin_pager_full extends views_plugin_pager {
       // Dump information about what we already know into the globals.
       global $pager_page_array, $pager_total, $pager_total_items, $pager_limits;
       // Set the limit.
-      $pager_limits[$this->options['id']] = $this->options['items_per_page'];
+      $pager_id = $this->get_pager_id();
+      $pager_limits[$pager_id] = $this->options['items_per_page'];
       // Set the item count for the pager.
-      $pager_total_items[$this->options['id']] = $this->total_items;
+      $pager_total_items[$pager_id] = $this->total_items;
       // Calculate and set the count of available pages.
-      $pager_total[$this->options['id']] = $this->get_pager_total();
+      $pager_total[$pager_id] = $this->get_pager_total();
 
       // See if the requested page was within range:
       if ($this->current_page < 0) {
         $this->current_page = 0;
       }
-      else if ($this->current_page >= $pager_total[$this->options['id']]) {
+      else if ($this->current_page >= $pager_total[$pager_id]) {
         // Pages are numbered from 0 so if there are 10 pages, the last page is 9.
-        $this->current_page = $pager_total[$this->options['id']] - 1;
+        $this->current_page = $pager_total[$pager_id] - 1;
       }
 
       // Put this number in to guarantee that we do not generate notices when the pager
       // goes to look for it later.
-      $pager_page_array[$this->options['id']] = $this->current_page;
+      $pager_page_array[$pager_id] = $this->current_page;
     }
   }
 
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_pager_mini.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
index bec48c89..87d55410 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_pager_mini.inc
@@ -63,7 +63,7 @@ class views_plugin_pager_mini extends views_plugin_pager_full {
     );
     return theme($pager_theme, array(
       'tags' => $tags,
-      'element' => $this->options['id'],
+      'element' => $this->get_pager_id(),
       'parameters' => $input,
     ));
   }
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_query_default.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_query_default.inc
index 030c5ea0..8a15e8dc 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_query_default.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_query_default.inc
@@ -1365,6 +1365,16 @@ class views_plugin_query_default extends views_plugin_query {
     // Add all query substitutions as metadata.
     $query->addMetaData('views_substitutions', module_invoke_all('views_query_substitutions', $this));
 
+    if (!$get_count) {
+      if (!empty($this->limit) || !empty($this->offset)) {
+        // We can't have an offset without a limit, so provide a very large limit
+        // instead.
+        $limit  = intval(!empty($this->limit) ? $this->limit : 999999);
+        $offset = intval(!empty($this->offset) ? $this->offset : 0);
+        $query->range($offset, $limit);
+      }
+    }
+
     return $query;
   }
 
@@ -1469,16 +1479,8 @@ class views_plugin_query_default extends views_plugin_query {
           $this->pager->execute_count_query($count_query);
         }
 
-        // Let the pager modify the query to add limits.
         $this->pager->pre_execute($query);
 
-        if (!empty($this->limit) || !empty($this->offset)) {
-          // We can't have an offset without a limit, so provide a very large limit instead.
-          $limit  = intval(!empty($this->limit) ? $this->limit : 999999);
-          $offset = intval(!empty($this->offset) ? $this->offset : 0);
-          $query->range($offset, $limit);
-        }
-
         $result = $query->execute();
 
         $view->result = array();
diff --git a/drupal7/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc b/drupal7/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
index 16b0aef7..1de90f79 100644
--- a/drupal7/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
+++ b/drupal7/sites/all/modules/views/plugins/views_plugin_style_jump_menu.inc
@@ -142,8 +142,17 @@ class views_plugin_style_jump_menu extends views_plugin_style {
     unset($this->view->row_index);
 
     $default_value = '';
-    if ($this->options['default_value'] && !empty($paths[url($_GET['q'])])) {
-      $default_value = $paths[url($_GET['q'])];
+    if ($this->options['default_value']) {
+      $lookup_options = array();
+      // We need to check if the path is absolute
+      // or else language is not taken in account.
+      if ($this->view->display[$this->view->current_display]->display_options['fields'][$this->options['path']]['absolute']) {
+        $lookup_options['absolute'] = TRUE;
+      }
+      $lookup_url = url($_GET['q'], $lookup_options);
+      if (!empty($paths[$lookup_url])) {
+        $default_value = $paths[$lookup_url];
+      }
     }
 
     ctools_include('jump-menu');
diff --git a/drupal7/sites/all/modules/views/tests/handlers/views_handler_field_date.test b/drupal7/sites/all/modules/views/tests/handlers/views_handler_field_date.test
index 028b687f..79441429 100644
--- a/drupal7/sites/all/modules/views/tests/handlers/views_handler_field_date.test
+++ b/drupal7/sites/all/modules/views/tests/handlers/views_handler_field_date.test
@@ -34,6 +34,8 @@ class ViewsHandlerFieldDateTest extends ViewsSqlTest {
         'relationship' => 'none',
         // c is iso 8601 date format @see http://php.net/manual/en/function.date.php
         'custom_date_format' => 'c',
+        'second_date_format' => 'custom',
+        'second_date_format_custom' => 'c',
       ),
     ));
     $time = gmmktime(0, 0, 0, 1, 1, 2000);
@@ -51,6 +53,8 @@ class ViewsHandlerFieldDateTest extends ViewsSqlTest {
         'medium' => format_date($time, 'medium', '', $timezone),
         'large' => format_date($time, 'large', '', $timezone),
         'custom' => format_date($time, 'custom', 'c', $timezone),
+        'today time ago custom' => format_date($time, 'custom', 'c', $timezone),
+        'today time ago' => t('%time ago', array('%time' => format_interval(120, 2))),
       );
       $this->assertRenderedDatesEqual($view, $dates, $timezone);
     }
@@ -67,6 +71,17 @@ class ViewsHandlerFieldDateTest extends ViewsSqlTest {
 
   protected function assertRenderedDatesEqual($view, $map, $timezone = NULL) {
     foreach ($map as $date_format => $expected_result) {
+      $check_result_number = 0;
+
+      // If it's "today time ago" format we have to check the 6th element.
+      if ($date_format == 'today time ago') {
+        $check_result_number = 5;
+      }
+
+      // Correct the date format.
+      if ($date_format == 'today time ago custom') {
+        $date_format = 'today time ago';
+      }
       $view->field['created']->options['date_format'] = $date_format;
       $t_args = array(
         '%value' => $expected_result,
@@ -80,8 +95,23 @@ class ViewsHandlerFieldDateTest extends ViewsSqlTest {
       else {
         $message = t('Value %value in %format format matches.', $t_args);
       }
-      $actual_result = $view->field['created']->advanced_render($view->result[0]);
+      $actual_result = $view->field['created']->advanced_render($view->result[$check_result_number]);
       $this->assertEqual($expected_result, $actual_result, $message);
     }
   }
+
+  /**
+   * Appends dataSet() with a data row for "today time ago" format testing.
+   */
+  protected function dataSet() {
+    $data = parent::dataSet();
+    $data[] = array(
+      'name' => 'David',
+      'age' => 25,
+      'job' => 'Singer',
+      'created' => REQUEST_TIME - 120,
+    );
+
+    return $data;
+  }
 }
diff --git a/drupal7/sites/all/modules/views/tests/handlers/views_handler_field_file_extension.test b/drupal7/sites/all/modules/views/tests/handlers/views_handler_field_file_extension.test
new file mode 100644
index 00000000..ab8b0a93
--- /dev/null
+++ b/drupal7/sites/all/modules/views/tests/handlers/views_handler_field_file_extension.test
@@ -0,0 +1,66 @@
+<?php
+
+/**
+ * @file
+ * Definition of ViewsHandlerFileExtensionTest.
+ */
+
+/**
+ * Tests the views_handler_field_file_extension handler.
+ */
+class ViewsHandlerFileExtensionTest extends ViewsSqlTest {
+  public static function getInfo() {
+    return array(
+      'name' => 'Field: File extension',
+      'description' => 'Test the views_handler_field_file_extension handler.',
+      'group' => 'Views Handlers',
+    );
+  }
+
+  function dataSet() {
+    $data = parent::dataSet();
+    $data[0]['name'] = 'file.png';
+    $data[1]['name'] = 'file.tar';
+    $data[2]['name'] = 'file.tar.gz';
+    $data[3]['name'] = 'file';
+
+    return $data;
+  }
+
+  function viewsData() {
+    $data = parent::viewsData();
+    $data['views_test']['name']['field']['handler'] = 'views_handler_field_file_extension';
+    $data['views_test']['name']['real field'] = 'name';
+
+    return $data;
+  }
+
+  /**
+   * Tests the 'extension_detect_tar' handler option.
+   */
+  public function testFileExtensionTarOption() {
+    $view = $this->getBasicView();
+
+    $view->display['default']->handler->override_option('fields', array(
+      'name' => array(
+        'id' => 'name',
+        'table' => 'views_test',
+        'field' => 'name',
+      ),
+    ));
+
+    $this->executeView($view);
+
+    // Test without the tar option.
+    $this->assertEqual($view->field['name']->advanced_render($view->result[0]), 'png');
+    $this->assertEqual($view->field['name']->advanced_render($view->result[1]), 'tar');
+    $this->assertEqual($view->field['name']->advanced_render($view->result[2]), 'gz');
+    $this->assertEqual($view->field['name']->advanced_render($view->result[3]), '');
+    // Test with the tar option.
+    $view->field['name']->options['extension_detect_tar'] = TRUE;
+    $this->assertEqual($view->field['name']->advanced_render($view->result[0]), 'png');
+    $this->assertEqual($view->field['name']->advanced_render($view->result[1]), 'tar');
+    $this->assertEqual($view->field['name']->advanced_render($view->result[2]), 'tar.gz');
+    $this->assertEqual($view->field['name']->advanced_render($view->result[3]), '');
+  }
+}
diff --git a/drupal7/sites/all/modules/views/tests/handlers/views_handlers.test b/drupal7/sites/all/modules/views/tests/handlers/views_handlers.test
new file mode 100644
index 00000000..f2faee3f
--- /dev/null
+++ b/drupal7/sites/all/modules/views/tests/handlers/views_handlers.test
@@ -0,0 +1,81 @@
+<?php
+
+/**
+ * @file
+ * Contains ViewsHandlerTest.
+ */
+
+/**
+ * Tests generic handler functionality.
+ *
+ * @see view
+ */
+class ViewsHandlerTest extends ViewsSqlTest {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Handlers',
+      'description' => 'Tests generic handler functionality.',
+      'group' => 'Views Handlers',
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function viewsData() {
+    $views_data = parent::viewsData();
+    $views_data['views']['test_access'] = array(
+      'title' => 'test access',
+      'help' => '',
+      'area' => array(
+        'handler' => 'views_test_area_access',
+      ),
+    );
+
+    return $views_data;
+  }
+
+  /**
+   * Tests access for handlers using an area handler.
+   */
+  public function testHandlerAccess() {
+    $view = $this->getBasicView();
+
+    // add a test area
+    $view->display['default']->handler->override_option('header', array(
+      'test_access' => array(
+        'id' => 'test_access',
+        'table' => 'views',
+        'field' => 'test_access',
+        'custom_access' => FALSE,
+      ),
+    ));
+
+    $view->init_display();
+    $view->init_handlers();
+    $handlers = $view->display_handler->get_handlers('header');
+    $this->assertEqual(0, count($handlers));
+
+    $view->destroy();
+
+    $view = $this->getBasicView();
+
+    // add a test area
+    $view->display['default']->handler->override_option('header', array(
+      'test_access' => array(
+        'id' => 'test_access',
+        'table' => 'views',
+        'field' => 'test_access',
+        'custom_access' => TRUE,
+      ),
+    ));
+
+    $view->init_display();
+    $view->init_handlers();
+    $handlers = $view->display_handler->get_handlers('header');
+    $this->assertEqual(1, count($handlers));
+    $this->assertTrue(isset($handlers['test_access']));
+  }
+
+}
diff --git a/drupal7/sites/all/modules/views/tests/test_handlers/views_test_area_access.inc b/drupal7/sites/all/modules/views/tests/test_handlers/views_test_area_access.inc
new file mode 100644
index 00000000..57a0014e
--- /dev/null
+++ b/drupal7/sites/all/modules/views/tests/test_handlers/views_test_area_access.inc
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @file
+ * Contains views_test_area_access
+ */
+
+class views_test_area_access extends views_handler_area {
+
+  /**
+   * {@inheritdoc}
+   */
+  function access() {
+    return $this->options['custom_access'];
+ }
+
+  /**
+   * {@inheritdoc}
+   */
+  function option_definition() {
+    $options = parent::option_definition();
+
+    $options['custom_access'] = array('default' => TRUE, 'bool' => TRUE);
+
+    return $options;
+  }
+
+}
diff --git a/drupal7/sites/all/modules/views/tests/views_cache.test b/drupal7/sites/all/modules/views/tests/views_cache.test
index 31037623..28534a2f 100644
--- a/drupal7/sites/all/modules/views/tests/views_cache.test
+++ b/drupal7/sites/all/modules/views/tests/views_cache.test
@@ -241,4 +241,68 @@ class ViewsCacheTest extends ViewsSqlTest {
     $this->assertEqual($first_content_type, $second_content_type, t('Content types of responses are equal.'));
   }
 
+  /**
+   * Test caching of different exposed filter values with the same view result.
+   *
+   * Make sure the output is different.
+   */
+  function testExposedFilterSameResultsCaching() {
+    // Create the view with time-based cache with hour lifetimes and add exposed
+    // filter to it with "Starts with" operator.
+    $view = $this->getBasicView();
+    $view->set_display();
+    $view->display_handler->override_option('cache', array(
+      'type' => 'time',
+      'results_lifespan' => '3600',
+      'output_lifespan' => '3600',
+    ));
+    $view->display_handler->override_option('filters', array(
+      'name' => array(
+        'id' => 'name',
+        'table' => 'views_test',
+        'field' => 'name',
+        'relationship' => 'none',
+        'operator' => 'starts',
+        'exposed' => TRUE,
+        'expose' => array(
+          'operator_id' => 'name_op',
+          'operator' => 'name_op',
+          'identifier' => 'name',
+        ),
+      ),
+    ));
+
+    // Clone the view before setting exposed input.
+    $clone = $view->copy();
+
+    // Pass "Rin" to the exposed filter and check that only one row returned.
+    $view->set_exposed_input(array(
+      'name' => 'Rin',
+    ));
+    $this->executeView($view);
+    $first_result = $view->result;
+    $first_output = $view->render();
+    $this->assertEqual(1, count($first_result), t('The number of rows returned by the first view match.'));
+
+    // Pass full "Ringo" to the exposed filter at the second time and make sure
+    // results are the same.
+    $clone->set_exposed_input(array(
+      'name' => 'Ringo',
+    ));
+    $this->executeView($clone);
+    $second_result = $clone->result;
+    $second_output = $clone->render();
+    $this->assertEqual($first_result, $second_result, t('Results of both views are the same.'));
+
+    // Check that output is not the same and it contains full "Ringo" word in
+    // default value of exposed input.
+    $this->assertNotEqual($first_output, $second_output, t('Output of the second view is different.'));
+    $this->drupalSetContent($second_output);
+    $element = $this->xpath('//input[@name="name" and @value="Ringo"]');
+    $this->assertTrue(!empty($element), t('Input field of exposed filter has the second value.'));
+
+    $view->destroy();
+    $clone->destroy();
+  }
+
 }
diff --git a/drupal7/sites/all/modules/views/tests/views_module.test b/drupal7/sites/all/modules/views/tests/views_module.test
index dc6c1640..6a27443a 100644
--- a/drupal7/sites/all/modules/views/tests/views_module.test
+++ b/drupal7/sites/all/modules/views/tests/views_module.test
@@ -151,6 +151,51 @@ class ViewsModuleTest extends ViewsSqlTest {
     $this->assertEqual('views_handler_filter', get_class($handler));
   }
 
+  /**
+   * Tests views_fetch_data().
+   */
+  function testFetchData() {
+
+    // Make sure we start with a empty cache.
+    $this->resetStaticViewsDataCache();
+    cache_clear_all('*', 'cache_views', TRUE);
+    variable_set('views_test_views_data_count', 0);
+
+    // Request info about an existing table.
+    $this->assertTrue(views_fetch_data('views_test'), 'Data about existing table returned');
+    // This should have triggered a views data rebuild, and written a cache
+    // entry for all tables and the requested table but no other tables.
+    $this->assertEqual(variable_get('views_test_views_data_count', 0), 1, 'Views data rebuilt once');
+    $this->assertTrue(cache_get('views_data:en', 'cache_views'), 'Cache for all tables written.');
+    $this->assertTrue(cache_get('views_data:views_test:en', 'cache_views'), 'Cache for requested table written.');
+    $this->assertFalse(cache_get('views_data:views_test_previous:en', 'cache_views'), 'No Cache written for not requested table.');
+    $this->assertTrue(drupal_static('_views_fetch_data_fully_loaded'), 'Views data is fully loaded');
+
+    $this->resetStaticViewsDataCache();
+
+    // Request the same table again.
+    $this->assertTrue(views_fetch_data('views_test'), 'Data about existing table returned');
+    $this->assertEqual(variable_get('views_test_views_data_count', 0), 1, 'Views data rebuilt once');
+    $this->assertFalse(drupal_static('_views_fetch_data_fully_loaded'), 'Views data is not fully loaded');
+
+    $this->resetStaticViewsDataCache();
+
+    // Request a missing table, this should load the full cache from cache but
+    // not rebuilt.
+    $this->assertFalse(views_fetch_data('views_test_missing'), 'No data about missing table returned');
+    $this->assertEqual(variable_get('views_test_views_data_count', 0), 1, 'Views data rebuilt once');
+    $this->assertTrue(drupal_static('_views_fetch_data_fully_loaded'), 'Views data is fully loaded');
+
+    $this->resetStaticViewsDataCache();
+
+    // Request the same empty table again, this should load only that (empty)
+    // cache for that table.
+    $this->assertFalse(views_fetch_data('views_test_missing'), 'No data about missing table returned');
+    $this->assertEqual(variable_get('views_test_views_data_count', 0), 1, 'Views data rebuilt once');
+    $this->assertFalse(drupal_static('_views_fetch_data_fully_loaded'), 'Views data is not fully loaded');
+
+  }
+
   /**
    * Ensure that a certain handler is a instance of a certain table/field.
    */
@@ -160,4 +205,13 @@ class ViewsModuleTest extends ViewsSqlTest {
 
     $this->assertEqual($field_data['handler'], get_class($handler));
   }
+
+  /**
+   * Resets the views data cache.
+   */
+  protected function resetStaticViewsDataCache() {
+    drupal_static_reset('_views_fetch_data_cache');
+    drupal_static_reset('_views_fetch_data_recursion_protected');
+    drupal_static_reset('_views_fetch_data_fully_loaded');
+  }
 }
diff --git a/drupal7/sites/all/modules/views/tests/views_test.info b/drupal7/sites/all/modules/views/tests/views_test.info
index 23bd884f..e0256dc4 100644
--- a/drupal7/sites/all/modules/views/tests/views_test.info
+++ b/drupal7/sites/all/modules/views/tests/views_test.info
@@ -5,9 +5,9 @@ core = 7.x
 dependencies[] = views
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2013-04-09
-version = "7.x-3.7"
+; Information added by Drupal.org packaging script on 2014-05-20
+version = "7.x-3.8"
 core = "7.x"
 project = "views"
-datestamp = "1365499236"
+datestamp = "1400618928"
 
diff --git a/drupal7/sites/all/modules/views/tests/views_test.module b/drupal7/sites/all/modules/views/tests/views_test.module
index 7adcf430..a7460690 100644
--- a/drupal7/sites/all/modules/views/tests/views_test.module
+++ b/drupal7/sites/all/modules/views/tests/views_test.module
@@ -31,6 +31,10 @@ function views_test_views_api() {
  * Implements hook_views_data().
  */
 function views_test_views_data() {
+  // Count how often this hook is called.
+  $count = variable_get('views_test_views_data_count', 0);
+  $count++;
+  variable_set('views_test_views_data_count', $count);
   return  variable_get('views_test_views_data', array());
 }
 
diff --git a/drupal7/sites/all/modules/views/views.api.php b/drupal7/sites/all/modules/views/views.api.php
index ba9b326f..07cd76cf 100644
--- a/drupal7/sites/all/modules/views/views.api.php
+++ b/drupal7/sites/all/modules/views/views.api.php
@@ -513,6 +513,80 @@ function hook_views_data_alter(&$data) {
   // Note that the $data array is not returned – it is modified by reference.
 }
 
+/**
+ * Override the default data for a Field API field.
+ *
+ * Field module's implementation of hook_views_data() invokes this for each
+ * field in the module that defines the field type (as declared in the field
+ * array). It is not invoked in other modules.
+ *
+ * If no hook implementation exists, hook_views_data() falls back to
+ * field_views_field_default_views_data().
+ *
+ * @see field_views_data()
+ * @see hook_field_views_data_alter()
+ * @see hook_field_views_data_views_data_alter()
+ *
+ * @param $field
+ *  A field definition array, as returned by field_info_fields().
+ *
+ * @return
+ *  An array of views data, in the same format as the return value of
+ *  hook_views_data().
+ */
+function hook_field_views_data($field) {
+
+}
+
+/**
+ * Alter the views data for a single Field API field.
+ *
+ * This is called even if there is no hook_field_views_data() implementation for
+ * the field, and therefore may be used to alter the default data that
+ * field_views_field_default_views_data() supplies for the field.
+ *
+ * @param $result
+ *  An array of views table data provided for a single field. This has the same
+ *  format as the return value of hook_views_data().
+ * @param $field
+ *  A field definition array, as returned by field_info_fields().
+ * @param $module
+ *  The module that defines the field type.
+ *
+ * @see field_views_data()
+ * @see hook_field_views_data()
+ * @see hook_field_views_data_views_data_alter()
+ */
+function hook_field_views_data_alter(&$result, $field, $module) {
+
+}
+
+/**
+ * Alter the views data on a per field basis.
+ *
+ * Field module's implementation of hook_views_data_alter() invokes this for
+ * each field in the module that defines the field type (as declared in the
+ * field array). It is not invoked in other modules.
+ *
+ * Unlike hook_field_views_data_alter(), this operates on the whole of the views
+ * data. This allows a field module to add data that concerns its fields to
+ * other tables, which would not yet be defined at the point when
+ * hook_field_views_data() and hook_field_views_data_alter() are invoked. For
+ * example, entityreference adds reverse relationships on the tables for the
+ * entities which are referenced by entityreference fields.
+ *
+ * (Note: this is weirdly named so as not to conflict with
+ * hook_field_views_data_alter().)
+ *
+ * @see hook_field_views_data()
+ * @see hook_field_views_data_alter()
+ * @see field_views_data_alter()
+ */
+function hook_field_views_data_views_data_alter(&$data, $field) {
+  $field_name = $field['field_name'];
+  $data_key = 'field_data_' . $field_name;
+  // Views data for this field is in $data[$data_key]
+}
 
 /**
  * Describes plugins defined by the module.
diff --git a/drupal7/sites/all/modules/views/views.info b/drupal7/sites/all/modules/views/views.info
index 50d81482..50f939c6 100644
--- a/drupal7/sites/all/modules/views/views.info
+++ b/drupal7/sites/all/modules/views/views.info
@@ -10,6 +10,7 @@ stylesheets[all][] = css/views.css
 dependencies[] = ctools
 ; Handlers
 files[] = handlers/views_handler_area.inc
+files[] = handlers/views_handler_area_messages.inc
 files[] = handlers/views_handler_area_result.inc
 files[] = handlers/views_handler_area_text.inc
 files[] = handlers/views_handler_area_text_custom.inc
@@ -49,6 +50,7 @@ files[] = handlers/views_handler_filter_in_operator.inc
 files[] = handlers/views_handler_filter_many_to_one.inc
 files[] = handlers/views_handler_filter_numeric.inc
 files[] = handlers/views_handler_filter_string.inc
+files[] = handlers/views_handler_filter_fields_compare.inc
 files[] = handlers/views_handler_relationship.inc
 files[] = handlers/views_handler_relationship_groupwise_max.inc
 files[] = handlers/views_handler_sort.inc
@@ -253,6 +255,7 @@ files[] = plugins/views_plugin_style_summary_unformatted.inc
 files[] = plugins/views_plugin_style_table.inc
 
 ; Tests
+files[] = tests/handlers/views_handlers.test
 files[] = tests/handlers/views_handler_area_text.test
 files[] = tests/handlers/views_handler_argument_null.test
 files[] = tests/handlers/views_handler_argument_string.test
@@ -261,6 +264,7 @@ files[] = tests/handlers/views_handler_field_boolean.test
 files[] = tests/handlers/views_handler_field_custom.test
 files[] = tests/handlers/views_handler_field_counter.test
 files[] = tests/handlers/views_handler_field_date.test
+files[] = tests/handlers/views_handler_field_file_extension.test
 files[] = tests/handlers/views_handler_field_file_size.test
 files[] = tests/handlers/views_handler_field_math.test
 files[] = tests/handlers/views_handler_field_url.test
@@ -274,6 +278,7 @@ files[] = tests/handlers/views_handler_filter_string.test
 files[] = tests/handlers/views_handler_sort_random.test
 files[] = tests/handlers/views_handler_sort_date.test
 files[] = tests/handlers/views_handler_sort.test
+files[] = tests/test_handlers/views_test_area_access.inc
 files[] = tests/test_plugins/views_test_plugin_access_test_dynamic.inc
 files[] = tests/test_plugins/views_test_plugin_access_test_static.inc
 files[] = tests/test_plugins/views_test_plugin_style_test_mapping.inc
@@ -312,9 +317,9 @@ files[] = tests/views_cache.test
 files[] = tests/views_view.test
 files[] = tests/views_ui.test
 
-; Information added by drupal.org packaging script on 2013-04-09
-version = "7.x-3.7"
+; Information added by Drupal.org packaging script on 2014-05-20
+version = "7.x-3.8"
 core = "7.x"
 project = "views"
-datestamp = "1365499236"
+datestamp = "1400618928"
 
diff --git a/drupal7/sites/all/modules/views/views.module b/drupal7/sites/all/modules/views/views.module
index fc427f49..20258df7 100644
--- a/drupal7/sites/all/modules/views/views.module
+++ b/drupal7/sites/all/modules/views/views.module
@@ -355,9 +355,6 @@ function views_permission() {
  * Implement hook_menu().
  */
 function views_menu() {
-  // Any event which causes a menu_rebuild could potentially mean that the
-  // Views data is updated -- module changes, profile changes, etc.
-  views_invalidate_cache();
   $items = array();
   $items['views/ajax'] = array(
     'title' => 'Views',
diff --git a/drupal7/sites/all/modules/views/views_ui.info b/drupal7/sites/all/modules/views/views_ui.info
index 95ea0149..d7c8c255 100644
--- a/drupal7/sites/all/modules/views/views_ui.info
+++ b/drupal7/sites/all/modules/views/views_ui.info
@@ -7,9 +7,9 @@ dependencies[] = views
 files[] = views_ui.module
 files[] = plugins/views_wizard/views_ui_base_views_wizard.class.php
 
-; Information added by drupal.org packaging script on 2013-04-09
-version = "7.x-3.7"
+; Information added by Drupal.org packaging script on 2014-05-20
+version = "7.x-3.8"
 core = "7.x"
 project = "views"
-datestamp = "1365499236"
+datestamp = "1400618928"
 
