Code Duplication    Length = 40-43 lines in 5 locations

lib/templates/pobject/dialog.add.php 1 location

@@ 3-42 (lines=40) @@
1
<?php
2
	$ARCurrent->nolangcheck = true;
3
	if ( $this->CheckLogin("add", ARANYTYPE) && $this->CheckConfig() ) {
4
		include( $this->store->get_config("code")."widgets/wizard/code.php" );
5
6
		$this->call('system.save.tempfile.phtml');
7
8
		$wgWizFlow = array(
9
			array(
10
				"current"  => $this->getvar("wgWizCurrent","none"),
11
				"template" => "dialog.add.form.php",
12
				"cancel"   => "window.close.js",
13
				"save"     => "dialog.add.save.php"
14
			)
15
		);
16
17
		if ( $wgWizAction == 'save' ) {
18
			$wgWizButtons = array(
19
				"cancel" => array(
20
					"value" => $ARnls["cancel"]
21
				),
22
				"template" => array(
23
					"value" => $ARnls["back"]
24
				)
25
			);
26
		} else {
27
			$wgWizButtons = array(
28
				"cancel" => array(
29
					"value" => $ARnls["cancel"]
30
				),
31
				"save" => array(
32
					"value" => $ARnls["add"]
33
				),
34
			);
35
		}
36
37
		$wgWizTitle = $ARnls["add"];
38
		$wgWizHeader = $wgWizTitle;
39
		$wgWizHeaderIcon = $AR->dir->images.'icons/large/add.png';
40
		$wgWizStyleSheets = array( $AR->dir->styles.'dialog.add.css' );
41
		include( $this->store->get_config("code")."widgets/wizard/yui.wizard.html" );
42
	}
43
?>
44

lib/templates/pobject/dialog.svn.templates.checkout.php 1 location

@@ 3-45 (lines=43) @@
1
<?php
2
	$ARCurrent->nolangcheck=true;
3
	if ($this->CheckLogin("layout") && $this->CheckConfig()) {
4
		include($this->store->get_config("code")."widgets/wizard/code.php");
5
6
		$wgWizFlow = array(
7
			array(
8
				"current" => $this->getdata("wgWizCurrent","none"),
9
				"template" => "dialog.svn.templates.checkout.form.php",
10
				"cancel" => "window.close.js",
11
				"save" => "dialog.svn.templates.checkout.save.php"
12
			)
13
		);
14
15
		$wgWizAction = $this->getdata("wgWizAction");
16
17
		if( $wgWizAction == "save" ) {
18
			$wgWizStyleSheets = array( $AR->dir->styles."svn.css" );
19
20
			$wgWizButtons = array(
21
				"cancel" => array(
22
					"value" => $ARnls["ok"]
23
				),
24
				"template" => array(
25
					"value" => $ARnls['back'],
26
					"location" => "left"
27
				)
28
			);
29
		} else {
30
			$wgWizButtons = array(
31
				"cancel" => array(
32
					"value" => $ARnls["cancel"]
33
				),
34
				"save" => array(
35
					"value" => $ARnls["ariadne:svn:checkout"]
36
				),
37
			);
38
		}
39
40
		$wgWizTitle=$ARnls['ariadne:svn:checkout'];
41
		$wgWizHeader = $wgWizTitle;
42
		$wgWizHeaderIcon = $AR->dir->images.'icons/large/svncheckout.png';
43
44
		include($this->store->get_config("code")."widgets/wizard/yui.wizard.html");
45
	}
46
?>
47

lib/templates/pobject/dialog.svn.templates.import.php 1 location

@@ 3-43 (lines=41) @@
1
<?php
2
	$ARCurrent->nolangcheck=true;
3
	if ($this->CheckLogin("layout") && $this->CheckConfig()) {
4
		include($this->store->get_config("code")."widgets/wizard/code.php");
5
6
		$wgWizFlow = array(
7
			array(
8
				"current" => $this->getdata("wgWizCurrent","none"),
9
				"template" => "dialog.svn.templates.import.form.php",
10
				"cancel" => "window.close.js",
11
				"save" => "dialog.svn.templates.import.save.php"
12
			)
13
		);
14
15
		$wgWizAction = $this->getdata("wgWizAction");
16
17
		if( $wgWizAction == "save" ) {
18
			$wgWizStyleSheets = array( $AR->dir->styles."svn.css" );
19
			$wgWizButtons = array(
20
				"cancel" => array(
21
					"value" => $ARnls["ok"]
22
				),
23
				"template" => array(
24
					"value" => $ARnls['back']
25
				)
26
			);
27
		} else {
28
			$wgWizButtons = array(
29
				"cancel" => array(
30
					"value" => $ARnls["cancel"]
31
				),
32
				"save" => array(
33
					"value" => $ARnls["ariadne:svn:import"]
34
				),
35
			);
36
		}
37
38
		$wgWizTitle=$ARnls['ariadne:svn:import'];
39
		$wgWizHeader = $wgWizTitle;
40
		$wgWizHeaderIcon = $AR->dir->images.'icons/large/svnimport.png';
41
42
		include($this->store->get_config("code")."widgets/wizard/yui.wizard.html");
43
	}
44
?>
45

lib/templates/pobject/dialog.svn.tree.checkout.php 1 location

@@ 3-45 (lines=43) @@
1
<?php
2
	$ARCurrent->nolangcheck=true;
3
	if ($this->CheckLogin("layout") && $this->CheckConfig()) {
4
		include($this->store->get_config("code")."widgets/wizard/code.php");
5
6
		$wgWizFlow = array(
7
			array(
8
				"current" => $this->getdata("wgWizCurrent","none"),
9
				"template" => "dialog.svn.tree.checkout.form.php",
10
				"cancel" => "window.close.js",
11
				"save" => "dialog.svn.tree.checkout.save.php"
12
			)
13
		);
14
15
		$wgWizAction = $this->getdata("wgWizAction");
16
17
		if( $wgWizAction == "save" ) {
18
			$wgWizStyleSheets = array( $AR->dir->styles."svn.css" );
19
20
			$wgWizButtons = array(
21
				"cancel" => array(
22
					"value" => $ARnls["ok"]
23
				),
24
				"template" => array(
25
					"value" => $ARnls['back'],
26
					"location" => "left"
27
				)
28
			);
29
		} else {
30
			$wgWizButtons = array(
31
				"cancel" => array(
32
					"value" => $ARnls["cancel"]
33
				),
34
				"save" => array(
35
					"value" => $ARnls["ariadne:svn:checkout"]
36
				),
37
			);
38
		}
39
40
		$wgWizTitle=$ARnls['ariadne:svn:checkout_recursive'];
41
		$wgWizHeader = $wgWizTitle;
42
		$wgWizHeaderIcon = $AR->dir->images.'icons/large/svncheckout.png';
43
44
		include($this->store->get_config("code")."widgets/wizard/yui.wizard.html");
45
	}
46
?>
47

lib/templates/pobject/dialog.svn.tree.import.php 1 location

@@ 3-44 (lines=42) @@
1
<?php
2
	$ARCurrent->nolangcheck=true;
3
	if ($this->CheckLogin("layout") && $this->CheckConfig()) {
4
		include($this->store->get_config("code")."widgets/wizard/code.php");
5
6
		$wgWizFlow = array(
7
			array(
8
				"current" => $this->getdata("wgWizCurrent","none"),
9
				"template" => "dialog.svn.tree.import.form.php",
10
				"cancel" => "window.close.js",
11
				"save" => "dialog.svn.tree.import.save.php"
12
			)
13
		);
14
15
		$wgWizAction = $this->getdata("wgWizAction");
16
17
		if( $wgWizAction == "save" ) {
18
			$wgWizStyleSheets = array( $AR->dir->styles."svn.css" );
19
			$wgWizButtons = array(
20
				"cancel" => array(
21
					"value" => $ARnls["ok"]
22
				),
23
				"template" => array(
24
					"value" => $ARnls['back'],
25
					"location" => "left"
26
				)
27
			);
28
		} else {
29
			$wgWizButtons = array(
30
				"cancel" => array(
31
					"value" => $ARnls["cancel"]
32
				),
33
				"save" => array(
34
					"value" => $ARnls["ariadne:svn:import"]
35
				),
36
			);
37
		}
38
39
		$wgWizTitle=$ARnls['ariadne:svn:import_recursive'];
40
		$wgWizHeader = $wgWizTitle;
41
		$wgWizHeaderIcon = $AR->dir->images.'icons/large/svnimport.png';
42
43
		include($this->store->get_config("code")."widgets/wizard/yui.wizard.html");
44
	}
45
?>
46