Code Duplication    Length = 23-25 lines in 2 locations

app/Controller/BannerController.php 1 location

@@ 34-56 (lines=23) @@
31
		$this->layout = 'wadmin';
32
	}
33
34
	public function editar_cadastro($id) {
35
		$this->loadModel('CategoriaBanner');
36
		
37
		$this->set('categorias', $this->CategoriaBanner->find('all', 
38
				array('conditions' => 
39
					array('ativo' => 1,
40
						  'usuario_id' => $this->instancia
41
					)
42
				)
43
			)
44
		);	
45
46
		$this->set('banner', $this->Banner->find('all', 
47
				array('conditions' => 
48
					array('ativo' => 1,
49
						  'id' => $id
50
					)
51
				)
52
			)[0]
53
		);
54
55
		$this->layout = 'wadmin';
56
	}
57
58
	public function s_editar_cadastro($id) {
59
		$dados = $this->request->data('dados');

app/Controller/VendaController.php 1 location

@@ 14-38 (lines=25) @@
11
12
class VendaController extends AppController {
13
14
	public function pdv() {
15
		$this->layout = 'wadmin';
16
17
		$this->loadModel('Produto');
18
19
		$this->set('produtos', $this->Produto->find('all',
20
				array('conditions' =>
21
					array('ativo' => 1,
22
						  'id_usuario' => $this->instancia
23
					)
24
				)
25
			)
26
		);
27
28
		$this->loadModel('Cliente');
29
30
		$this->set('clientes', $this->Cliente->find('all',
31
				array('conditions' =>
32
					array('ativo' => 1,
33
						  'id_usuario' => $this->instancia
34
					)
35
				)
36
			)
37
		);
38
	}
39
40
	public function recuperar_dados_venda_ajax() {
41
		$this->layout = 'ajax';