예제 #1
0
파일: operations.php 프로젝트: hipogea/zega
 public function getPictureInfo($fName)
 {
     switch ($this->conf->usedTitle) {
         case 'filename':
             return MyFiles::class2name(MyFiles::RemoveExtension($fName), false, true);
             break;
         case 'pagetitle':
             return $this->getPageTitle();
             break;
         case 'predefined':
             return CHtml::encode(Yii::t('fbgallery', $this->conf->predefinedTitle));
             break;
     }
 }
예제 #2
0
 /**  This method is used to prepare and add pictures list from Database
  * @param array $arrFiles - contain picture's filename 
  * After database update, $this->imgsOrder is updated too
  */
 public function addImagesToDB($arrFiles)
 {
     $arrImgs = array();
     foreach ($arrFiles as $fName) {
         $arrImgs[$fName] = MyFiles::class2name(MyFiles::RemoveExtension($fName), false, true);
     }
     if ($this->imgsOrder) {
         $this->updateOrder(array_merge($this->imgsOrder, $arrImgs));
     } else {
         $this->updateOrder($arrImgs);
     }
 }