From cce8b3955d5df03a6adca5e5e11d2bef039cc917 Mon Sep 17 00:00:00 2001 From: Savetheinternet Date: Wed, 23 Nov 2011 21:44:22 +1100 Subject: [PATCH] compatibility with >= v0.9.4 --- README.md | 6 +++--- kusabax.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 162a3787..8c5d9eee 100755 --- a/README.md +++ b/README.md @@ -6,10 +6,10 @@ This script pulls board information, posts and images from an already existing [ [k]: http://kusabax.cultnet.net/ ## Requirements - 1. [Tinyboard][o] >= v0.9.2 + 1. [Tinyboard][o] >= v0.9.4 ## Use - 1. Install Tinyboard (>= v0.9.2) normally. + 1. Install Tinyboard (>= v0.9.4) normally. 2. Download and place `kusabax.php` in the root folder of Tinyboard. 3. Edit the script and fill in your Kusaba X configuration. You can find KU_RANDOMSEED from Kusaba X's config.php file. 4. Run the script in a web browser. @@ -24,4 +24,4 @@ Visit the Tinyboard development wiki at for help. ## License See [LICENSE.md][l] for the license. -[l]: http://github.com/savetheinternet/Tinyboard/blob/master/LICENSE.md \ No newline at end of file +[l]: http://github.com/savetheinternet/Tinyboard/blob/master/LICENSE.md diff --git a/kusabax.php b/kusabax.php index b2f6322f..eed12e0a 100755 --- a/kusabax.php +++ b/kusabax.php @@ -74,7 +74,7 @@ // Trick Tinyboard into opening the KusabaX databse instead $__temp = $config['db']; $config['db'] = $kusabaxc['db']; - sql_open(); + // Get databse link $kusabax = $pdo; // Clear @@ -83,7 +83,6 @@ // Open Tinyboard database $config['db'] = $__temp; unset($__temp); - sql_open(); $k_query = $kusabax->query('SELECT * FROM `' . $kusabaxc['db']['prefix'] . 'boards`'); $boards = listBoards(); @@ -133,7 +132,7 @@ $log[] = 'Replicating post ' . $post['id'] . ' on /' . $board . '/'; - $query = prepare(sprintf("INSERT INTO `posts_%s` VALUES (:id, :thread, :subject, :email, :name, :trip, :capcode, :body, :time, :bump, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked, :embed)", $board)); + $query = prepare(sprintf("INSERT INTO `posts_%s` VALUES (:id, :thread, :subject, :email, :name, :trip, :capcode, :body, :time, :bump, :thumb, :thumbwidth, :thumbheight, :file, :width, :height, :filesize, :filename, :filehash, :password, :ip, :sticky, :locked, 0, :embed)", $board)); // Post ID $query->bindValue(':id', $post['id'], PDO::PARAM_INT); @@ -272,4 +271,5 @@ $page['body'] .= '

'; echo Element('page.html', $page); -?> \ No newline at end of file + +