Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1914)
+++ branches/2.8.x/CHANGELOG	(revision 1915)
@@ -12,6 +12,8 @@
 ===============================================================================
 
 
+07 Jun-2013 Build 1915 Dietmar Woellbrink (Luisehahne)
+! recoding /modules/code/add.php with exception
 07 Jun-2013 Build 1914 Dietmar Woellbrink (Luisehahne)
 ! /admin/pages/  add/change to new Translate class
   add a default.ini with a list of protected basenames, 
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1914)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1915)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1914');
+if(!defined('REVISION')) define('REVISION', '1915');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/modules/code/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/code/upgrade.php	(revision 1914)
+++ branches/2.8.x/wb/modules/code/upgrade.php	(revision 1915)
@@ -4,10 +4,10 @@
  * @category        modules
  * @package         code
  * @author          WebsiteBaker Project
- * @copyright       2009-2012, WebsiteBaker Org. e.V.
- * @link            http://www.websitebaker2.org/
+ * @copyright       2009-2013, WebsiteBaker Org. e.V.
+ * @link            http://www.websitebaker.org/
  * @license         http://www.gnu.org/licenses/gpl.html
- * @platform        WebsiteBaker 2.8.x
+ * @platform        WebsiteBaker 2.8.4
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id: upgrade.php 1428 2011-02-07 04:55:31Z Luisehahne $
  * @filesource      $HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/code/upgrade.php $
Index: branches/2.8.x/wb/modules/code/add.php
===================================================================
--- branches/2.8.x/wb/modules/code/add.php	(revision 1914)
+++ branches/2.8.x/wb/modules/code/add.php	(revision 1915)
@@ -4,13 +4,13 @@
  * @category        modules
  * @package         code
  * @author          WebsiteBaker Project
- * @copyright       2009-2011, Website Baker Org. e.V.
- * @link			http://www.websitebaker2.org/
+ * @copyright       2009-2013, WebsiteBaker Org. e.V.
+ * @link            http://www.websitebaker.org/
  * @license         http://www.gnu.org/licenses/gpl.html
- * @platform        WebsiteBaker 2.8.x
+ * @platform        WebsiteBaker 2.8.4
  * @requirements    PHP 5.2.2 and higher
  * @version         $Id: save.php 1425 2011-02-03 23:16:12Z Luisehahne $
- * @filesource		$HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/code/save.php $
+ * @filesource      $HeadURL: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/code/save.php $
  * @lastmodified    $Date: 2011-02-04 00:16:12 +0100 (Fr, 04. Feb 2011) $
  *
  */
@@ -22,5 +22,14 @@
 	throw new IllegalFileException();
 } else {
 // Insert an extra row into the database
-$database->query("INSERT INTO ".TABLE_PREFIX."mod_code (page_id,section_id) VALUES ('$page_id','$section_id')");
+//$database->query("INSERT INTO ".TABLE_PREFIX."mod_code (page_id,section_id) VALUES ('$page_id','$section_id')");
+	$database = WbDatabase::getInstance();
+	try {
+		$sql = 'INSERT INTO `'.TABLE_PREFIX.'mod_code` '
+		     . 'SET `section_id`='.$section_id.', '
+		     .     '`page_id`='.$page_id.' ';
+		$database->query($sql);
+	} catch(WbDatabaseException $e) {
+		$sError = $database->get_error();
+	}
 }
