document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. public function save( $validate = true )
  2. {
  3.     if( $this->isNewRecord )
  4.     {
  5.         // noveljuk a verzio-szamot ...
  6.         $this->revision = $this->revision+1;
  7.         return parent::save( $validate );
  8.     }
  9.     else
  10.     {
  11.         // ha a save fuggvenyt false-kent hivjuk meg
  12.         // akkor a modell atugorja az ellenorzest igy nem kell a
  13.         // a title egyenisegevel bajlodnunk, es igy noveljuk a verzio szamot
  14.         $newpage = new Page();
  15.         $newpage->attributes = $this->attributes;
  16.         $newpage->save(false);
  17.         return true;
  18.     }
  19. }
');