Completed
Push — master ( 55595d...553331 )
by Yannick
07:24
created
require/class.Stats.php 1 patch
Doc Comments   +35 added lines patch added patch discarded remove patch
@@ -18,6 +18,10 @@  discard block
 block discarded – undo
18 18
 		$this->db = $Connection->db();
19 19
         }
20 20
               
21
+	/**
22
+	 * @param string $type
23
+	 * @param string $stats_date
24
+	 */
21 25
 	public function addLastStatsUpdate($type,$stats_date) {
22 26
                 $query = "DELETE FROM config WHERE name = :type;
23 27
             		INSERT INTO config (name,value) VALUES (:type,:stats_date);";
@@ -961,6 +965,10 @@  discard block
 block discarded – undo
961 965
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
962 966
                 return $all;
963 967
         }
968
+
969
+	/**
970
+	 * @param string $type
971
+	 */
964 972
 	public function deleteStatsByType($type,$stats_airline = '', $filter_name = '') {
965 973
 		if ($filter_name == '') $filter_name = $this->filter_name;
966 974
                 $query = "DELETE FROM stats WHERE stats_type = :type AND stats_airline = :stats_airline AND filter_name = :filter_name";
@@ -974,6 +982,11 @@  discard block
 block discarded – undo
974 982
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
975 983
                 return $all;
976 984
         }
985
+
986
+	/**
987
+	 * @param string $type
988
+	 * @param string $year
989
+	 */
977 990
 	public function getSumStats($type,$year,$stats_airline = '',$filter_name = '',$month = '') {
978 991
 		if ($filter_name == '') $filter_name = $this->filter_name;
979 992
     		global $globalArchiveMonths, $globalDBdriver;
@@ -1118,6 +1131,10 @@  discard block
 block discarded – undo
1118 1131
                 else return 0;
1119 1132
         }
1120 1133
 
1134
+	/**
1135
+	 * @param string $type
1136
+	 * @param string $stats_date
1137
+	 */
1121 1138
 	public function addStat($type,$cnt,$stats_date,$stats_airline = '',$filter_name = '') {
1122 1139
 		global $globalDBdriver;
1123 1140
 		if ($filter_name == '') $filter_name = $this->filter_name;
@@ -1171,6 +1188,9 @@  discard block
 block discarded – undo
1171 1188
         }
1172 1189
         */
1173 1190
 
1191
+	/**
1192
+	 * @param string $stats_type
1193
+	 */
1174 1194
 	public function getStatsSource($stats_type,$year = '',$month = '',$day = '') {
1175 1195
 		global $globalDBdriver;
1176 1196
 		$query = "SELECT * FROM stats_source WHERE stats_type = :stats_type";
@@ -1214,6 +1234,9 @@  discard block
 block discarded – undo
1214 1234
 		return $all;
1215 1235
 	}
1216 1236
 
1237
+	/**
1238
+	 * @param string $stats_type
1239
+	 */
1217 1240
 	public function addStatSource($data,$source_name,$stats_type,$date) {
1218 1241
 		global $globalDBdriver;
1219 1242
 		if ($globalDBdriver == 'mysql') {
@@ -1229,6 +1252,10 @@  discard block
 block discarded – undo
1229 1252
                         return "error : ".$e->getMessage();
1230 1253
                 }
1231 1254
         }
1255
+
1256
+	/**
1257
+	 * @param string $type
1258
+	 */
1232 1259
 	public function addStatFlight($type,$date_name,$cnt,$stats_airline = '',$filter_name = '') {
1233 1260
                 $query = "INSERT INTO stats_flight (stats_type,flight_date,cnt,stats_airline,filter_name) VALUES (:type,:flight_date,:cnt,:stats_airline,:filter_name)";
1234 1261
                 $query_values = array(':type' => $type,':flight_date' => $date_name,':cnt' => $cnt, ':stats_airline' => $stats_airline,':filter_name' => $filter_name);
@@ -1495,6 +1522,10 @@  discard block
 block discarded – undo
1495 1522
                         return "error : ".$e->getMessage();
1496 1523
                 }
1497 1524
         }
1525
+
1526
+	/**
1527
+	 * @param string $type
1528
+	 */
1498 1529
 	public function deleteStatFlight($type) {
1499 1530
                 $query = "DELETE FROM stats_flight WHERE stats_type = :type";
1500 1531
                 $query_values = array(':type' => $type);
@@ -1505,6 +1536,10 @@  discard block
 block discarded – undo
1505 1536
                         return "error : ".$e->getMessage();
1506 1537
                 }
1507 1538
         }
1539
+
1540
+	/**
1541
+	 * @param string $type
1542
+	 */
1508 1543
 	public function deleteStatAirport($type) {
1509 1544
                 $query = "DELETE FROM stats_airport WHERE stats_type = :type";
1510 1545
                 $query_values = array(':type' => $type);
Please login to merge, or discard this patch.