Merge branch 'MDL-33562-23' of git://github.com/danpoltawski/moodle into MOODLE_23_STABLE
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 17 Jun 2013 22:48:50 +0000 (00:48 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Mon, 17 Jun 2013 22:48:50 +0000 (00:48 +0200)
Conflicts:
version.php

1  2 
lib/db/upgrade.php
lib/moodlelib.php
version.php

diff --combined lib/db/upgrade.php
@@@ -1187,5 -1187,14 +1187,14 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2012062507.01);
      }
  
 -    if ($oldversion < 2012062507.04) {
++    if ($oldversion < 2012062507.06) {
+         // Clean up old tokens which haven't been deleted.
+         $DB->execute("DELETE FROM {user_private_key} WHERE NOT EXISTS
+                          (SELECT 'x' FROM {user} WHERE deleted = 0 AND id = userid)");
+         // Main savepoint reached.
 -        upgrade_main_savepoint(true, 2012062507.04);
++        upgrade_main_savepoint(true, 2012062507.06);
+     }
      return true;
  }
diff --combined lib/moodlelib.php
@@@ -4031,6 -4031,9 +4031,9 @@@ function delete_user(stdClass $user) 
      // unauthorise the user for all services
      $DB->delete_records('external_services_users', array('userid'=>$user->id));
  
+     // Remove users private keys.
+     $DB->delete_records('user_private_key', array('userid' => $user->id));
      // force logout - may fail if file based sessions used, sorry
      session_kill_user($user->id);
  
@@@ -10343,11 -10346,6 +10346,11 @@@ function get_performance_info() 
      $info['html'] .= '<span class="included">Included '.$info['includecount'].' files</span> ';
      $info['txt']  .= 'includecount: '.$info['includecount'].' ';
  
 +    if (!empty($CFG->early_install_lang) or empty($PAGE)) {
 +        // We can not track more performance before installation or before PAGE init, sorry.
 +        return $info;
 +    }
 +
      $filtermanager = filter_manager::instance();
      if (method_exists($filtermanager, 'get_performance_summary')) {
          list($filterinfo, $nicenames) = $filtermanager->get_performance_summary();
diff --combined version.php
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2012062507.05;              // YYYYMMDD      = weekly release date of this DEV branch
 -$version  = 2012062507.04;              // YYYYMMDD      = weekly release date of this DEV branch
++$version  = 2012062507.06;              // YYYYMMDD      = weekly release date of this DEV branch
                                          //         RR    = release increments - 00 in DEV branches
                                          //           .XX = incremental changes
  
 -$release  = '2.3.7+ (Build: 20130530)';  // Human-friendly version name
 +$release  = '2.3.7+ (Build: 20130614)';  // Human-friendly version name
  
  $branch   = '23';                       // this version's branch
  $maturity = MATURITY_STABLE;            // this version's maturity level