Changeset d8fab2


Ignore:
Timestamp:
04/26/15 16:49:23 (2 years ago)
Author:
pierre-alain <pierre-alain@…>
Branches:
master
Children:
86bb78
Parents:
e5adc0
git-author:
pierre-alain <pierre-alain@…> (04/26/15 16:49:23)
git-committer:
pierre-alain <pierre-alain@…> (04/26/15 16:49:23)
Message:

resolving bug #34 : Prevent multiple feed name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OWR/DAO.php

    ra2eeb9 rd8fab2  
    343343                } 
    344344 
    345                 if($this->_idField) 
    346                 { 
    347                     if(isset($this->{$this->_idField}) && $this->{$this->_idField} > 0) 
    348                     { 
    349                         $chkUniQuery .= ' AND '.$this->_idField.'!='.self::$_db->quote($this->{$this->_idField}); 
    350                     } 
    351                     $exists = self::$_db->executeP($chkUniQuery, new DBRequest(Object::toArray($this), $whereFieldsDecl, true)); 
    352  
    353                     if($exists->next() && $exists->nb > 0) 
    354                     { 
    355                         throw new Exception('Some values are not uniques', 409); 
    356                     } 
    357                     unset($exists); 
    358                 } 
     345                if($this->_idField && isset($this->{$this->_idField}) && $this->{$this->_idField} > 0) 
     346                    $chkUniQuery .= ' AND '.$this->_idField.'!='.self::$_db->quote($this->{$this->_idField}); 
     347 
     348                $exists = self::$_db->executeP($chkUniQuery, new DBRequest(Object::toArray($this), $whereFieldsDecl, true)); 
     349 
     350                if($exists->next() && $exists->nb > 0) 
     351                { 
     352                    throw new Exception('Some values are not uniques', 409); 
     353                } 
     354                unset($exists); 
    359355            } 
    360356 
Note: See TracChangeset for help on using the changeset viewer.