Code Duplication    Length = 15-17 lines in 4 locations

app/presenters/BlockPresenter.php 1 location

@@ 147-163 (lines=17) @@
144
	 * @param  integer $id
145
	 * @return void
146
	 */
147
	public function actionAnnotationupdate($id)
148
	{
149
		try {
150
			$data = $this->getRequest()->getPost();
151
			$result = $this->updateByGuid($id, $data);
152
153
			Debugger::log('Modification of block annotation id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO);
154
155
			$this->flashMessage('Položka byla úspěšně upravena.', 'ok');
156
		} catch(Exception $e) {
157
			Debugger::log('Modification of block annotation guid ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
158
159
			$this->flashMessage('Modification of block annotation guid ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
160
		}
161
162
		$this->redirect('Block:annotation', $id);
163
	}
164
165
	/**
166
	 * @param  int  $id

app/presenters/CategoryPresenter.php 1 location

@@ 71-87 (lines=17) @@
68
	 * @param  integer $id
69
	 * @return void
70
	 */
71
	public function actionUpdate($id)
72
	{
73
		try {
74
			$data = $this->getRequest()->getPost();
75
			$result = $this->getModel()->update($id, $data);
76
77
			Debugger::log('Modification of category id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO);
78
79
			$this->flashMessage('Položka byla úspěšně upravena', 'ok');
80
		} catch(Exception $e) {
81
			Debugger::log('Modification of category id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
82
83
			$this->flashMessage('Modification of category id ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
84
		}
85
86
		$this->redirect('Category:listing');
87
	}
88
89
	/**
90
	 * @return void

app/presenters/MeetingPresenter.php 1 location

@@ 49-63 (lines=15) @@
46
	 * @param  integer $id
47
	 * @return void
48
	 */
49
	public function actionUpdate($id)
50
	{
51
		try {
52
			$data = $this->getRequest()->getPost();
53
			$result = $this->getModel()->update($id, $data);
54
55
			Debugger::log('Modification of meeting id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO);
56
			$this->flashMessage('Položka byla úspěšně upravena', 'ok');
57
		} catch(Exception $e) {
58
			Debugger::log('Modification of meeting id ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
59
			$this->flashMessage('Modification of meeting id ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
60
		}
61
62
		$this->redirect('Meeting:listing');
63
	}
64
65
	/**
66
	 * Delete item

app/presenters/ProgramPresenter.php 1 location

@@ 153-169 (lines=17) @@
150
	 * @param  integer $id
151
	 * @return void
152
	 */
153
	public function actionAnnotationupdate($id)
154
	{
155
		try {
156
			$data = $this->getRequest()->getPost();
157
			$result = $this->updateByGuid($id, $data);
158
159
			Debugger::log('Modification of program annotation id ' . $id . ' with data ' . json_encode($data) . ' successfull, result: ' . json_encode($result), Debugger::INFO);
160
161
			$this->flashMessage('Položka byla úspěšně upravena.', 'ok');
162
		} catch(Exception $e) {
163
			Debugger::log('Modification of program annotation guid ' . $id . ' failed, result: ' . $e->getMessage(), Debugger::ERROR);
164
165
			$this->flashMessage('Modification of program annotation guid ' . $id . ' failed, result: ' . $e->getMessage(), 'error');
166
		}
167
168
		$this->redirect('Program:annotation', $id);
169
	}
170
171
	/**
172
	 * @return void