From 9b8801c8f79c03efdf13cecbf4186f7a5f0cce38 Mon Sep 17 00:00:00 2001 From: God Mod Date: Thu, 12 Mar 2015 16:55:30 +0100 Subject: [PATCH] Fixed display of unix timestamps --- includes/signature.class.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/includes/signature.class.php b/includes/signature.class.php index f8e1b2a..8f18a20 100644 --- a/includes/signature.class.php +++ b/includes/signature.class.php @@ -121,6 +121,9 @@ public function createSignature($intCharID, $arrSignatureData, $strFilename){ $arrPresets = $this->pdh->get_preset($realPreset); $subArray = array('%dkp_id%' => $dkp_id, '%member_id%' => $intCharID, '%with_twink%' =>!intval($this->config->get('show_twinks'))); $value = $this->pdh->get($arrPresets[0], $arrPresets[1], $arrPresets[2], $subArray); + if(in_array($realPreset, array('first_item', 'last_item', 'first_raid', 'last_raid'))){ + $value = $this->pdh->geth($arrPresets[0], $arrPresets[1], $arrPresets[2], $subArray); + } $strDKPName = $this->pdh->get('multidkp', 'name', array($dkp_id)); $strPresetname = $this->pdh->get_caption($arrPresets[0], $arrPresets[1], $this->pdh->post_process_preset($arrPresets[3], $subArray)).' ['.$strDKPName.']'; if (is_float($value)) $value = runden($value); @@ -158,6 +161,9 @@ public function createSignature($intCharID, $arrSignatureData, $strFilename){ $arrPresets = $this->pdh->get_preset($realPreset); $subArray = array('%dkp_id%' => $dkp_id, '%member_id%' => $intCharID, '%with_twink%' =>!intval($this->config->get('show_twinks'))); $value = $this->pdh->get($arrPresets[0], $arrPresets[1], $arrPresets[2], $subArray); + if(in_array($realPreset, array('first_item', 'last_item', 'first_raid', 'last_raid'))){ + $value = $this->pdh->geth($arrPresets[0], $arrPresets[1], $arrPresets[2], $subArray); + } $strDKPName = $this->pdh->get('multidkp', 'name', array($dkp_id)); $strPresetname = $this->pdh->get_caption($arrPresets[0], $arrPresets[1], $this->pdh->post_process_preset($arrPresets[3], $subArray)).' ['.$strDKPName.']'; if (is_float($value)) $value = runden($value); @@ -191,6 +197,7 @@ public function createSignature($intCharID, $arrSignatureData, $strFilename){ if ($myPreset == '-') continue; $myStrPos = strpos($myPreset, '_mdkp'); + if ($myStrPos !== false){ $realPreset = substr($myPreset, 0, $myStrPos); $dkp_id = substr($myPreset, $myStrPos+5); @@ -198,9 +205,12 @@ public function createSignature($intCharID, $arrSignatureData, $strFilename){ $arrPresets = $this->pdh->get_preset($realPreset); $subArray = array('%dkp_id%' => $dkp_id, '%member_id%' => $intCharID, '%with_twink%' =>!intval($this->config->get('show_twinks'))); $value = $this->pdh->get($arrPresets[0], $arrPresets[1], $arrPresets[2], $subArray); + if(in_array($realPreset, array('first_item', 'last_item', 'first_raid', 'last_raid'))){ + $value = $this->pdh->geth($arrPresets[0], $arrPresets[1], $arrPresets[2], $subArray); + } $strDKPName = $this->pdh->get('multidkp', 'name', array($dkp_id)); $strPresetname = $this->pdh->get_caption($arrPresets[0], $arrPresets[1], $this->pdh->post_process_preset($arrPresets[3], $subArray)).' ['.$strDKPName.']'; - + if (is_float($value)) $value = runden($value); } else { $arrPresets = $this->pdh->get_preset($myPreset); @@ -237,6 +247,9 @@ public function createSignature($intCharID, $arrSignatureData, $strFilename){ $arrPresets = $this->pdh->get_preset($realPreset); $subArray = array('%dkp_id%' => $dkp_id, '%member_id%' => $intCharID, '%with_twink%' =>!intval($this->config->get('show_twinks'))); $value = $this->pdh->get($arrPresets[0], $arrPresets[1], $arrPresets[2], $subArray); + if(in_array($realPreset, array('first_item', 'last_item', 'first_raid', 'last_raid'))){ + $value = $this->pdh->geth($arrPresets[0], $arrPresets[1], $arrPresets[2], $subArray); + } $strDKPName = $this->pdh->get('multidkp', 'name', array($dkp_id)); if (is_float($value)) $value = runden($value);