예제 #1
0
 /**
  * retrieves recently shorted Entries
  *
  * @param int   $pLimit
  * @param boolean $pHideYiid
  */
 public static function getLatestUrls($pLimit = 5, $pHideYiid = true)
 {
     $lYiidHost = UrlUtils::getHost(sfConfig::get("app_settings_url"));
     $lQ = Doctrine_Query::create()->from('ShortUrl s')->orderBy('s.id DESC')->limit($pLimit);
     if ($pHideYiid) {
         $lQ->where('s.url <> ?', $lYiidHost . '%');
     }
     return $lQ->execute();
 }