Changeset 40


Ignore:
Timestamp:
Aug 27, 2007, 11:06:37 PM (18 years ago)
Author:
amp4ecs
Message:

Fixed double display of sessions in speaker list.
Fixed sql warnings at pressing back link.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/pi1/class.tx_wseevents_pi1.php

    r38 r40  
    104104                }
    105105        }
     106
     107       
     108       
     109       
     110       
    106111       
    107112        /**
     
    214219                            $label = $this->getFieldContent('name');  // the link text
    215220                            $overrulePIvars = '';//array('session' => $this->getFieldContent('uid'));
    216                             $overrulePIvars = array('showSessionUid' => $this->internal['currentRow']['uid'], 'backUid' => $GLOBALS['TSFE']->id);
     221                            $overrulePIvars = array('showSessionUid' => $this->internal['currentRow']['uid'], 'backUid' => $GLOBALS['TSFE']->id, 'back2list' => '1');
    217222                            $clearAnyway=1;    // the current values of piVars will NOT be preserved
    218223                            $altPageId=$this->conf['singleSession'];      // ID of the target page, if not on the same page
     
    244249                return $content;
    245250        }
     251
     252
     253       
     254       
     255       
     256       
     257       
     258       
     259       
    246260
    247261        /**
     
    382396                                        if (!empty($this->conf['singleSession'])) {
    383397                                                $overrulePIvars = '';//array('session' => $this->getFieldContent('uid'));
    384                                                 $overrulePIvars = array('showSessionUid' => $k, 'backUid' => $GLOBALS['TSFE']->id);
     398                                                $overrulePIvars = array('showSessionUid' => $k, 'backUid' => $GLOBALS['TSFE']->id, 'back2list' => '1');
    385399                                                $clearAnyway=1;    // the current values of piVars will NOT be preserved
    386400                                                $altPageId=$this->conf['singleSession'];      // ID of the target page, if not on the same page
     
    415429        }
    416430
     431       
     432       
     433       
     434       
     435       
     436       
     437       
     438       
    417439        /**
    418440         * Display the details of a single session
     
    442464                // Link for back to list view
    443465                $label = $this->pi_getLL('back','Back');  // the link text
    444                 $overrulePIvars = array ('showSessionUid' => $this->piVars['showSessionUid']);
     466                if ($this->piVars['back2list']<>1) {
     467                        # Back to single view
     468                        $overrulePIvars = array ('showSessionUid' => $this->piVars['showSessionUid']);
     469                }
    445470                $clearAnyway=1;    // the current values of piVars will NOT be preserved
    446471                $altPageId=$this->piVars['backUid'];      // ID of the view page
     
    463488        }
    464489
     490       
     491       
     492       
     493       
     494       
     495       
     496       
     497       
    465498        /**
    466499         * Display the details of a single speaker
     
    566599        }
    567600
     601       
     602       
     603       
     604       
     605       
     606       
     607       
    568608        /**
    569609         * Get content of one field
     
    733773        }
    734774
     775       
     776       
     777       
     778       
     779       
     780       
     781       
    735782        /**
    736783        * Get the translated content of a field
     
    739786        function getTranslatedField($dbname, $fN, $fUid=-1) {
    740787                $index = $GLOBALS['TSFE']->sys_language_uid;
     788                if ($fUid<0) {
     789                        $fUid = $this->internal['currentRow']['uid'];
     790                }
    741791                if ($index<>0) {
    742792                        // for the name of a session, check if a translation is there
    743                         if ($fUid<0) {
    744                                 $fUid = $this->internal['currentRow']['uid'];
    745                         }
    746793                        $where = 'deleted=0 AND hidden=0 AND l18n_parent='.$fUid.' AND sys_language_uid='.$index;
    747794                        $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery($fN, $dbname, $where);
     
    760807                } else {
    761808                        //show default language
    762                         return $this->internal['currentRow'][$fN];
     809//                      return $this->internal['currentRow'][$fN];
     810                        $where = 'deleted=0 AND hidden=0 AND uid='.$fUid;
     811                        $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery($fN, $dbname, $where);
     812                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
     813                        $datacount = $row[$fN];
     814                        return $datacount;
    763815                }
    764816        }
     817       
     818       
     819       
     820       
     821       
     822       
     823       
    765824       
    766825        /**
     
    787846        }
    788847       
     848       
     849       
     850       
     851       
     852       
     853       
    789854        /**
    790855         * Get list of session UIDs for the speaker
    791856         */
    792857        function getSpeakerSessionList($speakerid,$eventPid) {
    793                 $where = '';
     858                $where = 'deleted=0 AND hidden=0 AND sys_language_uid=0';
    794859                $this->conf['pidList'] = $eventPid;
    795                 $res = $this->pi_exec_query('tx_wseevents_sessions',0,$where);
     860#               $res = $this->pi_exec_query('tx_wseevents_sessions',0,$where);
     861                $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery('speaker, uid', 'tx_wseevents_sessions', $where);
    796862                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
    797863                        foreach(explode(',',$row['speaker']) as $k){
     
    807873                return $sessions;
    808874        }
     875         
     876         
     877         
     878         
     879         
    809880         
    810881         /**
Note: See TracChangeset for help on using the changeset viewer.