<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -4,6 +4,15 @@ UPGRADE
 Remember to always run these steps in order. They are ordered intentionally to either
 minimise or totally remove downtime during upgrade.
 
+03/11/09
+-----------------------------
+
+1.) Run the following SQL command : 
+
+	ALTER TABLE 
+		`navigation_links` ADD `target` varchar(10) NULL DEFAULT NULL AFTER `position`;
+
+
 01/11/09 - v0.9.6.2 to v0.9.7
 -----------------------------
 </diff>
      <filename>UPGRADE</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,11 @@
 &lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');
-
+/**
+ * @package 		PyroCMS
+ * @subpackage 		Navigation Module
+ * @author			Phil Sturgeon - PyroCMS Development Team
+ * 
+ * Admin controller for the navigation module. Handles actions such as editing links or creating new ones.
+ */
 class Admin extends Admin_Controller
 {
 	function __construct()
@@ -40,6 +46,8 @@ class Admin extends Admin_Controller
 			//... and get navigation links for each one
 			$this-&gt;data-&gt;navigation[$group-&gt;abbrev] = $this-&gt;navigation_m-&gt;getLinks(array('group'=&gt;$group-&gt;id, 'order'=&gt;'position, title'));
 		}
+		
+		// Create the layout
 		$this-&gt;layout-&gt;create('admin/index', $this-&gt;data);
 	}
 	
@@ -47,19 +55,20 @@ class Admin extends Admin_Controller
 	function create()
 	{
 		$this-&gt;load-&gt;library('validation');
-		$rules['title'] = 'trim|required|max_length[40]';
-		$rules['url'] = 'trim';
-		$rules['uri'] = 'trim';
-		$rules['module_name'] = 'trim|alpha_dash';
-		$rules['page_id'] = 'trim|numeric';
-		$rules['navigation_group_id'] = 'trim|numeric|required';
-		$rules['position'] = 'trim|numeric|required';
+		$rules['title'] 				= 'trim|required|max_length[40]';
+		$rules['url'] 					= 'trim';
+		$rules['uri'] 					= 'trim';
+		$rules['module_name'] 			= 'trim|alpha_dash';
+		$rules['page_id'] 				= 'trim|numeric';
+		$rules['navigation_group_id'] 	= 'trim|numeric|required';
+		$rules['position'] 				= 'trim|numeric|required';
+		$rules['target']				= 'trim|max_length[10]';
 		
 		$this-&gt;validation-&gt;set_rules($rules);
 		
-		$fields['module_name'] = 'Module';
-		$fields['page_id'] = 'Page';
-		$fields['navigation_group_id'] = 'Group';
+		$fields['module_name'] 			= 'Module';
+		$fields['page_id'] 				= 'Page';
+		$fields['navigation_group_id'] 	= 'Group';
 		
 		$this-&gt;validation-&gt;set_fields($fields);
 		
@@ -99,19 +108,20 @@ class Admin extends Admin_Controller
 		
 		$this-&gt;load-&gt;library('validation');
 		
-		$rules['title'] = 'trim|required|max_length[40]';
-		$rules['url'] = 'trim';
-		$rules['uri'] = 'trim';
-		$rules['module_name'] = 'trim|alpha_dash';
-		$rules['page_id'] = 'trim|numeric';
-		$rules['navigation_group_id'] = 'trim|numeric|required';
-		$rules['position'] = 'trim|numeric|required';
+		$rules['title'] 				= 'trim|required|max_length[40]';
+		$rules['url'] 					= 'trim';
+		$rules['uri'] 					= 'trim';
+		$rules['module_name'] 			= 'trim|alpha_dash';
+		$rules['page_id'] 				= 'trim|numeric';
+		$rules['navigation_group_id'] 	= 'trim|numeric|required';
+		$rules['position'] 				= 'trim|numeric|required';
+		$rules['target']				= 'trim|max_length[10]';
 		
 		$this-&gt;validation-&gt;set_rules($rules);
 		
-		$fields['module_name'] = 'Module';
-		$fields['page_id'] = 'Page';
-		$fields['navigation_group_id'] = 'Group';
+		$fields['module_name'] 			= 'Module';
+		$fields['page_id'] 				= 'Page';
+		$fields['navigation_group_id'] 	= 'Group';
 		
 		$this-&gt;validation-&gt;set_fields($fields);
 		</diff>
      <filename>application/modules/navigation/controllers/admin.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,45 +1,46 @@
 &lt;?php
 
 // labels
-$lang['nav_note_label'] 										= 'Note';
-$lang['nav_title_label'] 										= 'Title';
-$lang['nav_position_label'] 								= 'Position';
-$lang['nav_url_label'] 											= 'URL';
-$lang['nav_actions_label'] 									= 'Actions';
-$lang['nav_details_label'] 									= 'Details';
-$lang['nav_text_label'] 										= 'Text';
-$lang['nav_group_label'] 										= 'Group';
-$lang['nav_location_label'] 								= 'Location';
-$lang['nav_uri_label'] 											= 'Site Link (URI)';
-$lang['nav_page_label'] 										= 'Page';
-$lang['nav_module_label'] 									= 'Module';
-$lang['nav_abbrev_label'] 									= 'Abbreviation';
-$lang['nav_edit_label'] 										= 'Edit';
-$lang['nav_delete_label'] 									= 'Delete';
-$lang['nav_group_delete_label']							= 'Delete group &quot;%s&quot;';
-$lang['nav_group_add_label']								= 'Add a group';
+$lang['nav_note_label'] 						= 'Note';
+$lang['nav_title_label'] 						= 'Title';
+$lang['nav_position_label'] 					= 'Position';
+$lang['nav_target_label']						= 'Target'; #translate
+$lang['nav_url_label'] 							= 'URL';
+$lang['nav_actions_label'] 						= 'Actions';
+$lang['nav_details_label'] 						= 'Details';
+$lang['nav_text_label'] 						= 'Text';
+$lang['nav_group_label'] 						= 'Group';
+$lang['nav_location_label'] 					= 'Location';
+$lang['nav_uri_label'] 							= 'Site Link (URI)';
+$lang['nav_page_label'] 						= 'Page';
+$lang['nav_module_label'] 						= 'Module';
+$lang['nav_abbrev_label'] 						= 'Abbreviation';
+$lang['nav_edit_label'] 						= 'Edit';
+$lang['nav_delete_label'] 						= 'Delete';
+$lang['nav_group_delete_label']					= 'Delete group &quot;%s&quot;';
+$lang['nav_group_add_label']					= 'Add a group';
 $lang['nav_link_module_select_default'] 		= '-- Select --';
 $lang['nav_link_page_select_default'] 			= '-- Select --';
 
 // titles
-$lang['nav_link_create_title'] 							= 'Create navigation link';
-$lang['nav_link_edit_title'] 								= 'Edit navigation link &quot;%s&quot;';
+$lang['nav_link_create_title'] 					= 'Create navigation link';
+$lang['nav_link_edit_title'] 					= 'Edit navigation link &quot;%s&quot;';
 
 // messages
-$lang['nav_group_note'] 										= 'Currently navigation groups are referenced in the layout files and cannot be changed dynamically. You may add and delete them, but you will need to dive into the source-code to get the new group put into your site.';
-$lang['nav_group_no_links'] 								= 'There are no links in this group.';
-$lang['nav_no_groups'] 											= 'There are no navigation groups.';
-$lang['nav_group_delete_confirm'] 					= 'Are you sure you would like to delete this navigation group? This will delete ALL navigation links within the group, and the layout files will need to be edited to remove refference to it.';
-$lang['nav_group_create_title'] 						= 'New navigation group';
-$lang['nav_group_add_success'] 							= 'Your navigation group has been saved.';
-$lang['nav_group_add_error'] 								= 'An error occurred.';
+$lang['nav_group_note'] 						= 'Currently navigation groups are referenced in the layout files and cannot be changed dynamically. You may add and delete them, but you will need to dive into the source-code to get the new group put into your site.';
+$lang['nav_group_no_links'] 					= 'There are no links in this group.';
+$lang['nav_no_groups'] 							= 'There are no navigation groups.';
+$lang['nav_group_delete_confirm'] 				= 'Are you sure you would like to delete this navigation group? This will delete ALL navigation links within the group, and the layout files will need to be edited to remove refference to it.';
+$lang['nav_group_create_title'] 				= 'New navigation group';
+$lang['nav_group_add_success'] 					= 'Your navigation group has been saved.';
+$lang['nav_group_add_error'] 					= 'An error occurred.';
 $lang['nav_group_mass_delete_success'] 			= 'The navigation group has been deleted.';
-$lang['nav_link_add_success'] 							= 'The navigation link was added.';
-$lang['nav_link_add_error'] 								= 'An unexpected error occurred.';
-$lang['nav_link_not_exist_error'] 					= 'This navigation link does not exist.';
-$lang['nav_link_edit_success'] 							= 'The navigation link was saved.';
-$lang['nav_link_delete_success'] 						= 'The navigation link has been deleted.';
+$lang['nav_link_add_success'] 					= 'The navigation link was added.';
+$lang['nav_link_add_error'] 					= 'An unexpected error occurred.';
+$lang['nav_link_not_exist_error'] 				= 'This navigation link does not exist.';
+$lang['nav_link_edit_success'] 					= 'The navigation link was saved.';
+$lang['nav_link_delete_success'] 				= 'The navigation link has been deleted.';
 
-$lang['nav_link_type_desc'] 								= 'Please pick &lt;strong&gt;one&lt;/strong&gt; of the types of link from below.';
+$lang['nav_link_type_desc'] 					= 'Please pick &lt;strong&gt;one&lt;/strong&gt; of the types of link from below.';
 
 ?&gt;</diff>
      <filename>application/modules/navigation/language/english/navigation_lang.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,11 @@
 &lt;?php if (!defined('BASEPATH')) exit('No direct script access allowed');
-
+/**
+ * @package 		PyroCMS
+ * @subpackage 		Navigation Module
+ * @author			Phil Sturgeon - PyroCMS Development Team
+ * 
+ * Navigation model for the navigation module.
+ */
 class Navigation_m extends Model {
 
 	function getLink($id = 0)
@@ -101,7 +107,7 @@ class Navigation_m extends Model {
     		{
 	    		foreach($group_links as &amp;$link)
 	    		{
-	    			$full_match = site_url($this-&gt;uri-&gt;uri_string()) == $link-&gt;url;
+	    			$full_match 	= site_url($this-&gt;uri-&gt;uri_string()) == $link-&gt;url;
 	    			$segment1_match = site_url($this-&gt;uri-&gt;rsegment(1, '')) == $link-&gt;url;
 	    			
 	    			// Either the whole URI matches, or the first segment matches
@@ -138,6 +144,7 @@ class Navigation_m extends Model {
         	'module_name' 			=&gt; $input['module_name'],
         	'page_id' 				=&gt; (int) $input['page_id'],
         	'position'				=&gt; (int) $input['position'],
+			'target'				=&gt; $input['target'],
         	'navigation_group_id'	=&gt; (int) $input['navigation_group_id']
 		));
         
@@ -156,6 +163,7 @@ class Navigation_m extends Model {
         	'module_name'			=&gt; $input['module_name'],
         	'page_id' 				=&gt; (int) $input['page_id'],
         	'position' 				=&gt; (int) $input['position'],
+			'target'				=&gt; $input['target'],
         	'navigation_group_id' 	=&gt; (int) $input['navigation_group_id']
 		), array('id' =&gt; $id));
 		</diff>
      <filename>application/modules/navigation/models/navigation_m.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,58 +1,63 @@
-&lt;? if($this-&gt;uri-&gt;segment(3,'create') == 'create'): ?&gt;
+&lt;?php if($this-&gt;uri-&gt;segment(3,'create') == 'create'): ?&gt;
 	&lt;h3&gt;&lt;?=lang('nav_link_create_title');?&gt;&lt;/h3&gt;	
-&lt;? else: ?&gt;
+&lt;?php else: ?&gt;
 	&lt;h3&gt;&lt;?=sprintf(lang('nav_link_edit_title'), $this-&gt;data-&gt;navigation_link-&gt;title);?&gt;&lt;/h3&gt;
-&lt;? endif; ?&gt;
-&lt;?= form_open($this-&gt;uri-&gt;uri_string()); ?&gt;
+&lt;?php endif; ?&gt;
+&lt;?php echo form_open($this-&gt;uri-&gt;uri_string()); ?&gt;
 
 	&lt;fieldset&gt;
-		&lt;legend&gt;&lt;?=lang('nav_details_label');?&gt;&lt;/legend&gt;
+		&lt;legend&gt;&lt;?php echo lang('nav_details_label');?&gt;&lt;/legend&gt;
 			
 		&lt;div class=&quot;field&quot;&gt;
-			&lt;label for=&quot;title&quot;&gt;&lt;?=lang('nav_text_label');?&gt;&lt;/label&gt;
+			&lt;label for=&quot;title&quot;&gt;&lt;?php echo lang('nav_text_label');?&gt;&lt;/label&gt;
 			&lt;input type=&quot;text&quot; id=&quot;title&quot; name=&quot;title&quot; maxlength=&quot;50&quot; value=&quot;&lt;?= $navigation_link-&gt;title; ?&gt;&quot; /&gt;
 		&lt;/div&gt;
 			
 		&lt;div class=&quot;field&quot;&gt;
-			&lt;label for=&quot;navigation_group_id&quot;&gt;&lt;?=lang('nav_group_label');?&gt;&lt;/label&gt;
-			&lt;?=form_dropdown('navigation_group_id', $groups_select, $navigation_link-&gt;navigation_group_id, 'size=&quot;'.count($groups_select).'&quot;') ?&gt;
+			&lt;label for=&quot;navigation_group_id&quot;&gt;&lt;?php echo lang('nav_group_label');?&gt;&lt;/label&gt;
+			&lt;?php echo form_dropdown('navigation_group_id', $groups_select, $navigation_link-&gt;navigation_group_id, 'size=&quot;'.count($groups_select).'&quot;') ?&gt;
 		&lt;/div&gt;
 			
 		&lt;div class=&quot;field&quot;&gt;
-			&lt;label for=&quot;position&quot;&gt;&lt;?=lang('nav_position_label');?&gt;&lt;/label&gt;
-			&lt;input type=&quot;text&quot; id=&quot;position&quot; name=&quot;position&quot; value=&quot;&lt;?= $navigation_link-&gt;position; ?&gt;&quot; /&gt;
+			&lt;label for=&quot;position&quot;&gt;&lt;?php echo lang('nav_position_label');?&gt;&lt;/label&gt;
+			&lt;input type=&quot;text&quot; id=&quot;position&quot; name=&quot;position&quot; value=&quot;&lt;?php echo $navigation_link-&gt;position; ?&gt;&quot; /&gt;
+		&lt;/div&gt;
+		
+		&lt;div class=&quot;field&quot;&gt;
+			&lt;label for=&quot;target&quot;&gt;&lt;?php echo lang('nav_target_label'); ?&gt;&lt;/label&gt;
+			&lt;input type=&quot;text&quot; id=&quot;target&quot; name=&quot;target&quot; value=&quot;&lt;?php echo $navigation_link-&gt;target; ?&gt;&quot; /&gt;
 		&lt;/div&gt;
 			
 	&lt;/fieldset&gt;
 	
 	&lt;fieldset&gt;
-		&lt;legend&gt;&lt;?=lang('nav_location_label');?&gt;&lt;/legend&gt;	
-		&lt;p&gt;&lt;?=lang('nav_link_type_desc');?&gt;&lt;/p&gt;
+		&lt;legend&gt;&lt;?php echo lang('nav_location_label');?&gt;&lt;/legend&gt;	
+		&lt;p&gt;&lt;?php echo lang('nav_link_type_desc');?&gt;&lt;/p&gt;
 			
 		&lt;div class=&quot;field float-left&quot;&gt;
-			&lt;label for=&quot;url&quot;&gt;&lt;?=lang('nav_url_label');?&gt;&lt;/label&gt;
-			&lt;input type=&quot;text&quot; id=&quot;url&quot; name=&quot;url&quot; value=&quot;&lt;?= empty($navigation_link-&gt;url) ? 'http://' : $navigation_link-&gt;url; ?&gt;&quot; /&gt;
+			&lt;label for=&quot;url&quot;&gt;&lt;?php echo lang('nav_url_label');?&gt;&lt;/label&gt;
+			&lt;input type=&quot;text&quot; id=&quot;url&quot; name=&quot;url&quot; value=&quot;&lt;?php echo empty($navigation_link-&gt;url) ? 'http://' : $navigation_link-&gt;url; ?&gt;&quot; /&gt;
 		&lt;/div&gt;
 			
 		&lt;div class=&quot;field float-left&quot;&gt;
-			&lt;label for=&quot;module_name&quot;&gt;&lt;?=lang('nav_module_label');?&gt;&lt;/label&gt;
-			&lt;?=form_dropdown('module_name', array(lang('nav_link_module_select_default'))+$modules_select, $navigation_link-&gt;module_name) ?&gt;
+			&lt;label for=&quot;module_name&quot;&gt;&lt;?php echo lang('nav_module_label');?&gt;&lt;/label&gt;
+			&lt;?php echo form_dropdown('module_name', array(lang('nav_link_module_select_default'))+$modules_select, $navigation_link-&gt;module_name) ?&gt;
 		&lt;/div&gt;
 		
 		&lt;div class=&quot;field float-left&quot;&gt;
-			&lt;label for=&quot;uri&quot;&gt;&lt;?=lang('nav_uri_label');?&gt;&lt;/label&gt;
+			&lt;label for=&quot;uri&quot;&gt;&lt;?php echo lang('nav_uri_label');?&gt;&lt;/label&gt;
 			&lt;input type=&quot;text&quot; id=&quot;uri&quot; name=&quot;uri&quot; value=&quot;&lt;?= $navigation_link-&gt;uri; ?&gt;&quot; /&gt;
 		&lt;/div&gt;
 		
 		&lt;div class=&quot;field float-left&quot;&gt;
-			&lt;label for=&quot;page_id&quot;&gt;&lt;?=lang('nav_page_label');?&gt;&lt;/label&gt;
+			&lt;label for=&quot;page_id&quot;&gt;&lt;?php echo lang('nav_page_label');?&gt;&lt;/label&gt;
 			&lt;select name=&quot;page_id&quot;&gt;
-				&lt;option value=&quot;&quot;&gt;&lt;?=lang('nav_link_page_select_default');?&gt;&lt;/option&gt;
-				&lt;? create_tree_select($pages_select, 0, 0, $navigation_link-&gt;page_id); ?&gt;
+				&lt;option value=&quot;&quot;&gt;&lt;?php echo lang('nav_link_page_select_default');?&gt;&lt;/option&gt;
+				&lt;?php create_tree_select($pages_select, 0, 0, $navigation_link-&gt;page_id); ?&gt;
 			&lt;/select&gt;
 		&lt;/div&gt;
 		
 	&lt;/fieldset&gt;
 	
-	&lt;? $this-&gt;load-&gt;view('admin/fragments/table_buttons', array('buttons' =&gt; array('save', 'cancel') )); ?&gt;
-&lt;?= form_close(); ?&gt;
\ No newline at end of file
+	&lt;?php $this-&gt;load-&gt;view('admin/fragments/table_buttons', array('buttons' =&gt; array('save', 'cancel') )); ?&gt;
+&lt;?php echo form_close(); ?&gt;
\ No newline at end of file</diff>
      <filename>application/modules/navigation/views/admin/links/form.php</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 	&lt;h2&gt;&lt;?= lang('navigation_headline');?&gt;&lt;/h2&gt;
 	&lt;ul class=&quot;spacer-left-dbl&quot;&gt;
 		&lt;? if(!empty($navigation['sidebar'])) foreach($navigation['sidebar'] as $nav_link): ?&gt;
-		&lt;li&gt;&lt;?=anchor($nav_link-&gt;url, $nav_link-&gt;title); ?&gt;&lt;/li&gt;
+		&lt;li&gt;&lt;?=anchor($nav_link-&gt;url, $nav_link-&gt;title,array('target' =&gt; $nav_link-&gt;target)); ?&gt;&lt;/li&gt;
 		&lt;? endforeach; ?&gt;
 	&lt;/ul&gt;
 	
\ No newline at end of file</diff>
      <filename>application/themes/advertising/views/menu.php</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@
 	&lt;h1&gt;&lt;?= lang('navigation_headline');?&gt;&lt;/h1&gt;
 	&lt;ul&gt;
 		&lt;? foreach($navigation['sidebar'] as $nav_link): ?&gt;
-		&lt;li&gt;&lt;?=anchor($nav_link-&gt;url, $nav_link-&gt;title); ?&gt;&lt;/li&gt;
+		&lt;li&gt;&lt;?=anchor($nav_link-&gt;url, $nav_link-&gt;title,array('target' =&gt; $nav_link-&gt;target)); ?&gt;&lt;/li&gt;
 		&lt;? endforeach; ?&gt;
 	&lt;/ul&gt;
 &lt;? endif; ?&gt;
\ No newline at end of file</diff>
      <filename>application/themes/lazydays/views/leftnav.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c63fde2c91ac75f963970c11ea81d1a52c9887fb</id>
    </parent>
  </parents>
  <author>
    <name>YorickPeterse</name>
    <email>info@yorickpeterse.com</email>
  </author>
  <url>http://github.com/philsturgeon/pyrocms/commit/30e2164b6542e8fa9c135f5eb0fd1bfd798deb5b</url>
  <id>30e2164b6542e8fa9c135f5eb0fd1bfd798deb5b</id>
  <committed-date>2009-11-03T04:17:31-08:00</committed-date>
  <authored-date>2009-11-03T04:17:31-08:00</authored-date>
  <message>Fixed issue #32: Target support in link navigation.</message>
  <tree>1abb14280e17709444188f3936a7e250007a7ccf</tree>
  <committer>
    <name>YorickPeterse</name>
    <email>info@yorickpeterse.com</email>
  </committer>
</commit>
