Browse Source

Error handling

tags/v0.9
Savetheinternet 13 years ago
parent
commit
4754493e53
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      inc/functions.php

+ 2
- 2
inc/functions.php View File

@@ -79,7 +79,7 @@
if(file_exists($filename)) $md5 = md5_file($filename);
$content['pages'] = $pages;
file_put_contents($filename, Element('index.html', $content)) or error("Couldn't write to file.");
@file_put_contents($filename, Element('index.html', $content)) or error("Couldn't write to file.");
if(isset($md5) && $md5 == md5_file($filename)) {
break;
@@ -189,7 +189,7 @@
} else {
$thread->add(new Post($post['id'], $thread->id, $post['subject'], $post['email'], $post['name'], $post['trip'], $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'], $post['filename']));
}
file_put_contents(DIR_RES . $id . '.html', Element('thread.html', Array('button'=>BUTTON_REPLY, 'board'=>$board, 'body'=>$thread->build(), 'post_url' => POST_URL, 'index' => ROOT, 'id' => $id))) or error("Couldn't write to file.");
@file_put_contents(DIR_RES . $id . '.html', Element('thread.html', Array('button'=>BUTTON_REPLY, 'board'=>$board, 'body'=>$thread->build(), 'post_url' => POST_URL, 'index' => ROOT, 'id' => $id))) or error("Couldn't write to file.");
}
mysql_free_result($query);
}


Loading…
Cancel
Save