Code Duplication    Length = 10-10 lines in 3 locations

require/class.Translation.php 2 locations

@@ 61-70 (lines=10) @@
58
                } else return $ident;
59
        }
60
61
       public function addOperator($ident,$correct_ident,$source) {
62
                $query = "INSERT INTO translation (Operator,Operator_correct,Source) VALUES (:ident,:correct_ident,:source)";
63
                $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source);
64
                 try {
65
                        $sth = $this->db->prepare($query);
66
                        $sth->execute($query_values);
67
                } catch(PDOException $e) {
68
                        return "error : ".$e->getMessage();
69
                }
70
        }
71
72
       public function updateOperator($ident,$correct_ident,$source) {
73
                $query = "UPDATE translation SET Operator_correct = :correct_ident,Source = :source WHERE Operator = :ident";
@@ 72-81 (lines=10) @@
69
                }
70
        }
71
72
       public function updateOperator($ident,$correct_ident,$source) {
73
                $query = "UPDATE translation SET Operator_correct = :correct_ident,Source = :source WHERE Operator = :ident";
74
                $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source);
75
                 try {
76
                        $sth = $this->db->prepare($query);
77
                        $sth->execute($query_values);
78
                } catch(PDOException $e) {
79
                        return "error : ".$e->getMessage();
80
                }
81
        }
82
        
83
        public function checkTranslation($ident,$web = false) {
84
    	    global $globalTranslationSources, $globalTranslationFetch;

require/class.Stats.php 1 location

@@ 706-715 (lines=10) @@
703
                        return "error : ".$e->getMessage();
704
                }
705
        }
706
	public function addStatFlight($type,$date_name,$cnt) {
707
                $query = "INSERT INTO stats_flight (stats_type,flight_date,cnt) VALUES (:type,:flight_date,:cnt)";
708
                $query_values = array(':type' => $type,':flight_date' => $date_name,':cnt' => $cnt);
709
                 try {
710
                        $sth = $this->db->prepare($query);
711
                        $sth->execute($query_values);
712
                } catch(PDOException $e) {
713
                        return "error : ".$e->getMessage();
714
                }
715
        }
716
	public function addStatAircraftRegistration($registration,$cnt,$aircraft_icao = '') {
717
		global $globalDBdriver;
718
		if ($globalDBdriver == 'mysql') {