original_string: protected function submitEditPage()
      {
          if ($this->isPosted('delete')) {
              $this->deletePage();
          } else if ($this->isPosted('save') && $this->validateEditPage()) {
              $this->deleteImagesPage();
              if (isset($this->data_page['page_id'])) {
                  $this->updatePage();
              } else {
                  $this->addPage();
              }
          }
      }
code: protected function submitEditPage()
      {
          if ($this->isPosted('delete')) {
              $this->deletePage();
          } else if ($this->isPosted('save') && $this->validateEditPage()) {
              $this->deleteImagesPage();
              if (isset($this->data_page['page_id'])) {
                  $this->updatePage();
              } else {
                  $this->addPage();
              }
          }
      }
code_tokens: protected function submitEditPage ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deletePage ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditPage ( ) ) { $ this -> deleteImagesPage ( ) ; if ( isset ( $ this -> data_page [ 'page_id' ] ) ) { $ this -> updatePage ( ) ; } else { $ this -> addPage ( ) ; } } }
docstring: Handles a submitted page
docstring_tokens: Handles a submitted page