Index: /extensions/Copyrights/TODO
===================================================================
--- /extensions/Copyrights/TODO	(revision 11674)
+++ /extensions/Copyrights/TODO	(revision 11675)
@@ -6,3 +6,3 @@
 === Bugs ===
 -	We don't check if the CR url has 'http://' (or is this a TODO?)
--	Go to "unit mode", click "information", and you wont see the copyright...
+-	Modify php, the copyrights select box is aligned center, and has a weird height, everythings works though
Index: /extensions/Copyrights/admin.php
===================================================================
--- /extensions/Copyrights/admin.php	(revision 11674)
+++ /extensions/Copyrights/admin.php	(revision 11675)
@@ -63,5 +63,5 @@
 
     if ($counter != 0) { // The copyright exists already
-      array_push($page['errors'], l10n('This copyright already exists'));
+      array_push($page['errors'], l10n('This copyright already exists.'));
     } else { // The copyright did not yet exist
       // Compose a query to insert the copyright
Index: /extensions/Copyrights/image.php
===================================================================
--- /extensions/Copyrights/image.php	(revision 11674)
+++ /extensions/Copyrights/image.php	(revision 11675)
@@ -1,7 +1,3 @@
 <?php
-/*
-This php file will insert the names of the copyrights into the images description,
-so you can see below the image what copyright it has.
-*/
 
 // Add a prefilter
@@ -38,14 +34,10 @@
 function copyrights_add_image_vars_to_template()
 {
-	// For as far as i know i only need the $prefixtable, $page and $template
-	//global $conf, $page, $template, $tab, $cit, $nbr, $prefixeTable;
 	global $page, $template, $prefixeTable;
-	//load_language('plugin.lang', ADDINFO_PATH);
-	//load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
 
 	// Show block only on the photo page
 	if ( !empty($page['image_id']) )
 	{
-		// Get the copyright name and url (FROM cr_admin) that belongs to the current media_item (FROM cr_media)
+		// Get the copyright name, url and description that belongs to the current media_item
 		$query = '
 		  select name, url, descr
Index: /extensions/Copyrights/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Copyrights/language/en_UK/plugin.lang.php	(revision 11674)
+++ /extensions/Copyrights/language/en_UK/plugin.lang.php	(revision 11675)
@@ -8,6 +8,5 @@
 $lang['Delete copyright'] = 'Delete copyright';
 $lang['Visible'] = 'Visible';
-
-// Isnt it smarter to translate them seperate - so you dont have to put so many entries in here...
+$lang['This copyright already exists.'] = 'This copyright already exists.';
 
 ?>
Index: /extensions/Copyrights/language/nl_NL/plugin.lang.php
===================================================================
--- /extensions/Copyrights/language/nl_NL/plugin.lang.php	(revision 11674)
+++ /extensions/Copyrights/language/nl_NL/plugin.lang.php	(revision 11675)
@@ -8,4 +8,5 @@
 $lang['Delete copyright'] = 'Verwijder copyright';
 $lang['Visible'] = 'Zichtbaar';
+$lang['This copyright already exists.'] = 'Deze copyright bestaat al.';
 
 ?>
Index: /extensions/Copyrights/modify.php
===================================================================
--- /extensions/Copyrights/modify.php	(revision 11674)
+++ /extensions/Copyrights/modify.php	(revision 11675)
@@ -3,8 +3,8 @@
 // Add a prefilter
 add_event_handler('loc_begin_admin', 'CR_set_prefilter_modify', 50 );
-add_event_handler('loc_end_admin', 'CR_modify_submit', 50 );
+add_event_handler('loc_begin_admin', 'CR_modify_submit', 50 );
 
 // Change the variables used by the function that changes the template
-add_event_handler('loc_end_admin', 'CR_add_modify_vars_to_template');
+add_event_handler('loc_begin_admin', 'CR_add_modify_vars_to_template');
 
 function CR_set_prefilter_modify()
@@ -23,5 +23,5 @@
 			<select id="copyright" name="copyright">
 				<option value="0">--</option>
-				{html_options options=$CRoptions selected=$CRcopyrights[$CRid]}
+				{html_options options=$CRoptions selected=$CRid}
 			</select>
 		</td>
@@ -36,64 +36,72 @@
 function CR_add_modify_vars_to_template()
 {
-	global $template;
+	// Check if we are at the modify page (the problem is that this will send the stuff to every admin page that has an ?image_id...
+	if (isset($_GET['image_id']))
+	{
+		global $template;
 
-	load_language('plugin.lang', dirname(__FILE__).'/');
+		load_language('plugin.lang', dirname(__FILE__).'/');
 
-	// Fetch all the copyrights and assign them to the template
-	$query = sprintf(
-		'SELECT `cr_id`,`name`
-		FROM %s
-		WHERE `visible`<>0
-		;',
-		COPYRIGHTS_ADMIN);
-	$result = pwg_query($query);
+		// Fetch all the copyrights and assign them to the template
+		$query = sprintf(
+			'SELECT `cr_id`,`name`
+			FROM %s
+			WHERE `visible`<>0
+			;',
+			COPYRIGHTS_ADMIN);
+		$result = pwg_query($query);
 
-	$CRoptions = array();
-	while ($row = pwg_db_fetch_assoc($result)) {
-		$CRoptions[$row['cr_id']] = $row['name'];
+		$CRoptions = array();
+		while ($row = pwg_db_fetch_assoc($result)) {
+			$CRoptions[$row['cr_id']] = $row['name'];
+		}
+		$template->assign('CRoptions', $CRoptions);
+		
+		// Get the current Copyright
+		$image_id = $_GET['image_id'];
+		$query = sprintf(
+			'SELECT `media_id`, `cr_id`
+			FROM %s
+			WHERE `media_id` = %d
+			;',
+			COPYRIGHTS_MEDIA, $image_id);
+		$result = pwg_query($query);
+		
+		$CRid = 0; // Default is '--'
+		while ($row = pwg_db_fetch_assoc($result)) {
+			$CRid = $row['cr_id'];
+		}
+		$template->assign('CRid', $CRid);
 	}
-	$template->assign('CRoptions', $CRoptions);
-	
-	// Get the current Copyright
-	$image_id = $_GET['image_id']);
-	$query = sprintf(
-		'SELECT `media_id`, `cr_id`
-		FROM %s
-    WHERE `media_id` = %d
-		;',
-		COPYRIGHTS_MEDIA, $image_id);
-	$result = pwg_query($query);
-	
-  $CRid = 0; // Default is '--'
-	while ($row = pwg_db_fetch_assoc($result)) {
-		$CRid = $row['cr_id'];
-	}
-	$template->assign('CRid', $CRid);
 }
 
 function CR_modify_submit()
 {
-	if (isset($_POST['submit']))
+	// Check if we are at the modify page (the problem is that this will send the stuff to every admin page that has an ?image_id...
+	if (isset($_GET['image_id']))
 	{
-		// The data from the submit
-		$image_id = $_GET['image_id']);
-    $CRid = $_POST['copyright'];
+		if (isset($_POST['submit']))
+		{
+			// The data from the submit
+			$image_id = $_GET['image_id'];
+			$CRid = $_POST['copyright'];
 
-		// Delete the Copyright if it allready exists
+			// Delete the Copyright if it allready exists
+			$query = sprintf(
+				'DELETE
+				FROM %s
+				WHERE `media_id` = %d
+				;',
+				COPYRIGHTS_MEDIA, $image_id);
+			pwg_query($query);
+
+		// Insert the Copyright
 		$query = sprintf(
-			'DELETE
-			FROM %s
-			WHERE `media_id` = %d
-			;',
-			COPYRIGHTS_MEDIA, $image_id);
+		  'INSERT INTO %s
+		  VALUES (%d, %d)
+		  ;',
+		  COPYRIGHTS_MEDIA, $image_id, $CRid);
 		pwg_query($query);
-
-    // Insert the Copyright
-    $query = sprintf(
-      'INSERT INTO %s
-      VALUES (%d, %d)
-      ;',
-      COPYRIGHTS_MEDIA, $image_id, $CRid);
-    pwg_query($query);
+		}
 	}
 }
