예제 #1
0
파일: Edit.php 프로젝트: nburka/blorg
 protected function validateShortname($shortname)
 {
     // don't validate or generate a shortname when the post is not enabled
     $publish = $this->ui->getWidget('publish');
     if ($publish->value === BlorgPublishRadioTable::HIDDEN) {
         return;
     }
     $post = new BlorgPost();
     $post->id = $this->id;
     $post->shortname = $shortname;
     $post->publish_date = $publish->getPublishDate();
     return BlorgPost::isShortnameValid($this->app, $post);
 }
예제 #2
0
파일: Index.php 프로젝트: GervaisdeM/blorg
 protected function isShortnameValid(BlorgPost $post, $shortname)
 {
     $post = clone $post;
     $post->shortname = $shortname;
     return BlorgPost::isShortnameValid($this->app, $post);
 }