Completed
Push — master ( b282d7...87953e )
by Yannick
08:34
created
require/class.Stats.php 1 patch
Doc Comments   +31 added lines patch added patch discarded remove patch
@@ -17,6 +17,10 @@  discard block
 block discarded – undo
17 17
 		$this->db = $Connection->db();
18 18
         }
19 19
               
20
+	/**
21
+	 * @param string $type
22
+	 * @param string $stats_date
23
+	 */
20 24
 	public function addLastStatsUpdate($type,$stats_date) {
21 25
                 $query = "DELETE FROM config WHERE name = :type;
22 26
             		INSERT INTO config (name,value) VALUES (:type,:stats_date);";
@@ -878,6 +882,11 @@  discard block
 block discarded – undo
878 882
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
879 883
                 return $all;
880 884
         }
885
+
886
+	/**
887
+	 * @param string $type
888
+	 * @param string $year
889
+	 */
881 890
 	public function getSumStats($type,$year,$stats_airline = '',$filter_name = '',$month = '') {
882 891
 		if ($filter_name == '') $filter_name = $this->filter_name;
883 892
     		global $globalArchiveMonths, $globalDBdriver;
@@ -1022,6 +1031,10 @@  discard block
 block discarded – undo
1022 1031
                 else return 0;
1023 1032
         }
1024 1033
 
1034
+	/**
1035
+	 * @param string $type
1036
+	 * @param string $stats_date
1037
+	 */
1025 1038
 	public function addStat($type,$cnt,$stats_date,$stats_airline = '',$filter_name = '') {
1026 1039
 		global $globalDBdriver;
1027 1040
 		if ($filter_name == '') $filter_name = $this->filter_name;
@@ -1075,6 +1088,9 @@  discard block
 block discarded – undo
1075 1088
         }
1076 1089
         */
1077 1090
 
1091
+	/**
1092
+	 * @param string $stats_type
1093
+	 */
1078 1094
 	public function getStatsSource($stats_type,$year = '',$month = '',$day = '') {
1079 1095
 		global $globalDBdriver;
1080 1096
 		$query = "SELECT * FROM stats_source WHERE stats_type = :stats_type";
@@ -1118,6 +1134,9 @@  discard block
 block discarded – undo
1118 1134
 		return $all;
1119 1135
 	}
1120 1136
 
1137
+	/**
1138
+	 * @param string $stats_type
1139
+	 */
1121 1140
 	public function addStatSource($data,$source_name,$stats_type,$date) {
1122 1141
 		global $globalDBdriver;
1123 1142
 		if ($globalDBdriver == 'mysql') {
@@ -1133,6 +1152,10 @@  discard block
 block discarded – undo
1133 1152
                         return "error : ".$e->getMessage();
1134 1153
                 }
1135 1154
         }
1155
+
1156
+	/**
1157
+	 * @param string $type
1158
+	 */
1136 1159
 	public function addStatFlight($type,$date_name,$cnt,$stats_airline = '',$filter_name = '') {
1137 1160
                 $query = "INSERT INTO stats_flight (stats_type,flight_date,cnt,stats_airline,filter_name) VALUES (:type,:flight_date,:cnt,:stats_airline,:filter_name)";
1138 1161
                 $query_values = array(':type' => $type,':flight_date' => $date_name,':cnt' => $cnt, ':stats_airline' => $stats_airline,':filter_name' => $filter_name);
@@ -1399,6 +1422,10 @@  discard block
 block discarded – undo
1399 1422
                         return "error : ".$e->getMessage();
1400 1423
                 }
1401 1424
         }
1425
+
1426
+	/**
1427
+	 * @param string $type
1428
+	 */
1402 1429
 	public function deleteStatFlight($type) {
1403 1430
                 $query = "DELETE FROM stats_flight WHERE stats_type = :type";
1404 1431
                 $query_values = array(':type' => $type);
@@ -1409,6 +1436,10 @@  discard block
 block discarded – undo
1409 1436
                         return "error : ".$e->getMessage();
1410 1437
                 }
1411 1438
         }
1439
+
1440
+	/**
1441
+	 * @param string $type
1442
+	 */
1412 1443
 	public function deleteStatAirport($type) {
1413 1444
                 $query = "DELETE FROM stats_airport WHERE stats_type = :type";
1414 1445
                 $query_values = array(':type' => $type);
Please login to merge, or discard this patch.