src/ShopRatingServiceBundle/objects/webmodules/MTRatingList/MTRatingListCore.class.php
protected function SetActivePageSort()
    {
        $this->sActivePageSort = $this->GetUserInput('pagesort');
        if (empty($this->sActivePageSort)) {
            //load default
            $this->sActivePageSort = $this->GetPageSortDefaultValue(); //default
            $this->SetModuleSessionParameter('pagesort', $this->sActivePageSort);
        } else {
            $bFound = false;
            foreach ($this->aPageSort as $iPsKey => $aPsVal) {
                if (in_array($this->sActivePageSort, $aPsVal)) {
                    $bFound = true;
                }
            }
            if (!$bFound) {
                //try to load from session
                $this->sActivePageSort = strtolower(trim($this->GetModuleSessionParameter('pagesort', false)));
                if (!$this->sActivePageSort) {
                    $this->sActivePageSort = $this->aPageSort[1]['id'];
                } //default
                $this->SetModuleSessionParameter('pagesort', $this->sActivePageSort);
            }
        }
    }
protected function SetActivePageSort()
    {
        $this->sActivePageSort = $this->GetUserInput('pagesort');
        if (empty($this->sActivePageSort)) {
            //load default
            $this->sActivePageSort = $this->GetPageSortDefaultValue(); //default
            $this->SetModuleSessionParameter('pagesort', $this->sActivePageSort);
        } else {
            $bFound = false;
            foreach ($this->aPageSort as $iPsKey => $aPsVal) {
                if (in_array($this->sActivePageSort, $aPsVal)) {
                    $bFound = true;
                }
            }
            if (!$bFound) {
                //try to load from session
                $this->sActivePageSort = strtolower(trim($this->GetModuleSessionParameter('pagesort', false)));
                if (!$this->sActivePageSort) {
                    $this->sActivePageSort = $this->aPageSort[1]['id'];
                } //default
                $this->SetModuleSessionParameter('pagesort', $this->sActivePageSort);
            }
        }
    }
protected function SetActivePageSort ( ) { $ this -> sActivePageSort = $ this -> GetUserInput ( 'pagesort' ) ; if ( empty ( $ this -> sActivePageSort ) ) { //load default $ this -> sActivePageSort = $ this -> GetPageSortDefaultValue ( ) ; //default $ this -> SetModuleSessionParameter ( 'pagesort' , $ this -> sActivePageSort ) ; } else { $ bFound = false ; foreach ( $ this -> aPageSort as $ iPsKey => $ aPsVal ) { if ( in_array ( $ this -> sActivePageSort , $ aPsVal ) ) { $ bFound = true ; } } if ( ! $ bFound ) { //try to load from session $ this -> sActivePageSort = strtolower ( trim ( $ this -> GetModuleSessionParameter ( 'pagesort' , false ) ) ) ; if ( ! $ this -> sActivePageSort ) { $ this -> sActivePageSort = $ this -> aPageSort [ 1 ] [ 'id' ] ; } //default $ this -> SetModuleSessionParameter ( 'pagesort' , $ this -> sActivePageSort ) ; } } }
Set active page sort, load from user input, session, default.
Set active page sort load from user input session default .