Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
GodMod committed Sep 6, 2017
1 parent 7f1b656 commit dc79e80
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
11 changes: 9 additions & 2 deletions admin/bz.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, '');
Expand Down
4 changes: 3 additions & 1 deletion pdh/read/rli_boss/pdh_r_rli_boss.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions templates/base_template/bz.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<div class="clear"></div>
</div>
<!-- ENDIF -->

<form action="{ACTION}" method="post" name="post">
<div class="tableHeader floatRight">
<button type="submit" name="upd" value="{L_bz_update}" class="mainoption" /><i class="fa fa-plus"></i> {L_bz_update}</button>
</div>
<div class="clear"></div>
<form action="{ACTION}" method="post" name="post">

<div id="rli_manage_bz">
<ul>
<li><a href='#fragment-1'><span>{L_rli_bz_abz}</span></a></li>
Expand Down

0 comments on commit dc79e80

Please sign in to comment.