- $default_skintypes = $this->getDefaultTypes();
- $query = "SELECT stype FROM %s WHERE sdesc=%d;";
- $query = sprintf($query, sql_table('skin'), (integer) $this->id);
-
- /* NOTE: force to put default types in the beginning */
- $in_default = array();
- $no_default = array();
-
- $res = sql_query($query);
- while ( $row = sql_fetch_array($res) )
- {
- if ( !array_key_exists($row['stype'], $default_skintypes) )
- {
- $no_default[$row['stype']] = FALSE;
+ $default_skintypes = $this->getDefaultTypes();\r
+ $query = "SELECT stype FROM %s WHERE sdesc=%d;";\r
+ $query = sprintf($query, sql_table('skin'), (integer) $this->id);\r
+ \r
+ /* NOTE: force to put default types in the beginning */\r
+ $in_default = array();\r
+ $no_default = array();\r
+ \r
+ $res = sql_query($query);\r
+ while ( $row = sql_fetch_array($res) )\r
+ {\r
+ if ( !array_key_exists($row['stype'], $default_skintypes) )\r
+ {\r
+ $no_default[$row['stype']] = FALSE;\r
+ }\r
+ else\r
+ {\r
+ $in_default[$row['stype']] = $default_skintypes[$row['stype']];\r
+ }\r
+ }\r
+ \r
+ return array_merge($in_default, $no_default);\r