"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/css.php" between
mybb_1819.zip and mybb_1820.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

css.php  (mybb_1819):css.php  (mybb_1820)
skipping to change at line 18 skipping to change at line 18
* *
*/ */
define("IN_MYBB", 1); define("IN_MYBB", 1);
define("NO_ONLINE", 1); define("NO_ONLINE", 1);
define('THIS_SCRIPT', 'css.php'); define('THIS_SCRIPT', 'css.php');
require_once "./inc/init.php"; require_once "./inc/init.php";
require_once MYBB_ROOT . $config['admin_dir'] . '/inc/functions_themes.php'; require_once MYBB_ROOT . $config['admin_dir'] . '/inc/functions_themes.php';
$stylesheet = $mybb->get_input('stylesheet', MyBB::INPUT_INT); $stylesheets = $mybb->get_input('stylesheet', MyBB::INPUT_ARRAY);
if($stylesheet) if(!empty($stylesheets))
{ {
$options = array( $stylesheet_list = implode(', ', array_map('intval', $stylesheets));
"limit" => 1
);
$query = $db->simple_select("themestylesheets", "stylesheet", "sid=".$sty
lesheet, $options);
$stylesheet = $db->fetch_field($query, "stylesheet");
$plugins->run_hooks("css_start"); $content = '';
$prefix = TABLE_PREFIX;
if(!empty($mybb->settings['minifycss'])) switch($db->type)
{ {
$stylesheet = minify_stylesheet($stylesheet); case 'pgsql':
case 'sqlite':
$sql = <<<SQL
SELECT stylesheet FROM {$prefix}themestylesheets
WHERE sid IN ({$stylesheet_list})
ORDER BY CASE sid
SQL;
$i = 0;
foreach($stylesheets as $sid)
{
$sid = (int) $sid;
$sql .= "WHEN {$sid} THEN {$i}\n";
$i++;
}
$sql .= 'END;';
break;
default:
$sql = <<<SQL
SELECT stylesheet FROM {$prefix}themestylesheets
WHERE sid IN ({$stylesheet_list})
ORDER BY FIELD(sid, {$stylesheet_list});
SQL;
break;
} }
$plugins->run_hooks("css_end"); $query = $db->query($sql);
header("Content-type: text/css"); while($row = $db->fetch_array($query))
echo $stylesheet; {
$stylesheet = $row['stylesheet'];
$plugins->run_hooks('css_start', $stylesheet);
if(!empty($mybb->settings['minifycss']))
{
$stylesheet = minify_stylesheet($stylesheet);
}
$plugins->run_hooks('css_end', $stylesheet);
$content .= $stylesheet;
}
header('Content-type: text/css');
echo $content;
} }
exit; exit;
 End of changes. 8 change blocks. 
14 lines changed or deleted 51 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)