@@ -6,6 +6,9 @@ discard block |
||
6 | 6 | public $dbs = array(); |
7 | 7 | public $latest_schema = 45; |
8 | 8 | |
9 | + /** |
|
10 | + * @param string $dbname |
|
11 | + */ |
|
9 | 12 | public function __construct($dbc = null,$dbname = null,$user = null,$pass = null) { |
10 | 13 | global $globalDBdriver, $globalNoDB; |
11 | 14 | if (isset($globalNoDB) && $globalNoDB === TRUE) { |
@@ -141,6 +144,9 @@ discard block |
||
141 | 144 | return true; |
142 | 145 | } |
143 | 146 | |
147 | + /** |
|
148 | + * @param string $table |
|
149 | + */ |
|
144 | 150 | public function tableExists($table) |
145 | 151 | { |
146 | 152 | global $globalDBdriver, $globalDBname; |
@@ -190,6 +196,11 @@ discard block |
||
190 | 196 | /* |
191 | 197 | * Check if index exist |
192 | 198 | */ |
199 | + |
|
200 | + /** |
|
201 | + * @param string $table |
|
202 | + * @param string $index |
|
203 | + */ |
|
193 | 204 | public function indexExists($table,$index) |
194 | 205 | { |
195 | 206 | global $globalDBdriver, $globalDBname; |
@@ -232,6 +243,10 @@ discard block |
||
232 | 243 | return $columns; |
233 | 244 | } |
234 | 245 | |
246 | + /** |
|
247 | + * @param string $table |
|
248 | + * @param string $column |
|
249 | + */ |
|
235 | 250 | public function getColumnType($table,$column) { |
236 | 251 | $select = $this->db->query('SELECT '.$column.' FROM '.$table); |
237 | 252 | $tomet = $select->getColumnMeta(0); |
@@ -242,6 +257,11 @@ discard block |
||
242 | 257 | * Check if a column name exist in a table |
243 | 258 | * @return Boolean column exist or not |
244 | 259 | */ |
260 | + |
|
261 | + /** |
|
262 | + * @param string $table |
|
263 | + * @param string $name |
|
264 | + */ |
|
245 | 265 | public function checkColumnName($table,$name) |
246 | 266 | { |
247 | 267 | global $globalDBdriver, $globalDBname; |
@@ -165,6 +165,10 @@ discard block |
||
165 | 165 | '\~' => 'TNC Stream SW'); |
166 | 166 | |
167 | 167 | |
168 | + /** |
|
169 | + * @param integer $n |
|
170 | + * @param integer $s |
|
171 | + */ |
|
168 | 172 | private function urshift($n, $s) { |
169 | 173 | return ($n >= 0) ? ($n >> $s) : |
170 | 174 | (($n & 0x7fffffff) >> $s) | |
@@ -565,6 +569,9 @@ discard block |
||
565 | 569 | socket_close($this->socket); |
566 | 570 | } |
567 | 571 | |
572 | + /** |
|
573 | + * @param string $data |
|
574 | + */ |
|
568 | 575 | public function send($data) { |
569 | 576 | global $globalDebug; |
570 | 577 | if ($this->connected === false) $this->connect(); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | /** |
15 | 15 | * Get SQL query part for filter used |
16 | 16 | * @param Array $filter the filter |
17 | - * @return Array the SQL part |
|
17 | + * @return string the SQL part |
|
18 | 18 | */ |
19 | 19 | public function getFilter($filter = array(),$where = false,$and = false) { |
20 | 20 | global $globalFilter, $globalStatsFilters, $globalFilterName; |
@@ -70,7 +70,7 @@ |
||
70 | 70 | /** |
71 | 71 | * Returns list of available locales |
72 | 72 | * |
73 | - * @return array |
|
73 | + * @return string[] |
|
74 | 74 | */ |
75 | 75 | public function listLocaleDir() |
76 | 76 | { |
@@ -58,6 +58,10 @@ discard block |
||
58 | 58 | } else return $ident; |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param string $correct_ident |
|
63 | + * @param string $source |
|
64 | + */ |
|
61 | 65 | public function addOperator($ident,$correct_ident,$source) { |
62 | 66 | $query = "INSERT INTO translation (Operator,Operator_correct,Source) VALUES (:ident,:correct_ident,:source)"; |
63 | 67 | $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source); |
@@ -69,6 +73,10 @@ discard block |
||
69 | 73 | } |
70 | 74 | } |
71 | 75 | |
76 | + /** |
|
77 | + * @param string $correct_ident |
|
78 | + * @param string $source |
|
79 | + */ |
|
72 | 80 | public function updateOperator($ident,$correct_ident,$source) { |
73 | 81 | $query = "UPDATE translation SET Operator_correct = :correct_ident,Source = :source WHERE Operator = :ident"; |
74 | 82 | $query_values = array(':ident' => $ident,':correct_ident' => $correct_ident, ':source' => $source); |