@@ -1353,9 +1353,9 @@ discard block |
||
| 1353 | 1353 | id = %d |
| 1354 | 1354 | AND |
| 1355 | 1355 | lang = '%s'", |
| 1356 | - PMF_Db::getTablePrefix(), |
|
| 1357 | - $category_id, |
|
| 1358 | - $language); |
|
| 1356 | + PMF_Db::getTablePrefix(), |
|
| 1357 | + $category_id, |
|
| 1358 | + $language); |
|
| 1359 | 1359 | $result = $this->_config->getDb()->query($query); |
| 1360 | 1360 | if ($row = $this->_config->getDb()->fetchArray($result)) { |
| 1361 | 1361 | $translated[$languageCodes[strtoupper($language)]] = $row['name'].('' == $row['description'] ? '' : ' ('.$row['description'].')'); |
@@ -1614,8 +1614,8 @@ discard block |
||
| 1614 | 1614 | fd.lang = fcr.category_lang |
| 1615 | 1615 | ORDER BY |
| 1616 | 1616 | fcr.category_id, fd.id', |
| 1617 | - PMF_Db::getTablePrefix(), |
|
| 1618 | - PMF_Db::getTablePrefix()); |
|
| 1617 | + PMF_Db::getTablePrefix(), |
|
| 1618 | + PMF_Db::getTablePrefix()); |
|
| 1619 | 1619 | $result = $this->_config->getDb()->query($query); |
| 1620 | 1620 | |
| 1621 | 1621 | if ($this->_config->getDb()->numRows($result) > 0) { |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | if ($result) { |
| 240 | 240 | while ($row = $this->_config->getDb()->fetchArray($result)) { |
| 241 | 241 | $this->categoryName[$row['id']] = $row; |
| 242 | - $this->categories[] =& $this->categoryName[$row['id']]; |
|
| 243 | - $this->children[$row['parent_id']][$row['id']] =& $this->categoryName[$row['id']]; |
|
| 244 | - $this->owner[$row['id']] =& $row['user_id']; |
|
| 242 | + $this->categories[] = & $this->categoryName[$row['id']]; |
|
| 243 | + $this->children[$row['parent_id']][$row['id']] = & $this->categoryName[$row['id']]; |
|
| 244 | + $this->owner[$row['id']] = & $row['user_id']; |
|
| 245 | 245 | } |
| 246 | 246 | } |
| 247 | 247 | |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | $result = $this->_config->getDb()->query($query); |
| 347 | 347 | |
| 348 | 348 | while ($row = $this->_config->getDb()->fetchArray($result)) { |
| 349 | - $categories[] = (int) $row['id']; |
|
| 349 | + $categories[] = (int)$row['id']; |
|
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | return $categories; |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | $open = 0; |
| 667 | 667 | $this->expandAll(); |
| 668 | 668 | |
| 669 | - for ($y = 0;$y < $this->height(); $y = $this->getNextLineTree($y)) { |
|
| 669 | + for ($y = 0; $y < $this->height(); $y = $this->getNextLineTree($y)) { |
|
| 670 | 670 | list($hasChild, $categoryName, $parent, $description) = $this->getLineDisplay($y); |
| 671 | 671 | $level = $this->treeTab[$y]['level']; |
| 672 | 672 | $levelDiff = $open - $level; |
@@ -941,7 +941,7 @@ discard block |
||
| 941 | 941 | while ($row = $this->_config->getDb()->fetchObject($result)) { |
| 942 | 942 | $categories[$row->category_id] = array( |
| 943 | 943 | 'category_id' => $row->category_id, |
| 944 | - 'category_lang' => $row->category_lang, ); |
|
| 944 | + 'category_lang' => $row->category_lang,); |
|
| 945 | 945 | } |
| 946 | 946 | |
| 947 | 947 | return $categories; |
@@ -1248,7 +1248,7 @@ discard block |
||
| 1248 | 1248 | array('faqcategories' => 'parent_id'), |
| 1249 | 1249 | array('faqcategoryrelations' => 'category_id'), |
| 1250 | 1250 | array('faqcategory_group' => 'category_id'), |
| 1251 | - array('faqcategory_user' => 'category_id'), ); |
|
| 1251 | + array('faqcategory_user' => 'category_id'),); |
|
| 1252 | 1252 | |
| 1253 | 1253 | $result = true; |
| 1254 | 1254 | foreach ($tables as $pair) { |
@@ -1442,7 +1442,7 @@ discard block |
||
| 1442 | 1442 | if ($lang == $selected_lang) { |
| 1443 | 1443 | $output .= ' selected="selected"'; |
| 1444 | 1444 | } |
| 1445 | - $output .= '>'.$langname."</option>\n"; |
|
| 1445 | + $output .= '>'.$langname."</option>\n"; |
|
| 1446 | 1446 | } |
| 1447 | 1447 | } |
| 1448 | 1448 | |
@@ -248,8 +248,8 @@ |
||
| 248 | 248 | MAX(%s) AS current_id |
| 249 | 249 | FROM |
| 250 | 250 | %s', |
| 251 | - $id, |
|
| 252 | - $table); |
|
| 251 | + $id, |
|
| 252 | + $table); |
|
| 253 | 253 | |
| 254 | 254 | $result = $this->query($select); |
| 255 | 255 | |
@@ -102,10 +102,10 @@ discard block |
||
| 102 | 102 | private function setConnectionOptions($user, $passwd, $database) |
| 103 | 103 | { |
| 104 | 104 | $this->connectionOptions = array( |
| 105 | - 'UID' => $user, |
|
| 106 | - 'PWD' => $passwd, |
|
| 107 | - 'Database' => $database, |
|
| 108 | - 'CharacterSet' => 'UTF-8', ); |
|
| 105 | + 'UID' => $user, |
|
| 106 | + 'PWD' => $passwd, |
|
| 107 | + 'Database' => $database, |
|
| 108 | + 'CharacterSet' => 'UTF-8', ); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
@@ -262,8 +262,8 @@ discard block |
||
| 262 | 262 | max(%s) as current_id |
| 263 | 263 | FROM |
| 264 | 264 | %s', |
| 265 | - $id, |
|
| 266 | - $table); |
|
| 265 | + $id, |
|
| 266 | + $table); |
|
| 267 | 267 | |
| 268 | 268 | $result = $this->query($select); |
| 269 | 269 | sqlsrv_fetch($result); |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | 'UID' => $user, |
| 106 | 106 | 'PWD' => $passwd, |
| 107 | 107 | 'Database' => $database, |
| 108 | - 'CharacterSet' => 'UTF-8', ); |
|
| 108 | + 'CharacterSet' => 'UTF-8',); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | public function error() |
| 140 | 140 | { |
| 141 | 141 | if (!is_array($this->errors)) { |
| 142 | - $this->errors = array((string) $this->errors); |
|
| 142 | + $this->errors = array((string)$this->errors); |
|
| 143 | 143 | } |
| 144 | 144 | $message = ''; |
| 145 | 145 | foreach ($this->errors as $error) { |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | /* |
| 184 | 184 | * reduction factor for small font |
| 185 | 185 | */ |
| 186 | -define('K_SMALL_RATIO', 2 / 3); |
|
| 186 | +define('K_SMALL_RATIO', 2/3); |
|
| 187 | 187 | |
| 188 | 188 | require K_PATH_MAIN.'/tcpdf.php'; |
| 189 | 189 | |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | |
| 308 | 308 | // Set font |
| 309 | 309 | if (array_key_exists($PMF_LANG['metaLanguage'], $this->fontFiles)) { |
| 310 | - $this->currentFont = (string) $this->fontFiles[$PMF_LANG['metaLanguage']]; |
|
| 310 | + $this->currentFont = (string)$this->fontFiles[$PMF_LANG['metaLanguage']]; |
|
| 311 | 311 | } |
| 312 | 312 | } |
| 313 | 313 | |
@@ -82,13 +82,13 @@ |
||
| 82 | 82 | $faqdata = $this->faq->get(FAQ_QUERY_TYPE_EXPORT_XHTML, $categoryId, $downwards, $language); |
| 83 | 83 | $version = $this->_config->get('main.currentVersion'); |
| 84 | 84 | $comment = sprintf('XHTML output by phpMyFAQ %s | Date: %s', |
| 85 | - $version, |
|
| 86 | - PMF_Date::createIsoDate(date('YmdHis'))); |
|
| 85 | + $version, |
|
| 86 | + PMF_Date::createIsoDate(date('YmdHis'))); |
|
| 87 | 87 | |
| 88 | 88 | $this->xml->startDocument('1.0', 'utf-8'); |
| 89 | 89 | $this->xml->writeDtd('html', |
| 90 | - '-//W3C//DTD XHTML 1.0 Transitional//EN', |
|
| 91 | - 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'); |
|
| 90 | + '-//W3C//DTD XHTML 1.0 Transitional//EN', |
|
| 91 | + 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'); |
|
| 92 | 92 | $this->xml->startElement('html'); |
| 93 | 93 | $this->xml->writeAttribute('xmlns', 'http://www.w3.org/1999/xhtml'); |
| 94 | 94 | $this->xml->writeAttribute('xml:lang', $language); |
@@ -80,8 +80,8 @@ |
||
| 80 | 80 | $faqdata = $this->faq->get(FAQ_QUERY_TYPE_EXPORT_XML, $categoryId, $downwards, $language); |
| 81 | 81 | $version = $this->_config->get('main.currentVersion'); |
| 82 | 82 | $comment = sprintf('XML output by phpMyFAQ %s | Date: %s', |
| 83 | - $version, |
|
| 84 | - PMF_Date::createIsoDate(date('YmdHis'))); |
|
| 83 | + $version, |
|
| 84 | + PMF_Date::createIsoDate(date('YmdHis'))); |
|
| 85 | 85 | |
| 86 | 86 | $this->xml->startDocument('1.0', 'utf-8', 'yes'); |
| 87 | 87 | $this->xml->writeComment($comment); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | WHERE |
| 217 | 217 | id = %d AND lang = '%s'", |
| 218 | 218 | PMF_Db::getTablePrefix(), |
| 219 | - (int) $id, |
|
| 219 | + (int)$id, |
|
| 220 | 220 | $this->config->getLanguage()->getLanguage() |
| 221 | 221 | ); |
| 222 | 222 | |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | PMF_Db::getTablePrefix(), |
| 292 | 292 | PMF_String::htmlspecialchars($this->item), |
| 293 | 293 | PMF_String::htmlspecialchars($this->definition), |
| 294 | - (int) $id, |
|
| 294 | + (int)$id, |
|
| 295 | 295 | $this->config->getLanguage()->getLanguage() |
| 296 | 296 | ); |
| 297 | 297 | |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | WHERE |
| 318 | 318 | id = %d AND lang = '%s'", |
| 319 | 319 | PMF_Db::getTablePrefix(), |
| 320 | - (int) $id, |
|
| 320 | + (int)$id, |
|
| 321 | 321 | $this->config->getLanguage()->getLanguage() |
| 322 | 322 | ); |
| 323 | 323 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $numFaqs = $this->Category->getNumberOfRecordsOfCategory(); |
| 54 | 54 | |
| 55 | 55 | if ($numCategories > 0) { |
| 56 | - for ($y = 0;$y < $numCategories; $y = $this->Category->getNextLineTree($y)) { |
|
| 56 | + for ($y = 0; $y < $numCategories; $y = $this->Category->getNextLineTree($y)) { |
|
| 57 | 57 | list($hasChild, $name, $categoryId, $description, $active) = $this->Category->getLineDisplay($y); |
| 58 | 58 | |
| 59 | 59 | if (!$active) { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $this->Category->expandAll(); |
| 159 | 159 | |
| 160 | 160 | if ($numCategories > 0) { |
| 161 | - for ($y = 0;$y < $this->Category->height(); $y = $this->Category->getNextLineTree($y)) { |
|
| 161 | + for ($y = 0; $y < $this->Category->height(); $y = $this->Category->getNextLineTree($y)) { |
|
| 162 | 162 | list($hasChild, $categoryName, $parent, $description, $active) = $this->Category->getLineDisplay($y); |
| 163 | 163 | |
| 164 | 164 | if (!$active) { |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | { |
| 254 | 254 | $categories = ''; |
| 255 | 255 | foreach ($this->Category->categories as $cat) { |
| 256 | - if (0 === (int) $cat['parent_id']) { |
|
| 256 | + if (0 === (int)$cat['parent_id']) { |
|
| 257 | 257 | $categories .= sprintf( |
| 258 | 258 | '<li><a href="?action=show&cat=%d">%s</a></li>', |
| 259 | 259 | $cat['id'], |