Zeile 144 | Zeile 144 |
---|
} }
|
} }
|
| $security_check = false; $templatecache = array();
|
foreach($templates as $template) {
|
foreach($templates as $template) {
|
// PostgreSQL causes apache to stop sending content sometimes and // causes the page to stop loading during many queries all at one time if($db->engine == "pgsql") { echo " "; flush(); } $new_template = array(
| if(check_template($template['value'])) { $security_check = true; break; }
$templatecache[] = array(
|
"title" => $db->escape_string($template['attributes']['name']), "template" => $db->escape_string($template['value']), "sid" => $db->escape_string($sid), "version" => $db->escape_string($template['attributes']['version']), "dateline" => TIME_NOW );
|
"title" => $db->escape_string($template['attributes']['name']), "template" => $db->escape_string($template['value']), "sid" => $db->escape_string($sid), "version" => $db->escape_string($template['attributes']['version']), "dateline" => TIME_NOW );
|
$db->insert_query("templates", $new_template);
| |
}
|
}
|
| if($security_check == true) { return -4; }
foreach($templatecache as $template) { // PostgreSQL causes apache to stop sending content sometimes and // causes the page to stop loading during many queries all at one time if($db->engine == "pgsql") { echo " "; flush(); }
$db->insert_query("templates", $template); }
|
$properties['templateset'] = $sid;
|
$properties['templateset'] = $sid;
|
}
| }
|
// Not overriding an existing theme if(!$options['tid'])
| // Not overriding an existing theme if(!$options['tid'])
|
Zeile 193 | Zeile 210 |
---|
foreach($theme['stylesheets']['stylesheet'] as $stylesheet) {
|
foreach($theme['stylesheets']['stylesheet'] as $stylesheet) {
|
| if(substr($stylesheet['attributes']['name'], -4) != ".css") { continue; }
|
if(!$stylesheet['attributes']['lastmodified']) { $stylesheet['attributes']['lastmodified'] = TIME_NOW;
| if(!$stylesheet['attributes']['lastmodified']) { $stylesheet['attributes']['lastmodified'] = TIME_NOW;
|
Zeile 524 | Zeile 546 |
---|
$class_name = trim($class_name); $comments = $matches[1][$i]; preg_match_all("#Name:(.*)#i", $comments, $name_match);
|
$class_name = trim($class_name); $comments = $matches[1][$i]; preg_match_all("#Name:(.*)#i", $comments, $name_match);
|
if($name_match[count($name_match)-1][0])
| if(isset($name_match[count($name_match)-1][0]))
|
{ $name = trim($name_match[count($name_match)-1][0]); } preg_match_all("#Description:(.*)#i", $comments, $description_match);
|
{ $name = trim($name_match[count($name_match)-1][0]); } preg_match_all("#Description:(.*)#i", $comments, $description_match);
|
if($description_match[count($description_match)-1][0])
| if(isset($description_match[count($description_match)-1][0]))
|
{ $description = trim($description_match[count($description_match)-1][0]); } $class_id = md5($class_name);
|
{ $description = trim($description_match[count($description_match)-1][0]); } $class_id = md5($class_name);
|
if($already_parsed[$class_id])
| if(isset($already_parsed[$class_id]))
|
{ $already_parsed[$class_id]++; $class_id .= "_".$already_parsed[$class_id];
| { $already_parsed[$class_id]++; $class_id .= "_".$already_parsed[$class_id];
|
Zeile 869 | Zeile 891 |
---|
} }
|
} }
|
if(!is_array($themes_by_parent[$tid]))
| if(!isset($themes_by_parent[$tid]))
|
{ return false; }
| { return false; }
|
Zeile 1019 | Zeile 1041 |
---|
if($theme['tid'] > 1) { $popup->add_item($lang->edit_theme, "index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
if($theme['tid'] > 1) { $popup->add_item($lang->edit_theme, "index.php?module=style-themes&action=edit&tid={$theme['tid']}");
|
$theme['name'] = "<a href=\"index.php?module=style-themes&action=edit&tid={$theme['tid']}\">{$theme['name']}</a>";
| $theme['name'] = "<a href=\"index.php?module=style-themes&action=edit&tid={$theme['tid']}\">".htmlspecialchars_uni($theme['name'])."</a>";
|
// We must have at least the master and 1 other active theme if($theme_cache['num_themes'] > 2)
| // We must have at least the master and 1 other active theme if($theme_cache['num_themes'] > 2)
|