コード例 #1
0
 public function execute()
 {
     // for search - use the alternative connection
     myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
     if (!myResponseUtils::hasPageExpired($this->getContext()->getResponse())) {
         return sfView::NONE;
     }
     $filter = $this->getFiler();
     // new kuserFilter ();
     $mode = @$_REQUEST["mode"];
     $page_size = $mode == "ALL" ? self::PAGE_SIZE : 2 * self::PAGE_SIZE;
     $my_pager = new mySmartPager($this, $this->getPagerName(), $page_size);
     $featured = "";
     $id_list = mySearchUtils::getIdList($mode, $featured);
     $this->setIdList($id_list);
     $this->fetchPage($this, $filter, $my_pager);
     // cache the result
     // TODO - make this work !!
     //$this->getResponse()->addCacheControlHttpHeader('max_age=60');
     myResponseUtils::setCacheHeaders($this->context->getResponse(), time(), self::EXPIRY_IN_SECONDS);
 }
コード例 #2
0
 public static function createLoginUrl()
 {
     $params = array('perms' => 'read');
     return myResponseUtils::createRedirectUrl(self::buildUrl($params, "auth"));
 }