示例#1
0
 /**
  * Return galeriepozycje list.
  * @return ArrayObject
  */
 public function GetPozycje()
 {
     if ($this->_GaleriePozycjeList == null) {
         $this->_GaleriePozycjeList = GaleriePozycje::PobierzGaleriePozycjeJezyki($this->_GID, $this->_IdJezyk);
     }
     return $this->_GaleriePozycjeList;
 }
示例#2
0
 /**
  * Delete galeria from database, given by GID. If idLng=0 then deletes all records with given GID.
  * @param int $gid
  * @param int $idLng
  */
 public static function DeleteGaleria($gid, $idLng = 0)
 {
     $gp = GaleriePozycje::PobierzGaleriePozycjeJezyki($gid, $idLng);
     if ($gp != null && sizeof($gp) > 0) {
         foreach ($gp as $p) {
             GaleriePozycje::DeleteGaleriaPozycja($p->GetGID(), $idLng);
         }
     }
     $params = array();
     $query = "DELETE FROM #S#galerie WHERE 1=1 ";
     if ($gid > 0) {
         $query .= " AND GID=?";
         $params[] = (int) $gid;
     }
     if ($idLng > 0) {
         $query .= " AND IdJezyk=?";
         $params[] = (int) $idLng;
     }
     $result = DataBase::GetDbInstance()->ExecuteQueryWithParams($query, $params);
 }