예제 #1
0
 /**
  * Hack to try and determine page which help doc is assoc with
  * @static
  * @param $params
  * @return null|void
  */
 public static function getSection($params)
 {
     global $db;
     $h = new help();
     $hv = $db->selectValue('help_version', 'id', 'version=' . $params['version']);
     $help = $h->find('first', 'help_version_id=' . $hv . ' and sef_url=\'' . $params['title'] . '\'');
     $sessec = expSession::get('last_section') ? expSession::get('last_section') : 1;
     $sid = $help->section != 0 ? $help->section : $sessec;
     if (!expSession::get('last_section')) {
         expSession::set('last_section', $sid);
     }
     $section = $db->selectObject('section', 'id=' . intval($sid));
     return $section;
 }