Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #9315, this prevents the session info for dates being reset inc…

…orrectly.
  • Loading branch information...
commit 0d6873a820e52c12f18cd8a82af8a05492cd7959 1 parent 029e9ff
@kormoc kormoc authored
Showing with 17 additions and 10 deletions.
  1. +1 −0  .gitignore
  2. +16 −10 classes/Translate.php
View
1  .gitignore
@@ -0,0 +1 @@
+.ht*
View
26 classes/Translate.php
@@ -197,16 +197,22 @@ public function load_translation($language = null) {
trigger_error('No language strings defined.', FATAL);
// Generate the date formats
- $_SESSION['date_statusbar'] = $this->string('generic_date').', '.$this->string('generic_time');
- $_SESSION['date_scheduled'] = $this->string('generic_date').' ('.$this->string('generic_time').')';
- $_SESSION['date_scheduled_popup'] = $this->string('generic_date');
- $_SESSION['date_recorded'] = $this->string('generic_date').' ('.$this->string('generic_time').')';
- $_SESSION['date_search'] = $this->string('generic_date').', '.$this->string('generic_time');
- $_SESSION['date_listing_key'] = $this->string('generic_date').', '.$this->string('generic_time');
- $_SESSION['date_listing_jump'] = $this->string('generic_date');
- $_SESSION['date_channel_jump'] = $this->string('generic_date');
- $_SESSION['date_job_status'] = $this->string('generic_date').', '.$this->string('generic_time');
- $_SESSION['time_format'] = $this->string('generic_time');
+ $session = array();
+ $session['date_statusbar'] = $this->string('generic_date').', '.$this->string('generic_time');
+ $session['date_scheduled'] = $this->string('generic_date').' ('.$this->string('generic_time').')';
+ $session['date_scheduled_popup'] = $this->string('generic_date');
+ $session['date_recorded'] = $this->string('generic_date').' ('.$this->string('generic_time').')';
+ $session['date_search'] = $this->string('generic_date').', '.$this->string('generic_time');
+ $session['date_listing_key'] = $this->string('generic_date').', '.$this->string('generic_time');
+ $session['date_listing_jump'] = $this->string('generic_date');
+ $session['date_channel_jump'] = $this->string('generic_date');
+ $session['date_job_status'] = $this->string('generic_date').', '.$this->string('generic_time');
+ $session['time_format'] = $this->string('generic_time');
+
+ foreach ($session as $key => $value)
+ if (!isset($_SESSION[$key]) || $_SESSION[$key] == '')
+ $_SESSION[$key] = $value;
+ unset($session);
$this->currentLanguage = $language;
}
Please sign in to comment.
Something went wrong with that request. Please try again.