示例#1
0
文件: article.php 项目: rair/yacs
 /**
  * get the short url for this anchor
  *
  * If the anchor has one, this function returns a minimal url.
  *
  * @return an url to view the anchor page, or NULL
  */
 function get_short_url()
 {
     if (isset($this->item['id'])) {
         return 'a~' . reduce_number($this->item['id']);
     }
     return NULL;
 }
示例#2
0
文件: sections.php 项目: rair/yacs
 /**
  * get short link
  *
  * @param array page attributes
  * @return string the short url
  */
 public static function &get_short_url($item)
 {
     $output = 's~' . reduce_number($item['id']);
     return $output;
 }