webui code cleanup

This commit is contained in:
SJ 2012-07-06 21:58:52 +02:00
parent 00be0effe7
commit 4703bedcfe
4 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,8 @@ class ControllerCommonLayoutemail extends Controller {
protected function index() {
$this->data['title'] = $this->document->title;
$this->template = "common/layout-email.tpl";
$this->render();

View File

@ -17,6 +17,8 @@ class ControllerGroupEmail extends Controller {
$this->load->model('group/group');
$this->document->title = $language->get('text_group_management');
$this->data['page'] = 0;
$this->data['page_len'] = get_page_length();

View File

@ -403,7 +403,7 @@ class ModelUserUser extends Model {
foreach($group as $g) {
$g = rtrim($g);
if(!isset($__g[$groups[$g]])) {
if($g && !isset($__g[$groups[$g]])) {
$query = $this->db->query("INSERT INTO `" . TABLE_GROUP_USER . "` (id, uid) VALUES(?,?)", array($groups[$g], (int)$uid));
$__g[$groups[$g]] = 1;
}

View File

@ -7,7 +7,7 @@
<div id="pagenav">
<?php if($page > 0){ ?><a href="index.php?route=group/email&amp;page=0&amp;term=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?> &laquo; <?php if($page > 0){ ?></a><?php } ?>
<?php if($page > 0){ ?><a href="index.php?route=group/email&amp;page=<?php print $prev_page; ?>&amp;term=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?> &lsaquo; <?php if($page > 0){ ?></a><?php } ?>
<?php print $emails[0][$sort]; ?> - <?php print $emails[count($emails)-1][$sort]; ?>
<?php if(count($emails) > 0) { print $emails[0][$sort]; ?> - <?php print $emails[count($emails)-1][$sort]; } ?>
<?php if($total >= $page_len*($page+1) && $total > $page_len){ ?><a href="index.php?route=group/email&amp;page=<?php print $next_page; ?>&amp;term=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?> &rsaquo; <?php if($total >= $page_len*($page+1) && $total > $page_len){ ?></a><?php } ?>
<?php if($page < $total_pages){ ?><a href="index.php?route=group/email&amp;page=<?php print $total_pages; ?>&amp;term=<?php print $search; ?>&amp;sort=<?php print $sort; ?>&amp;order=<?php print $order; ?>" class="navlink"><?php } ?> &raquo; <?php if($page < $total_pages){ ?></a><?php } ?>
</div>