@@ -174,6 +174,10 @@ |
||
| 174 | 174 | '\|' => 'TNC Stream SW', |
| 175 | 175 | '\~' => 'TNC Stream SW'); |
| 176 | 176 | |
| 177 | + /** |
|
| 178 | + * @param integer $n |
|
| 179 | + * @param integer $s |
|
| 180 | + */ |
|
| 177 | 181 | private function urshift($n, $s) { |
| 178 | 182 | return ($n >= 0) ? ($n >> $s) : |
| 179 | 183 | (($n & 0x7fffffff) >> $s) | |
@@ -6,6 +6,9 @@ discard block |
||
| 6 | 6 | public $dbs = array(); |
| 7 | 7 | public $latest_schema = 50; |
| 8 | 8 | |
| 9 | + /** |
|
| 10 | + * @param string $dbname |
|
| 11 | + */ |
|
| 9 | 12 | public function __construct($dbc = null,$dbname = null,$user = null,$pass = null) { |
| 10 | 13 | global $globalNoDB; |
| 11 | 14 | if (isset($globalNoDB) && $globalNoDB === TRUE) { |
@@ -142,6 +145,9 @@ discard block |
||
| 142 | 145 | return true; |
| 143 | 146 | } |
| 144 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $table |
|
| 150 | + */ |
|
| 145 | 151 | public function tableExists($table) |
| 146 | 152 | { |
| 147 | 153 | global $globalDBdriver, $globalDBname; |
@@ -192,6 +198,11 @@ discard block |
||
| 192 | 198 | /* |
| 193 | 199 | * Check if index exist |
| 194 | 200 | */ |
| 201 | + |
|
| 202 | + /** |
|
| 203 | + * @param string $table |
|
| 204 | + * @param string $index |
|
| 205 | + */ |
|
| 195 | 206 | public function indexExists($table,$index) |
| 196 | 207 | { |
| 197 | 208 | global $globalDBdriver, $globalDBname; |
@@ -234,6 +245,10 @@ discard block |
||
| 234 | 245 | return $columns; |
| 235 | 246 | } |
| 236 | 247 | |
| 248 | + /** |
|
| 249 | + * @param string $table |
|
| 250 | + * @param string $column |
|
| 251 | + */ |
|
| 237 | 252 | public function getColumnType($table,$column) { |
| 238 | 253 | $select = $this->db->query('SELECT '.$column.' FROM '.$table); |
| 239 | 254 | $tomet = $select->getColumnMeta(0); |
@@ -244,6 +259,11 @@ discard block |
||
| 244 | 259 | * Check if a column name exist in a table |
| 245 | 260 | * @return Boolean column exist or not |
| 246 | 261 | */ |
| 262 | + |
|
| 263 | + /** |
|
| 264 | + * @param string $table |
|
| 265 | + * @param string $name |
|
| 266 | + */ |
|
| 247 | 267 | public function checkColumnName($table,$name) |
| 248 | 268 | { |
| 249 | 269 | global $globalDBdriver, $globalDBname; |
@@ -190,12 +190,20 @@ |
||
| 190 | 190 | return 1; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | + /** |
|
| 194 | + * @param double $lat |
|
| 195 | + * @param integer $isodd |
|
| 196 | + */ |
|
| 193 | 197 | private function cprN($lat,$isodd) { |
| 194 | 198 | $nl = $this->cprNL($lat) - $isodd; |
| 195 | 199 | if ($nl > 1) return $nl; |
| 196 | 200 | else return 1; |
| 197 | 201 | } |
| 198 | 202 | |
| 203 | + /** |
|
| 204 | + * @param string $msg |
|
| 205 | + * @param string $bin |
|
| 206 | + */ |
|
| 199 | 207 | private function parityCheck($msg, $bin) { |
| 200 | 208 | $modes_checksum_table = array( |
| 201 | 209 | 0x3935ea, 0x1c9af5, 0xf1b77e, 0x78dbbf, 0xc397db, 0x9e31e9, 0xb0e2f0, 0x587178, |