Skip to content

Commit

Permalink
Merge branch 'new_branch_name'
Browse files Browse the repository at this point in the history
  • Loading branch information
skinkie committed Jan 15, 2012
2 parents 5917d22 + e9016e5 commit ba767eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@
define ('WEBRESOLUTIONH', '360');

define ('EMERGENCY', false);

date_default_timezone_set('Europe/Amsterdam');
?>
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function dirtoselect($name, $dir, $active = '', $empty = false, $maxdate = 0, $e
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
if (!is_dir($dir.'/'.$file)) {
if ($file[0] != '.' && !is_dir($dir.'/'.$file)) {
if ($maxdate == 0 || (filectime($dir.'/'.$file) > $maxdate)) {
if ($extension == '' || (substr( $file, strlen( $file ) - strlen( $extension ) ) === $extension)) {
$templates[]=$file;
Expand Down
7 changes: 5 additions & 2 deletions template-toevoegen.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@
$dbh = new PDO(DATABASE, DB_USER, DB_PASSWORD);

if (active('category', 'newtemplate') != '') {
$param_newtemplate = active('category', 'newtemplate');
$stmt = $dbh->prepare('SELECT title FROM content_category WHERE content_category.id=:contentcategoryid');
$stmt->bindParam(':contentcategoryid', active('category', 'newtemplate'), PDO::PARAM_INT);
$stmt->bindParam(':contentcategoryid', $param_newtemplate, PDO::PARAM_INT);
$stmt->execute();
$qresult = $stmt->fetchAll();
}

$preview = '404';

if (isset($qresult[0])) {

$preview = checkandpreview($safebox=1, $width=269, $height=200, $format='png',
$preview = checkandpreview($safebox=1, $width=PREVIEWRESOLUTIONW, $height=PREVIEWRESOLUTIONH, $format='png',
active('title', 'newtemplate'), 'Laten we het eens zonder tekst doen.', '',
'default.xsl', $dir='', $filename=md5('default.xsl'.$qresult[0]['title'].active('title', 'newtemplate').active('photo', 'newtemplate').active('w', 'newtemplate').active('h', 'newtemplate').active('x', 'newtemplate').active('y', 'newtemplate')),
$qresult[0]['title'],
Expand Down

0 comments on commit ba767eb

Please sign in to comment.