Skip to content

Commit

Permalink
Fixes #9315, this prevents the session info for dates being reset inc…
Browse files Browse the repository at this point in the history
…orrectly.
  • Loading branch information
kormoc committed Dec 21, 2010
1 parent 029e9ff commit 0d6873a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.ht*
26 changes: 16 additions & 10 deletions classes/Translate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0d6873a

Please sign in to comment.