From dc79e800c0658a18d032cef0f5c42cca1ebced13 Mon Sep 17 00:00:00 2001 From: GodMod Date: Wed, 6 Sep 2017 18:53:09 +0200 Subject: [PATCH] Small improvements --- admin/bz.php | 11 +++++++++-- pdh/read/rli_boss/pdh_r_rli_boss.class.php | 4 +++- templates/base_template/bz.html | 4 ++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/admin/bz.php b/admin/bz.php index cf0f72a..add52f3 100644 --- a/admin/bz.php +++ b/admin/bz.php @@ -79,12 +79,19 @@ public function save() { foreach($data as $id => $type) { $method = ($id == 'neu') ? 'add' : 'update'; list($old_type, $iid) = explode('_', $id); + + if($old_type == $type OR $method == 'add') { - $save = $this->pdh->put('rli_'.$type, $method, $this->prepare_data($type, $id, $method)); + $arrData = $this->prepare_data($type, $id, $method); + if(!$arrData[0]) continue; + + $save = $this->pdh->put('rli_'.$type, $method, $arrData); } else { //type changed: remove and add + $arrData = $this->prepare_data($type, $id, 'add'); + if(!$arrData[0]) continue; $save = $this->pdh->put('rli_'.$old_type, 'del', array($iid)); - if($save) $save = $this->pdh->put('rli_'.$type, 'add', $this->prepare_data($type, $id, 'add')); + if($save) $save = $this->pdh->put('rli_'.$type, 'add', $arrData); } if($save) { $message['rli_save_suc'][] = $this->in->get('string:'.$id, ''); diff --git a/pdh/read/rli_boss/pdh_r_rli_boss.class.php b/pdh/read/rli_boss/pdh_r_rli_boss.class.php index 43316ad..cbe83e2 100644 --- a/pdh/read/rli_boss/pdh_r_rli_boss.class.php +++ b/pdh/read/rli_boss/pdh_r_rli_boss.class.php @@ -107,7 +107,9 @@ public function get_html_note($id, $with_icon=true) { return $icon.$this->pdh->get('event', 'name', array($this->get_note($id))); } $suffix = ($this->get_diff($id) AND $this->config->get('dep_match', 'raidlogimport') AND $this->game->get_game() == 'wow') ? $this->config->get('diff_'.$this->get_diff($id), 'raidlogimport') : ''; - return $this->get_note($id).$suffix; + $note = $this->get_note($id); + if(!$note || $note == "") $note = $this->get_string($id); + return $note.$suffix; } public function get_bonus($id) { diff --git a/templates/base_template/bz.html b/templates/base_template/bz.html index 0b78113..38dd85f 100644 --- a/templates/base_template/bz.html +++ b/templates/base_template/bz.html @@ -8,12 +8,12 @@
- +
- +