Code Duplication    Length = 21-21 lines in 2 locations

src/Page/PageController.php 1 location

@@ 108-128 (lines=21) @@
105
	 *
106
	 * @return void
107
	 */
108
	public function updateAction($id = null)
109
	{
110
		
111
		if (!$id) {
112
			$this->redirectTo('page');
113
		}
114
		
115
		$page = $this->page->find($id);
116
		
117
		$form = new \Anax\Page\CFormUpdatePage($page);
118
        $form->setDI($this->di);
119
		
120
		// Check the status of the form
121
        $form->check();
122
	 
123
		$this->di->theme->setTitle("Update page");
124
        $this->di->views->add('default/page', [
125
            'title' => "Update a page",
126
            'content' => $form->getHTML()
127
        ]);
128
	}
129
	
130
	/**
131
	 * Delete page.

src/Blog/BlogController.php 1 location

@@ 113-133 (lines=21) @@
110
	 *
111
	 * @return void
112
	 */
113
	public function updateAction($id = null)
114
	{
115
		
116
		if (!$id) {
117
			$this->redirectTo('blog');
118
		}
119
		
120
		$blog = $this->blog->find($id);
121
		
122
		$form = new \Anax\Blog\CFormUpdatePost($blog);
123
        $form->setDI($this->di);
124
		
125
		// Check the status of the form
126
        $form->check();
127
	 
128
		$this->di->theme->setTitle("Update blogpost");
129
        $this->di->views->add('default/page', [
130
            'title' => "Update a blogpost",
131
            'content' => $form->getHTML()
132
        ]);
133
	}
134
	
135
	/**
136
	 * Delete blogpost.