Changeset 714 for trunk/lib


Ignore:
Timestamp:
Feb 13, 2020 4:48:31 AM (4 years ago)
Author:
anonymous
Message:

Add base_url parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SortOrder.inc.php

    r685 r714  
    4545    public $default_sort;
    4646    public $default_order;
     47    public $base_url;
    4748
    4849    /**
     
    7273        $this->default_sort = $default_sort;
    7374        $this->default_order = $default_order;
     75
     76        // The base URL of sort header links.
     77        $this->base_url = $_SERVER['PHP_SELF'];
    7478    }
    7579
     
    213217            if ($this->sort_by == $col) {
    214218                if (mb_strtolower($this->order) == 'desc') {
    215                     ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=ASC'); ?>" data-tooltip title="<?php echo _("Change to ascending sort order"); ?>" class="sc-sort sc-desc"><?php echo $this->desc_widget; ?></a><?php echo $col_name; ?><?php
     219                    ?><a href="<?php echo $app->oHREF($this->base_url . '?sort=' . $col . '&order=ASC'); ?>" data-tooltip title="<?php echo _("Change to ascending sort order"); ?>" class="sc-sort sc-desc"><?php echo $this->desc_widget; ?></a><?php echo $col_name; ?><?php
    216220                } else {
    217                     ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=DESC'); ?>" data-tooltip title="<?php echo _("Change to descending sort order"); ?>" class="sc-sort sc-asc"><?php echo $this->asc_widget; ?></a><?php echo $col_name; ?><?php
     221                    ?><a href="<?php echo $app->oHREF($this->base_url . '?sort=' . $col . '&order=DESC'); ?>" data-tooltip title="<?php echo _("Change to descending sort order"); ?>" class="sc-sort sc-asc"><?php echo $this->asc_widget; ?></a><?php echo $col_name; ?><?php
    218222                }
    219223            } else {
    220                 ?><a href="<?php echo $app->oHREF($_SERVER['PHP_SELF'] . '?sort=' . $col . '&order=' . $default_order); ?>" data-tooltip title="<?php echo sprintf(_("Sort by %s"), $col_name); ?>" class="sc-sort"><?php echo $col_name; ?></a><?php
     224                ?><a href="<?php echo $app->oHREF($this->base_url . '?sort=' . $col . '&order=' . $default_order); ?>" data-tooltip title="<?php echo sprintf(_("Sort by %s"), $col_name); ?>" class="sc-sort"><?php echo $col_name; ?></a><?php
    221225            }
    222226        } else {
Note: See TracChangeset for help on using the changeset viewer.