summaryrefslogtreecommitdiff
path: root/inc/mod/pages.php
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-05-19 20:46:05 +1000
committerMichael Save <savetheinternet@tinyboard.org>2012-05-19 20:46:05 +1000
commit93c3ceb04d4d7113970e947b67d2d5b52d31d081 (patch)
tree30e2f83b14ae35ce316dad9bc29aee48e8f5e369 /inc/mod/pages.php
parent970c6cd95bfbb39454531f3990863d19cfbfe0ba (diff)
tiny cleanup
Diffstat (limited to 'inc/mod/pages.php')
-rw-r--r--inc/mod/pages.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 7f78cd0b..13d63a91 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -741,7 +741,7 @@ function mod_move($originBoard, $postID) {
// create the new thread
$newID = post($post);
- if($post['has_file']) {
+ if ($post['has_file']) {
// copy image
$clone($file_src, sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $post['file']);
$clone($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
@@ -756,11 +756,11 @@ function mod_move($originBoard, $postID) {
$replies = array();
- while($post = $query->fetch()) {
+ while ($post = $query->fetch()) {
$post['mod'] = true;
$post['thread'] = $newID;
- if($post['file']) {
+ if ($post['file']) {
$post['has_file'] = true;
$post['width'] = &$post['filewidth'];
$post['height'] = &$post['fileheight'];
@@ -778,15 +778,15 @@ function mod_move($originBoard, $postID) {
openBoard($targetBoard);
- foreach($replies as &$post) {
+ foreach ($replies as &$post) {
$query = prepare('SELECT `target` FROM `cites` WHERE `target_board` = :board AND `board` = :board AND `post` = :post');
$query->bindValue(':board', $originBoard);
$query->bindValue(':post', $post['id'], PDO::PARAM_INT);
$query->execute() or error(db_error($qurey));
// correct >>X links
- while($cite = $query->fetch(PDO::FETCH_ASSOC)) {
- if(isset($newIDs[$cite['target']])) {
+ while ($cite = $query->fetch(PDO::FETCH_ASSOC)) {
+ if (isset($newIDs[$cite['target']])) {
$post['body_nomarkup'] = preg_replace(
'/(>>(>\/' . preg_quote($originBoard, '/') . '\/)?)' . preg_quote($cite['target'], '/') . '/',
'>>' . $newIDs[$cite['target']],
@@ -804,13 +804,13 @@ function mod_move($originBoard, $postID) {
// insert reply
$newIDs[$post['id']] = $newPostID = post($post);
- if($post['has_file']) {
+ if ($post['has_file']) {
// copy image
$clone($post['file_src'], sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $post['file']);
$clone($post['file_thumb'], sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
}
- foreach($post['tracked_cites'] as $cite) {
+ foreach ($post['tracked_cites'] as $cite) {
$query = prepare('INSERT INTO `cites` VALUES (:board, :post, :target_board, :target)');
$query->bindValue(':board', $board['uri']);
$query->bindValue(':post', $newPostID, PDO::PARAM_INT);
@@ -830,7 +830,7 @@ function mod_move($originBoard, $postID) {
// return to original board
openBoard($originBoard);
- if($shadow) {
+ if ($shadow) {
// lock old thread
$query = prepare(sprintf('UPDATE `posts_%s` SET `locked` = 1 WHERE `id` = :id', $originBoard));
$query->bindValue(':id', $postID, PDO::PARAM_INT);