Binary files 4.6-complete/.DS_Store and 4.6.1/.DS_Store differ
diff -ruN 4.6-complete/CHANGELOG.php 4.6.1/CHANGELOG.php
--- 4.6-complete/CHANGELOG.php	2006-09-20 19:05:08.000000000 -0500
+++ 4.6.1/CHANGELOG.php	2006-10-10 11:05:15.000000000 -0500
@@ -28,29 +28,141 @@
 - -> Removed
 ! -> Note
 
+-------------------- 4.6.1 Release -------------------------------------
+
+r749 | neilt | 2006-10-04 13:15:07 -0600 (Wed, 04 Oct 2006) | 1 line
+
+# bug fix : incorrectly assigned variable causing php notices - #FS121
+------------------------------------------------------------------------
+r745 | cauld | 2006-10-03 15:40:42 -0600 (Tue, 03 Oct 2006) | 1 line
+
+! Removing the old DROP TABLES option during install.  This is not really 
+an option since you have to drop tables before creating new ones.  Just 
+altered the way the BACKUP TABLES option works.
+------------------------------------------------------------------------
+r744 | neilt | 2006-10-03 06:06:58 -0600 (Tue, 03 Oct 2006) | 1 line
+
+# Bug fix : Pathway clone bug, link becomes a pathway - FS#106
+------------------------------------------------------------------------
+r743 | cauld | 2006-10-02 17:26:25 -0600 (Mon, 02 Oct 2006) | 1 line
+
+# Fixing a few installation bugs found during an internal QA audit
+------------------------------------------------------------------------
+r741 | cauld | 2006-10-01 20:10:21 -0600 (Sun, 01 Oct 2006) | 1 line
+
+# FS-108 - Fixes 6 array_merge warnings that are present on a fresh install 
+with no content.
+------------------------------------------------------------------------
+r740 | cauld | 2006-10-01 17:07:08 -0600 (Sun, 01 Oct 2006) | 1 line
+
+! Updating the Banner module & component to change the alt tag change from 
+"Advertisement" to "Banner".  The old text was causing banners to be 
+automatically blocked by some ad blockers.
+------------------------------------------------------------------------
+r739 | cauld | 2006-09-28 15:21:24 -0600 (Thu, 28 Sep 2006) | 1 line
+
+# Fixing <span> issue in function makePathway
+------------------------------------------------------------------------
+r738 | neilt | 2006-09-28 11:39:07 -0600 (Thu, 28 Sep 2006) | 1 line
+
+# Fix for some cross scripting bugs. FS#95
+------------------------------------------------------------------------
+r737 | adi | 2006-09-27 00:23:45 -0600 (Wed, 27 Sep 2006) | 1 line
+
+include PHP 5 compatibility file
+------------------------------------------------------------------------
+r736 | adi | 2006-09-27 00:22:58 -0600 (Wed, 27 Sep 2006) | 1 line
+
+added new file to provide missing functionality for older version of php
+------------------------------------------------------------------------
+r734 | cauld | 2006-09-26 20:46:25 -0600 (Tue, 26 Sep 2006) | 2 lines
+
+# Adding a getEscaped call for $passwd in the LoginUser function
+# Updating mosGetParam to utilize addslashes for added security
+------------------------------------------------------------------------
+r733 | neilt | 2006-09-25 13:33:41 -0600 (Mon, 25 Sep 2006) | 1 line
+
++ initial workaround for FS#89 — Can not add menu when Mysql strict is on
+------------------------------------------------------------------------
+r732 | chanh | 2006-09-23 17:42:50 -0600 (Sat, 23 Sep 2006) | 1 line
+
+Fix bug cause site go offline when MetaKeys reach beyond 256 chars.
+------------------------------------------------------------------------
+r731 | neilt | 2006-09-23 07:21:20 -0600 (Sat, 23 Sep 2006) | 1 line
+
+# bug fix - Email cloak incorrectly parses emails URL that include ? 
+------------------------------------------------------------------------
+r729 | neilt | 2006-09-23 04:46:37 -0600 (Sat, 23 Sep 2006) | 1 line
+
+# bug fix - numerous gets missing for backward compatibility - FS#85 
+------------------------------------------------------------------------
+r728 | ninekrit | 2006-09-22 02:34:07 -0600 (Fri, 22 Sep 2006) | 1 line
+
+#removed fixed encoding line 354 for support all encoding
+------------------------------------------------------------------------
+r727 | neilt | 2006-09-21 12:42:10 -0600 (Thu, 21 Sep 2006) | 1 line
+
+# Bug fix — Declaration dropped bug, removed unused css - FS#58
+------------------------------------------------------------------------
+r726 | neilt | 2006-09-21 12:17:17 -0600 (Thu, 21 Sep 2006) | 1 line
+
+# Bug Fix - missing / in check() function FS#90
+------------------------------------------------------------------------
+r725 | neilt | 2006-09-21 07:33:49 -0600 (Thu, 21 Sep 2006) | 1 line
+
+# bug fix - missing declaration
+------------------------------------------------------------------------
+r724 | neilt | 2006-09-20 07:57:33 -0600 (Wed, 20 Sep 2006) | 1 line
+
+# WebLinks email message not sent to admin bug fixed FS#76
+------------------------------------------------------------------------
+r723 | neilt | 2006-09-20 04:08:13 -0600 (Wed, 20 Sep 2006) | 1 line
+
+# Bug fix for error message when there are no weblinks FS#88
+------------------------------------------------------------------------
+r722 | neilt | 2006-09-20 03:54:16 -0600 (Wed, 20 Sep 2006) | 1 line
+
+# bug fix for login/out messages FS#82
+------------------------------------------------------------------------
+r721 | adi | 2006-09-18 20:09:06 -0600 (Mon, 18 Sep 2006) | 1 line
+
+fix incorrect br tag. FS#87
+------------------------------------------------------------------------
+r719 | neilt | 2006-09-18 09:08:45 -0600 (Mon, 18 Sep 2006) | 1 line
+
+file missed on earlier upload
+------------------------------------------------------------------------
+r718 | neilt | 2006-09-18 06:48:29 -0600 (Mon, 18 Sep 2006) | 1 line
+
++ Enhancements to comments component to fix bugs #FS72, #FS75
+------------------------------------------------------------------------
+r717 | cauld | 2006-09-17 12:27:50 -0600 (Sun, 17 Sep 2006) | 1 line
+
+! Updating version.php & changelog.php
+
 -------------------- 4.6 Release ---------------------------------------
-
-r716 | cauld | 2006-09-17 12:19:53 -0600 (Sun, 17 Sep 2006) | 1 line
-
-! Removing Mambo Raw SQL installation files and replacing with Mambo Lite SQL files.
-------------------------------------------------------------------------
-r715 | alwarren | 2006-09-14 23:03:21 -0600 (Thu, 14 Sep 2006) | 1 line
-
-# FS#80 Fixed display of number of items checked in
-------------------------------------------------------------------------
-r714 | adi | 2006-09-14 19:05:36 -0600 (Thu, 14 Sep 2006) | 1 line
-
-remove non utf-8 in locales.xml
-------------------------------------------------------------------------
-r711 | alwarren | 2006-09-14 11:18:07 -0600 (Thu, 14 Sep 2006) | 1 line
-
-! FS#12 - Change menu manager radio buttons to checkboxes to allow multiple item selection
-------------------------------------------------------------------------
-r710 | alwarren | 2006-09-14 10:22:48 -0600 (Thu, 14 Sep 2006) | 2 lines
-
-# FS#74 - Fixed problem with Itemid.
-section/category links in content item were causing bad links
-------------------------------------------------------------------------
+
+r716 | cauld | 2006-09-17 12:19:53 -0600 (Sun, 17 Sep 2006) | 1 line
+
+! Removing Mambo Raw SQL installation files and replacing with Mambo Lite SQL files.
+------------------------------------------------------------------------
+r715 | alwarren | 2006-09-14 23:03:21 -0600 (Thu, 14 Sep 2006) | 1 line
+
+# FS#80 Fixed display of number of items checked in
+------------------------------------------------------------------------
+r714 | adi | 2006-09-14 19:05:36 -0600 (Thu, 14 Sep 2006) | 1 line
+
+remove non utf-8 in locales.xml
+------------------------------------------------------------------------
+r711 | alwarren | 2006-09-14 11:18:07 -0600 (Thu, 14 Sep 2006) | 1 line
+
+! FS#12 - Change menu manager radio buttons to checkboxes to allow multiple item selection
+------------------------------------------------------------------------
+r710 | alwarren | 2006-09-14 10:22:48 -0600 (Thu, 14 Sep 2006) | 2 lines
+
+# FS#74 - Fixed problem with Itemid.
+section/category links in content item were causing bad links
+------------------------------------------------------------------------
 
 r708 | gin | 2006-09-14 20:29:00
 
@@ -60,81 +172,82 @@
 r707 | gin | 2006-09-14 16:36:00
 
 # fixed the bug #77 noted by Mac in 2nd form's compilation during the new language creation
-modfied the file includes\phpgettext\phpgettext.catalog.php

+modfied the file includes\phpgettext\phpgettext.catalog.php
+
 ------------------------------------------------------------------------
 r706 | gin | 2006-09-14 14:10:00
 
 ! Modified the component registration in a 2 step process with double e-mail
-verification and some additional test
-------------------------------------------------------------------------
-r705 | alwarren | 2006-09-13 02:58:12 -0600 (Wed, 13 Sep 2006) | 1 line
-
-FS#73 Change wording in comments mambot
-------------------------------------------------------------------------
-r704 | alwarren | 2006-09-13 02:41:03 -0600 (Wed, 13 Sep 2006) | 1 line
-
-FS#54 Added spacers to toolbar in banner manager
-------------------------------------------------------------------------
-r703 | adi | 2006-09-12 23:34:45 -0600 (Tue, 12 Sep 2006) | 1 line
-
-fix bug #63
-------------------------------------------------------------------------
-r702 | adi | 2006-09-12 23:15:12 -0600 (Tue, 12 Sep 2006) | 1 line
-
-fix bug #57 & #64
-------------------------------------------------------------------------
-r701 | cauld | 2006-09-12 22:28:50 -0600 (Tue, 12 Sep 2006) | 1 line
-
-! Updating MOS Rating to be a fully installable package for Mambo Raw
-------------------------------------------------------------------------
-r700 | cauld | 2006-09-12 17:01:15 -0600 (Tue, 12 Sep 2006) | 1 line
-
-# Forgot to add the MOStlyDBAdmin classes folder on an earlier commit
-------------------------------------------------------------------------
-r699 | cauld | 2006-09-12 16:36:47 -0600 (Tue, 12 Sep 2006) | 1 line
-
-! FS#60 — Modify News Feeds Items
-------------------------------------------------------------------------
-r698 | cauld | 2006-09-12 16:30:12 -0600 (Tue, 12 Sep 2006) | 1 line
-
-# FS#55 — Update WebLinks Items
-------------------------------------------------------------------------
-r697 | cauld | 2006-09-12 16:17:48 -0600 (Tue, 12 Sep 2006) | 1 line
-
-#  FS#53 — Change Banner Link
-------------------------------------------------------------------------
-r696 | cauld | 2006-09-12 16:11:52 -0600 (Tue, 12 Sep 2006) | 1 line
-
-#  FS#68 — Help Screens Missing
-------------------------------------------------------------------------
-r695 | cauld | 2006-09-12 05:17:46 -0600 (Tue, 12 Sep 2006) | 1 line
-
-! Pulling mosvote / MOS Rating from Mambo Raw edition
-------------------------------------------------------------------------
-r694 | cauld | 2006-09-11 23:38:01 -0600 (Mon, 11 Sep 2006) | 1 line
-
-#  Fixing FS#69 — Absolute Path to MOStlyCE Template Directory
-------------------------------------------------------------------------
-r693 | cauld | 2006-09-11 23:30:28 -0600 (Mon, 11 Sep 2006) | 1 line
-
-! Updating mostlyce admin xml file
-------------------------------------------------------------------------
-r692 | cauld | 2006-09-11 23:28:16 -0600 (Mon, 11 Sep 2006) | 5 lines
-
-# Fixed MOStlyDBAdmin zip archive issue.  Was missing the zip.lib/php class.
-! Updating directory listing on the universal installer screen
-# Updating MOStlyCE Spellchecker plugin warning to notify user that CURL is now a requirement.
-# Update VCard to prevent vcard link from displaying when contact has not been edited or where the contact params do not exist. (suggested by alwarren)
-# Fixing some missing single quotes in some of the menu manager <script>alert code. This was causing a blank page when certain error conditions exist.  (suggested by alwarren)
-------------------------------------------------------------------------
-r691 | cauld | 2006-09-11 17:56:22 -0600 (Mon, 11 Sep 2006) | 1 line
-
-# Changing install.php to us $mosConfig_lang = 'en' for configuration.php rather than 'english'.  Was causing issues with archive and create / modify dates.
-------------------------------------------------------------------------
-r690 | cauld | 2006-09-10 19:35:02 -0600 (Sun, 10 Sep 2006) | 2 lines
-
-! Updating changelog.php
-! Updating version.php
+verification and some additional test
+------------------------------------------------------------------------
+r705 | alwarren | 2006-09-13 02:58:12 -0600 (Wed, 13 Sep 2006) | 1 line
+
+FS#73 Change wording in comments mambot
+------------------------------------------------------------------------
+r704 | alwarren | 2006-09-13 02:41:03 -0600 (Wed, 13 Sep 2006) | 1 line
+
+FS#54 Added spacers to toolbar in banner manager
+------------------------------------------------------------------------
+r703 | adi | 2006-09-12 23:34:45 -0600 (Tue, 12 Sep 2006) | 1 line
+
+fix bug #63
+------------------------------------------------------------------------
+r702 | adi | 2006-09-12 23:15:12 -0600 (Tue, 12 Sep 2006) | 1 line
+
+fix bug #57 & #64
+------------------------------------------------------------------------
+r701 | cauld | 2006-09-12 22:28:50 -0600 (Tue, 12 Sep 2006) | 1 line
+
+! Updating MOS Rating to be a fully installable package for Mambo Raw
+------------------------------------------------------------------------
+r700 | cauld | 2006-09-12 17:01:15 -0600 (Tue, 12 Sep 2006) | 1 line
+
+# Forgot to add the MOStlyDBAdmin classes folder on an earlier commit
+------------------------------------------------------------------------
+r699 | cauld | 2006-09-12 16:36:47 -0600 (Tue, 12 Sep 2006) | 1 line
+
+! FS#60 — Modify News Feeds Items
+------------------------------------------------------------------------
+r698 | cauld | 2006-09-12 16:30:12 -0600 (Tue, 12 Sep 2006) | 1 line
+
+# FS#55 — Update WebLinks Items
+------------------------------------------------------------------------
+r697 | cauld | 2006-09-12 16:17:48 -0600 (Tue, 12 Sep 2006) | 1 line
+
+#  FS#53 — Change Banner Link
+------------------------------------------------------------------------
+r696 | cauld | 2006-09-12 16:11:52 -0600 (Tue, 12 Sep 2006) | 1 line
+
+#  FS#68 — Help Screens Missing
+------------------------------------------------------------------------
+r695 | cauld | 2006-09-12 05:17:46 -0600 (Tue, 12 Sep 2006) | 1 line
+
+! Pulling mosvote / MOS Rating from Mambo Raw edition
+------------------------------------------------------------------------
+r694 | cauld | 2006-09-11 23:38:01 -0600 (Mon, 11 Sep 2006) | 1 line
+
+#  Fixing FS#69 — Absolute Path to MOStlyCE Template Directory
+------------------------------------------------------------------------
+r693 | cauld | 2006-09-11 23:30:28 -0600 (Mon, 11 Sep 2006) | 1 line
+
+! Updating mostlyce admin xml file
+------------------------------------------------------------------------
+r692 | cauld | 2006-09-11 23:28:16 -0600 (Mon, 11 Sep 2006) | 5 lines
+
+# Fixed MOStlyDBAdmin zip archive issue.  Was missing the zip.lib/php class.
+! Updating directory listing on the universal installer screen
+# Updating MOStlyCE Spellchecker plugin warning to notify user that CURL is now a requirement.
+# Update VCard to prevent vcard link from displaying when contact has not been edited or where the contact params do not exist. (suggested by alwarren)
+# Fixing some missing single quotes in some of the menu manager <script>alert code. This was causing a blank page when certain error conditions exist.  (suggested by alwarren)
+------------------------------------------------------------------------
+r691 | cauld | 2006-09-11 17:56:22 -0600 (Mon, 11 Sep 2006) | 1 line
+
+# Changing install.php to us $mosConfig_lang = 'en' for configuration.php rather than 'english'.  Was causing issues with archive and create / modify dates.
+------------------------------------------------------------------------
+r690 | cauld | 2006-09-10 19:35:02 -0600 (Sun, 10 Sep 2006) | 2 lines
+
+! Updating changelog.php
+! Updating version.php
 ------------------------------------------------------------------------
 r689 | cauld | 2006-09-10 19:08:23 -0600 (Sun, 10 Sep 2006) | 1 line
 
diff -ruN 4.6-complete/administrator/components/com_banners/banners.xml 4.6.1/administrator/components/com_banners/banners.xml
--- 4.6-complete/administrator/components/com_banners/banners.xml	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/components/com_banners/banners.xml	2006-10-10 11:05:15.000000000 -0500
@@ -2,12 +2,12 @@
 <mosinstall type="component" version="4.6">
   <name>Banners</name>
   <author>Mambo Foundation</author>
-  <creationDate>August 2006</creationDate>
+  <creationDate>Oct 2006</creationDate>
   <copyright>copyright (C) 2005 - 2006 Mambo Foundation Inc.</copyright>
   <license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
   <authorEmail>core@mambo-foundation.org</authorEmail>
-  <authorUrl>www.mambo-foundation.org</authorUrl>
-  <version>1.0</version>
+  <authorUrl>mambo-foundation.org</authorUrl>
+  <version>1.1</version>
   <description>This component manages banners and banner clients</description>
   <administration>
 	<menu>Banners</menu>
diff -ruN 4.6-complete/administrator/components/com_comment/admin.comment.php 4.6.1/administrator/components/com_comment/admin.comment.php
--- 4.6-complete/administrator/components/com_comment/admin.comment.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/components/com_comment/admin.comment.php	2006-10-10 11:05:15.000000000 -0500
@@ -195,6 +195,9 @@
         $seclistarray = explode (",", $allow_comments_in_sections);
         $database -> setQuery("SELECT id,title FROM #__sections ORDER BY title ASC");
         $dbsectionlist = $database -> loadObjectList();
+				echo "<option value='0' ";
+				if (in_array (0, $seclistarray)) echo "selected";
+				echo ">Static Content</option>";
         foreach ($dbsectionlist as $slrow){
           echo "<option value='$slrow->id' ";
           if (in_array ($slrow->id, $seclistarray)) echo "selected";
@@ -279,7 +282,6 @@
   $gbtabs->endPane();
   ?>
   <input type="hidden" name="option" value="<?php echo $option; ?>">
-  <input type="hidden" name="act" value="<?php echo $act; ?>">
   <input type="hidden" name="task" value="">
   <input type="hidden" name="boxchecked" value="0">
 	</form>
diff -ruN 4.6-complete/administrator/components/com_comment/config.comment.php 4.6.1/administrator/components/com_comment/config.comment.php
--- 4.6-complete/administrator/components/com_comment/config.comment.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/components/com_comment/config.comment.php	2006-10-10 11:05:15.000000000 -0500
@@ -1,8 +1,8 @@
 <?php
 $auto_publish_comments = "1";
 $allow_anonymous_entries = "1";
-$notify_new_entries = "1";
-$allow_comments_in_sections = "3,4";
+$notify_new_entries = "0";
+$allow_comments_in_sections = "0,4,2";
 $comments_per_page = "10";
 $admin_comments_length = "100";
 ?>
\ No newline at end of file
diff -ruN 4.6-complete/administrator/components/com_content/admin.content.php 4.6.1/administrator/components/com_content/admin.content.php
--- 4.6-complete/administrator/components/com_content/admin.content.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/components/com_content/admin.content.php	2006-10-10 11:05:15.000000000 -0500
@@ -244,7 +244,9 @@
 	;
 	$authors[] = mosHTML::makeOption( '0', T_('- All Authors -') );
 	$database->setQuery( $query );
-	$authors = array_merge( $authors, $database->loadObjectList() );
+	if (is_array($database->loadObjectList())) {
+	  $authors = array_merge( $authors, $database->loadObjectList() );
+	}
 	$lists['authorid']	= mosHTML::selectList( $authors, 'filter_authorid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', $filter_authorid );
 
 	HTML_content::showContent( $rows, $section, $lists, $search, $pageNav, $all, $redirect );
@@ -1113,8 +1115,9 @@
 
 	$categories[] = mosHTML::makeOption( '0', T_('- All Categories -') );
 	$database->setQuery( $query );
-	$categories = array_merge( $categories, $database->loadObjectList() );
-
+	if (is_array($database->loadObjectList())) {
+	  $categories = array_merge( $categories, $database->loadObjectList() );
+	}
 	$category = mosHTML::selectList( $categories, 'catid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', $active );
 
 	return $category;
diff -ruN 4.6-complete/administrator/components/com_messages/admin.messages.php 4.6.1/administrator/components/com_messages/admin.messages.php
--- 4.6-complete/administrator/components/com_messages/admin.messages.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/components/com_messages/admin.messages.php	2006-10-10 11:05:15.000000000 -0500
@@ -129,7 +129,12 @@
 		echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n";
 		exit();
 	}
-
+	
+	require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpInputFilter/class.inputfilter.php');
+	$iFilter = new InputFilter( null, null, 1, 1 );
+	$row->subject = trim( $iFilter->process( $row->subject ) );
+	$row->message = trim( $iFilter->process( $row->message ) );
+	
 	if (!$row->send()) {
 		mosRedirect( "index2.php?option=com_messages&mosmsg=" . $row->getError() );
 	}
diff -ruN 4.6-complete/administrator/includes/admin.php 4.6.1/administrator/includes/admin.php
--- 4.6-complete/administrator/includes/admin.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/includes/admin.php	2006-10-10 11:05:15.000000000 -0500
@@ -254,7 +254,7 @@
 			case 'textarea':
 		        $rows = mosGetParam ($this->paramattrs, 'ROWS', 0);
 		        $cols = mosGetParam ($this->paramattrs, 'COLS', 0);
-		        $value = str_replace ('<br /', "\n", $value);
+		        $value = str_replace ('<br />', "\n", $value);
 		        $controlstring = "<textarea name='params[$name]' cols='$cols' rows='$rows' class='text_area'>$value</textarea>";
 				break;
 		    case 'spacer':
diff -ruN 4.6-complete/administrator/includes/mosAdminMenus.php 4.6.1/administrator/includes/mosAdminMenus.php
--- 4.6-complete/administrator/includes/mosAdminMenus.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/includes/mosAdminMenus.php	2006-10-10 11:05:15.000000000 -0500
@@ -480,8 +480,9 @@
 		. "\n ORDER BY ". $order
 		;
 		$database->setQuery( $query );
-		$sections = array_merge( $categories, $database->loadObjectList() );
-
+		if (is_array($database->loadObjectList())) {
+		  $sections = array_merge( $categories, $database->loadObjectList() );
+		}
 		$category = mosHTML::selectList( $sections, $name, 'class="inputbox" size="1" '. $javascript, 'value', 'text', $active );
 
 		return $category;
diff -ruN 4.6-complete/administrator/popups/pollwindow.php 4.6.1/administrator/popups/pollwindow.php
--- 4.6-complete/administrator/popups/pollwindow.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/popups/pollwindow.php	2006-10-10 11:05:15.000000000 -0500
@@ -87,10 +87,13 @@
                     if (is_numeric($def)) $result = intval($result);
                 }
             }
+            if (!get_magic_quotes_gpc()) {
+                $return = addslashes( $return );
+            }
         }
         return $result;
     } else {
         return $def;
     }
-}
+} 
 ?>
diff -ruN 4.6-complete/administrator/templates/mambo_admin_blue/css/theme.css 4.6.1/administrator/templates/mambo_admin_blue/css/theme.css
--- 4.6-complete/administrator/templates/mambo_admin_blue/css/theme.css	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/administrator/templates/mambo_admin_blue/css/theme.css	2006-10-10 11:05:15.000000000 -0500
@@ -31,9 +31,6 @@
 	overflow:	visible;
 	border:		1px solid #8C867B;
 
-	/* comment in because it's not valid css
-	filter:progid:DXImageTransform.Microsoft.Shadow(color=#BDC3BD, Direction=135, Strength=4);
-	*/
 }
 
 .ThemeOfficeSubMenuTable
@@ -270,15 +267,7 @@
 	border-top:	1px solid #C6C3BD;
 }
 
-/* image shadow animation */
 
-/*
-	seq1:	image for normal
-	seq2:	image for hover and active
-
-	To use, in the icon field, input the following:
-	<img class="seq1" src="normal.gif" /><img class="seq2" src="hover.gif" />
-*/
 
 .ThemeOfficeMenuItem img.seq1
 {
diff -ruN 4.6-complete/components/com_comment/comment.php 4.6.1/components/com_comment/comment.php
--- 4.6-complete/components/com_comment/comment.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/components/com_comment/comment.php	2006-10-10 11:05:15.000000000 -0500
@@ -33,8 +33,6 @@
 	}
 }
 
-
-
 if ($captcha_success != '2') {
 
 	# if registered users only
@@ -70,15 +68,16 @@
 		$msg = 'Thanks. Your comment has been successfully saved. ';
 		if ($auto_publish_comments == "0") {
 			$msg = $msg. "The Administrator will review and publish your comment shortly.";
-		}
-
-		mosRedirect( "index.php?option=com_content&task=view&id=".$articleid."&Itemid=".$mcitemid, $msg );
-
+		}		
+		
+		mosRedirect( "index.php?option=com_content&task=view&id=".$articleid."&Itemid=".$mcitemid."&limit=".$limit."&limitstart=".$limitstart, $msg );
 	}
 
 } else {
-	echo "<SCRIPT> alert('Incorrect Security Code'); document.location='index.php?option=com_content&task=view&id=$articleid&Itemid=$mcitemid&comments=$comments';</SCRIPT>";
+	echo "<SCRIPT> alert('Incorrect Security Code');			document.location='index.php?option=com_content&task=view&id=$articleid&Itemid=$mcitemid&limit=$limit&limitstart=$limitstart&comments=$comments';</SCRIPT>";
 }
 
 
+
+
 ?>
\ No newline at end of file
diff -ruN 4.6-complete/components/com_contact/contact.php 4.6.1/components/com_contact/contact.php
--- 4.6-complete/components/com_contact/contact.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/components/com_contact/contact.php	2006-10-10 11:05:15.000000000 -0500
@@ -28,24 +28,24 @@
 
 	function contactUserControllers ($manager) {
 		$this->manager = $manager;
-		$this->user =& mamboCore::get('currentUser');
+		$this->user = mamboCore::get('currentUser');
 		$this->op = mosGetParam($_REQUEST, 'op', '');
 		$this->con_id = mosGetParam( $_REQUEST ,'con_id', 0 );
 		$this->contact_id = mosGetParam( $_REQUEST ,'contact_id', 0 );
 		$this->catid = mosGetParam( $_REQUEST ,'catid', 0 );
-		$this->Itemid = mamboCore::get('Itemid');		
+		$this->Itemid = mamboCore::get('Itemid');
 	}
 
 	function sendmail () {
-	
+
 		global $mosConfig_usecaptcha;
-	
+
 		$captcha_success = 0;
 		if ($mosConfig_usecaptcha == '1') {
-		
+
 			session_name('mos_captcha');
 			session_start();
-			
+
 			$spamstop = mosGetParam( $_POST, 'spamstop', '' );
 
 			if(isset($_SESSION['code']) && ($_SESSION['code'] != "") && ($_SESSION['code'] == $spamstop)) {
@@ -53,11 +53,11 @@
 			} else {
 				$captcha_success = 2; // fail
 			}
-			
+
 		}
-		
-		if ($captcha_success != '2') {	
-		
+
+		if ($captcha_success != '2') {
+
 			$contact = new mosContact();
 			$contact->load($this->con_id);
 
@@ -88,9 +88,9 @@
 			alert( "<?php echo T_('Thank you for your e-mail ').$name; ?>" );
 			document.location.href='<?php echo sefRelToAbs( 'index.php?option='. $this->manager->option .'&Itemid='. $this->Itemid ); ?>';
 			</script>
-			<?php					
-		} else {			
-			echo "<SCRIPT> alert('Incorrect Security Code'); window.history.go(-1);</SCRIPT>";				
+			<?php
+		} else {
+			echo "<SCRIPT> alert('Incorrect Security Code'); window.history.go(-1);</SCRIPT>";
 		}
 	}
 
diff -ruN 4.6-complete/components/com_rss/rss.php 4.6.1/components/com_rss/rss.php
--- 4.6-complete/components/com_rss/rss.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/components/com_rss/rss.php	2006-10-10 11:05:15.000000000 -0500
@@ -12,6 +12,8 @@
 /** ensure this file is being included by a parent file */
 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
 
+global $mosConfig_absolute_path;
+
 // load feed creator class
 require_once( $mosConfig_absolute_path .'/includes/feedcreator.class.php' );
 
diff -ruN 4.6-complete/components/com_weblinks/weblinks.html.php 4.6.1/components/com_weblinks/weblinks.html.php
--- 4.6-complete/components/com_weblinks/weblinks.html.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/components/com_weblinks/weblinks.html.php	2006-10-10 11:05:15.000000000 -0500
@@ -190,33 +190,37 @@
 		?>
 		<ul>
 		<?php
-		foreach ( $categories as $cat ) {
-			if ( $catid == $cat->catid ) {
-				?>
-				<li>
-					<b>
-					<?php echo $cat->name;?>
-					</b>
-					&nbsp;
-					<span class="small">
-					(<?php echo $cat->numlinks;?>)
-					</span>
-				</li>
-				<?php
-			} else {
-				$link = 'index.php?option=com_weblinks&catid='. $cat->catid .'&Itemid='. $Itemid;
-				?>
-				<li>
-					<a href="<?php echo sefRelToAbs( $link ); ?>" class="category<?php echo $params->get( 'pageclass_sfx' ); ?>">
-					<?php echo $cat->name;?>
-					</a>
-					&nbsp;
-					<span class="small">
-					(<?php echo $cat->numlinks;?>)
-					</span>
-				</li>
-				<?php
+		if ($categories)  {
+			foreach ( $categories as $cat ) {
+				if ( $catid == $cat->catid ) {
+					?>
+					<li>
+						<b>
+						<?php echo $cat->name;?>
+						</b>
+						&nbsp;
+						<span class="small">
+						(<?php echo $cat->numlinks;?>)
+						</span>
+					</li>
+					<?php
+				} else {
+					$link = 'index.php?option=com_weblinks&catid='. $cat->catid .'&Itemid='. $Itemid;
+					?>
+					<li>
+						<a href="<?php echo sefRelToAbs( $link ); ?>" class="category<?php echo $params->get( 'pageclass_sfx' ); ?>">
+						<?php echo $cat->name;?>
+						</a>
+						&nbsp;
+						<span class="small">
+						(<?php echo $cat->numlinks;?>)
+						</span>
+					</li>
+					<?php
+				}
 			}
+		} else {
+			echo T_('There are currently no links');
 		}
 		?>
 		</ul>
diff -ruN 4.6-complete/components/com_weblinks/weblinks.php 4.6.1/components/com_weblinks/weblinks.php
--- 4.6-complete/components/com_weblinks/weblinks.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/components/com_weblinks/weblinks.php	2006-10-10 11:05:15.000000000 -0500
@@ -234,7 +234,7 @@
 * @param database A database connector object
 */
 function saveWeblink( $option ) {
-	global $database, $my;
+	global $database, $my, $mosConfig_absolute_path, $mosConfig_mailfrom;
 
 	if ($my->gid < 1) {
 		mosNotAuth();
@@ -263,21 +263,22 @@
 	}
 	$row->checkin();
 
-	/** Notify admin's */
-	$query = "SELECT email, name"
-	. "\n FROM #__users"
-	. "\n WHERE usertype = 'super administrator'"
-	. "\n AND sendemail = '1'"
-	;
+	// messaging for new items
+	require_once( $mosConfig_absolute_path .'/components/com_messages/messages.class.php' );
+
+	$query = "SELECT id,email FROM #__users WHERE sendEmail = '1'";			
 	$database->setQuery( $query );
-	if(!$database->query()) {
-		echo $database->stderr( true );
-		return;
-	}
+	$rows = $database->loadObjectList();
 
-	$adminRows = $database->loadObjectList();
-	foreach( $adminRows as $adminRow) {
-		sendAdminMail($adminRow->name, $adminRow->email, 'Web Link', $row->title, $my->username );
+	foreach ($rows as $user) {	
+	
+		// admin message
+		$msg = new mosMessage( $database );
+		$msg->send( $my->id, $user->id, T_("New Item"), sprintf( T_('A new WebLink has been submitted by [ %s ]  titled [ %s ] '), $my->username, $row->title ) );
+		
+		// email message
+		mosMail ( $mosConfig_mailfrom, $mosConfig_mailfrom, $user->email, "A new Web Link has been submitted", 'A new WebLink has been submitted by ['.$my->username.'] titled ['.$row->title.']. Please login to view and approve it.');
+	
 	}
 
 	$msg 	= $isNew ? T_('Thanks for your submission; it will be reviewed before being posted to the site.') : '';
@@ -285,21 +286,4 @@
 	mosRedirect( 'index.php?Itemid='. $Itemid, $msg );
 }
 
-/**
-* Sends mail to admin
-*/
-function sendAdminMail( $adminName, $adminEmail, $type, $title, $author ) {
-	$mosConfig_live_site = mamboCore::get('mosConfig_live_site');
-	$from = mamboCore::get('mosConfig_mailfrom');
-	$fromname = mamboCore::get('mosConfig_fromname');
-	$subject = sprintf(T_("User Submitted '%'"),$type);
-	$message = sprintf(T_('Hello %s,\n\n\nA user submitted %s:\n [ %s ]\n has been just been submitted by user:\n [ %s ]\n'
-.' for %s.\n\n\n\n'
-.'Please go to %s/administrator to view and approve this %s.\n\n'
-.'Please do not respond to this message as it is automatically generated and is for information purposes only\n'), $adminName, $type, $title, $author, $mosConfig_live_site, $mosConfig_live_site, $type);
-	require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpmailer/class.phpmailer.php');
-	$mail =& new mosMailer ($from, $fromname, $subject, $message);
-	return $mail->mosMail($adminEmail);
-}
-
 ?>
diff -ruN 4.6-complete/includes/authenticator.php 4.6.1/includes/authenticator.php
--- 4.6-complete/includes/authenticator.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/includes/authenticator.php	2006-10-10 11:05:15.000000000 -0500
@@ -36,6 +36,7 @@
 			exit();
 		} else {
 			$username = $database->getEscaped($username);
+			$passwd = $database->getEscaped($passwd);
 			$loginfo =& new mosLoginDetails($username, $passwd, $remember);
 			$checkuser = true;
 			$logresults = $mambothandler->trigger('requiredLogin',array($loginfo));
diff -ruN 4.6-complete/includes/compat.php5xx.php 4.6.1/includes/compat.php5xx.php
--- 4.6-complete/includes/compat.php5xx.php	1969-12-31 18:00:00.000000000 -0600
+++ 4.6.1/includes/compat.php5xx.php	2006-10-10 11:05:15.000000000 -0500
@@ -0,0 +1,66 @@
+<?php
+/**
+* @package Mambo Open Source
+* @copyright (C) 2005 - 2006 Mambo Foundation Inc.
+* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
+*
+* Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure
+* that Mambo remained free Open Source software owned and managed by the community.
+* Mambo is Free Software
+*/ 
+
+/** ensure this file is being included by a parent file */
+defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
+
+/**
+ * Replace stripos()
+ *
+ * @category    PHP
+ * @package     PHP_Compat
+ * @link        http://php.net/function.stripos
+ * @author      Aidan Lister <aidan@php.net>
+ * @version     $Revision: 1.13 $
+ * @since       PHP 5
+ * @require     PHP 4.0.0 (user_error)
+ */
+if (!function_exists('stripos')) {
+    function stripos($haystack, $needle, $offset = null)
+    {
+        if (!is_scalar($haystack)) {
+            user_error('stripos() expects parameter 1 to be string, ' .
+                gettype($haystack) . ' given', E_USER_WARNING);
+            return false;
+        }
+
+        if (!is_scalar($needle)) {
+            user_error('stripos() needle is not a string or an integer.', E_USER_WARNING);
+            return false;
+        }
+
+        if (!is_int($offset) && !is_bool($offset) && !is_null($offset)) {
+            user_error('stripos() expects parameter 3 to be long, ' .
+                gettype($offset) . ' given', E_USER_WARNING);
+            return false;
+        }
+
+        // Manipulate the string if there is an offset
+        $fix = 0;
+        if (!is_null($offset)) {
+            if ($offset > 0) {
+                $haystack = substr($haystack, $offset, strlen($haystack) - $offset);
+                $fix = $offset;
+            }
+        }
+
+        $segments = explode(strtolower($needle), strtolower($haystack), 2);
+
+        // Check there was a match
+        if (count($segments) === 1) {
+            return false;
+        }
+
+        $position = strlen($segments[0]) + $fix;
+        return $position;
+    }
+}
+?>
\ No newline at end of file
diff -ruN 4.6-complete/includes/core.classes.php 4.6.1/includes/core.classes.php
--- 4.6-complete/includes/core.classes.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/includes/core.classes.php	2006-10-10 11:05:15.000000000 -0500
@@ -316,7 +316,7 @@
         $f = @fopen($this->rootPath.'/configuration.php','rb');
         if ($f) {
             while ($f AND !feof($f)) {
-                $line = fgets($f, 256);
+                $line = fgets($f);
                 $altered = str_replace('$', '$this->', $line);
                 if ($altered != $line) $code .= $altered;
             }
@@ -564,7 +564,7 @@
         require_once($this->rootPath().'/includes/authenticator.php');
         $authenticator =& mamboAuthenticator::getInstance();
         $loggedin = $authenticator->loginUser();
-        if ($loggedin) $this->logMessage(_LOGIN_SUCCESS);
+        if ($loggedin) $this->logMessage('_LOGIN_SUCCESS');
         else mamboCore::redirect('index.php');
     }
 
@@ -576,7 +576,7 @@
         require_once($this->rootPath().'/includes/authenticator.php');
         $authenticator =& mamboAuthenticator::getInstance();
         $authenticator->logoutUser();
-        $this->logMessage(_LOGOUT_SUCCESS);
+        $this->logMessage('_LOGOUT_SUCCESS');
     }
 
     /**
@@ -804,9 +804,10 @@
 	* Make a pathway string for display
 	*/
     function makePathway () {
-        $last = count($this->_names) - 1;
-        if ($last == 0) return '';
         $mainframe =& mosMainFrame::getInstance();
+    	$customs = $mainframe->getCustomPathWay();
+    	$last = count($this->_names) - 1;
+        if ($last == 0 AND count($customs == 0)) return '';
         $result = "<span class='pathway'>";
         $config =& mamboCore::getMamboCore();
         $rootpath = $config->rootPath();
@@ -818,16 +819,16 @@
             else $img = '&gt;';
         }
         foreach ($this->_names as $i=>$name) {
-            if ($i === $last) $result .= "$name";
+            if ($i === $last AND count($customs) == 0) $result .= "$name</span>";
+            elseif (strstr($this->_urls[$i], 'view')) $result .= ""; 
             else {
                 $sefurl = sefRelToAbs($this->_urls[$i]);
                 $result .= "<a href='$sefurl' class='pathway'>$name</a>";
                 $result .= "&nbsp;$img&nbsp;";
             }
         }
-        $customs = $mainframe->getCustomPathWay();
         foreach ($customs as $custom) $result .= $custom;
-        $result .= '</span>';
+        if (count($customs)) $result .= '</span>';
         return $result;
     }
 
@@ -2032,7 +2033,7 @@
 	 */
     function check() {
     	Global $mosConfig_absolute_path;
-    	include $mosConfig_absolute_path . ('language/english.php');
+    	include $mosConfig_absolute_path . ('/language/english.php');
         $this->_error = '';
         if ($this->name == '') $this->_error = _REGWARN_NAME;
         elseif ($this->username == '') $this->_error = _REGWARN_UNAME;
@@ -2575,6 +2576,43 @@
 		<?php
     }
 
+
+    /**
+	* retained for backward compatability
+	*/
+	function getBlogSectionCount() {
+		require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php');
+		$handler =& new contentHandler();
+		return $handler->getBlogSectionCount();
+	}
+
+	function getBlogCategoryCount() {
+		require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php');
+		$handler =& new contentHandler();
+		return $handler->getBlogCategoryCount();
+	}
+
+	function getGlobalBlogSectionCount() {
+		require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php');
+		$handler =& new contentHandler();
+		return $handler->getGlobalBlogSectionCount();
+	}
+
+	function getStaticContentCount() {
+		require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php');
+		$handler =& new contentHandler();
+		return $handler->getStaticContentCount();
+	}
+
+	function getContentItemLinkCount() {
+		require_once(mamboCore::get('mosConfig_absolute_path').'/components/com_content/content.class.php');
+		$handler =& new contentHandler();
+		return $handler->getContentItemLinkCount();
+	}
+	/**
+	* retained for backward compatability
+	*/
+
 }
 
 /**
diff -ruN 4.6-complete/includes/magpierss/rss_fetch.php 4.6.1/includes/magpierss/rss_fetch.php
--- 4.6-complete/includes/magpierss/rss_fetch.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/includes/magpierss/rss_fetch.php	2006-10-10 11:05:15.000000000 -0500
@@ -355,7 +355,7 @@
     }
 
     if ( !defined('MAGPIE_OUTPUT_ENCODING') ) {
-        define('MAGPIE_OUTPUT_ENCODING', 'ISO-8859-1');
+        define('MAGPIE_OUTPUT_ENCODING', null);
     }
     
     if ( !defined('MAGPIE_INPUT_ENCODING') ) {
diff -ruN 4.6-complete/includes/mamboHTML.php 4.6.1/includes/mamboHTML.php
--- 4.6-complete/includes/mamboHTML.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/includes/mamboHTML.php	2006-10-10 11:05:15.000000000 -0500
@@ -41,7 +41,9 @@
 	* @returns string HTML for the select list
 	*/
 	function selectList ( &$arr, $tag_name, $tag_attribs, $key, $text, $selected=NULL ) {
-		reset( $arr );
+		if (is_array($arr)){
+		  reset( $arr );
+		}
 		$html = "\n<select name=\"$tag_name\" $tag_attribs>";
 		for ($i=0, $n=count( $arr ); $i < $n; $i++ ) {
 			$k = $arr[$i]->$key;
diff -ruN 4.6-complete/includes/pageNavigation.php 4.6.1/includes/pageNavigation.php
--- 4.6-complete/includes/pageNavigation.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/includes/pageNavigation.php	2006-10-10 11:05:15.000000000 -0500
@@ -86,7 +86,15 @@
 	* Writes the html links for pages, eg, previous, next, 1 2 3 ... x
 	* @param string The basic link to include in the href
 	*/
-	function writePagesLinks( $link ) {
+	function writePagesLinks( $link ) {		
+		
+		// clean link - could be better filtered in rewrite
+		// stops XSS
+		require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpInputFilter/class.inputfilter.php');
+		$iFilter = new InputFilter( null, null, 1, 1 );			
+		$link = trim( $iFilter->process( $link ) );			
+		$link = preg_replace("/(task.*?)&/i", "", $link);		
+		
 		$txt = '';
 
 		$displayed_pages = 10;
@@ -128,7 +136,10 @@
 			$txt .= '<span class="pagenav">'. T_('Next') .' &gt;</span> ';
 			$txt .= '<span class="pagenav">'. T_('End') .' &gt;&gt;</span>';
 		}
-		return $txt;
+		
+
+			
+			return $txt;
 	}
 }
 ?>
\ No newline at end of file
diff -ruN 4.6-complete/includes/version.php 4.6.1/includes/version.php
--- 4.6-complete/includes/version.php	2006-09-20 19:05:04.000000000 -0500
+++ 4.6.1/includes/version.php	2006-10-10 11:05:15.000000000 -0500
@@ -18,11 +18,11 @@
 	/** @var string Development Status */
 	var $DEV_STATUS = 'Stable';
 	/** @var int Sub Release Level */
-	var $DEV_LEVEL = '0';
+	var $DEV_LEVEL = '1';
 	/** @var string Codename */
-	var $CODENAME = 'Graff';
+	var $CODENAME = 'Helix';
 	/** @var string Date */
-	var $RELDATE = '18-Sept-2006';
+	var $RELDATE = '5-Oct-2006';
 	/** @var string Time */
 	var $RELTIME = '03:00';
 	/** @var string Timezone */
@@ -33,4 +33,4 @@
 	var $URL = '<a href="http://mambo-foundation.org">Mambo</a> is Free Software released under the GNU/GPL License.';
 }
 
-?>
+?>
diff -ruN 4.6-complete/index.php 4.6.1/index.php
--- 4.6-complete/index.php	2006-09-20 19:05:08.000000000 -0500
+++ 4.6.1/index.php	2006-10-10 11:05:15.000000000 -0500
@@ -43,6 +43,9 @@
                     if (is_numeric($def)) $result = intval($result);
                 }
             }
+            if (!get_magic_quotes_gpc()) {
+                $return = addslashes( $return );
+            }
         }
         return $result;
     } else {
@@ -75,6 +78,7 @@
 
 if (phpversion() < '4.2.0') require_once( $configuration->rootPath() . '/includes/compat.php41x.php' );
 if (phpversion() < '4.3.0') require_once( $configuration->rootPath() . '/includes/compat.php42x.php' );
+if (phpversion() < '5.0.0') require_once( $configuration->rootPath() . '/includes/compat.php5xx.php' );
 
 $local_backup_path = $configuration->rootPath().'/administrator/backups';
 $media_path = $configuration->rootPath().'/media/';
diff -ruN 4.6-complete/mambots/content/moscomment.php 4.6.1/mambots/content/moscomment.php
--- 4.6-complete/mambots/content/moscomment.php	2006-09-20 19:05:03.000000000 -0500
+++ 4.6.1/mambots/content/moscomment.php	2006-10-10 11:05:15.000000000 -0500
@@ -37,7 +37,7 @@
       if ( $total >= 0 ) {
 
       	$comments = "<hr/ >";
-		$comments .= "<table width='100%' border='0' cellspacing='1' cellpadding='4'>";
+				$comments .= "<table width='100%' border='0' cellspacing='1' cellpadding='4'>";
         $comments .= "<tr><td class='sectiontableheader'>".T_('User Comments')."</td></tr>";
 
         $database->setQuery( "SELECT id as mcid, name as mcname, startdate as mcdate, comments as mccomment FROM #__comment WHERE articleid='$row->id' AND published='1'" );
@@ -83,6 +83,9 @@
         $comment_form .= "<INPUT TYPE='hidden' NAME='mcitemid' value='$Itemid'>";
         $comment_form .= "<INPUT TYPE='hidden' NAME='articleid' value='$row->id'>";
         $comment_form .= "<INPUT TYPE='hidden' NAME='func' value='entry'>";
+				$comment_form .= "<INPUT TYPE='hidden' NAME='limit' value='".mosGetParam( $_GET, 'limit', '' )."'>";
+				$comment_form .= "<INPUT TYPE='hidden' NAME='limitstart' value='".mosGetParam( $_GET, 'limitstart', '' )."'>";
+
         if ($my->username) {
           $comment_form .= "<INPUT TYPE='hidden' NAME='mcname' value='$my->username'>";
         } else {
@@ -105,8 +108,20 @@
 
     # If we are not on the content page itself
     } elseif (in_array ($row->sectionid, $seclistarray)) {
-	 	$replacementlink = "<a class=\"readon\" href='".sefRelToAbs("index.php?option=com_content&task=view&id=$row->id")."'>";
-        $row->text = $row->text.$replacementlink.T_('Write Comment')." (".$total.T_(' comments').")</a>";
+		
+		# count number of pages
+        $regex = '/{(mospagebreak)\s*(.*?)}/i';		
+        $matches = array();
+        preg_match_all( $regex, $row->text, $matches, PREG_SET_ORDER );
+        $botLimitStart = count($matches);
+		
+        $replacementlink = "<a class=\"readon\" href='".sefRelToAbs("index.php?option=com_content&task=view&id=$row->id");
+        $replacementlink .= "&Itemid=";
+        $replacementlink .= $Itemid ? $Itemid : 1;
+        $replacementlink .= $botLimitStart > 0 ? ('&limit=1&limitstart='.$botLimitStart) : '';
+        $replacementlink .= "'>";
+        $row->text = $row->text.$replacementlink.T_('Write Comment')." (".$total.T_(' comments').")</a>";		
+		
     }
 
   }
diff -ruN 4.6-complete/mambots/content/mosemailcloak.php 4.6.1/mambots/content/mosemailcloak.php
--- 4.6-complete/mambots/content/mosemailcloak.php	2006-09-20 19:05:03.000000000 -0500
+++ 4.6.1/mambots/content/mosemailcloak.php	2006-10-10 11:05:15.000000000 -0500
@@ -7,7 +7,7 @@
 * Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure
 * that Mambo remained free Open Source software owned and managed by the community.
 * Mambo is Free Software
-*/ 
+*/
 
 /** ensure this file is being included by a parent file */
 defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
@@ -19,11 +19,12 @@
 */
 function botMosEmailCloak( $published, &$row, &$cparams, $page=0, $params ) {
 	global $database;
-	
+
  	$mode		= $params->def( 'mode', 1 );
- 	$search 	= "([[:alnum:]_\.\-]+)(\@[[:alnum:]\.\-]+\.+)([[:alnum:]\.\-]+)";
+ 	//$search 	= "([[:alnum:]_\.\-]+)(\@[[:alnum:]\.\-]+\.+)([[:alnum:]\.\-]+)";
+ 	$search 	= "([[:alnum:]_\.\-]+)(\@[[:alnum:]\.\-]+\.+)([[:alnum:]\.\-\?\=\%]+)";
  	$search_text 	= "([[:alnum:][:space:][:punct:]][^<>]+)";
- 
+
 	// search for derivativs of link code <a href="mailto:email@amail.com">email@amail.com</a>
 	// extra handling for inclusion of title and target attributes either side of href attribute
 	$searchlink	= "(<a [[:alnum:] _\"\'=\@\.\-]*href=[\"\']mailto:". $search ."[\"\'][[:alnum:] _\"\'=\@\.\-]*>)". $search ."</a>";
@@ -32,27 +33,27 @@
 	while( eregi( $searchlink, $localtext, $regs ) ) {
 		$mail 		= $regs[2] . $regs[3] . $regs[4];
 		$mail_text 	= $regs[5] . $regs[6] . $regs[7];
-		
+
 		// check to see if mail text is different from mail addy
-		if ( $mail_text ) {			
+		if ( $mail_text ) {
 			$replacement 	= mosHTML::emailCloaking( $mail, $mode, $mail_text );
 		} else {
 			$replacement 	= mosHTML::emailCloaking( $mail, $mode );
-		}		
-		
+		}
+
 		// replace the found address with the js cloacked email
 		$localtext 	= str_replace( $regs[0], $replacement, $localtext );
 	}
-	
+
 	// search for derivativs of link code <a href="mailto:email@amail.com">anytext</a>
 	// extra handling for inclusion of title and target attributes either side of href attribute
 	$searchlink	= "(<a [[:alnum:] _\"\'=\@\.\-]*href=[\"\']mailto:". $search ."[\"\'][[:alnum:] _\"\'=\@\.\-]*)>". $search_text ."</a>";
 	while( eregi( $searchlink, $localtext, $regs ) ) {
 		$mail 		= $regs[2] . $regs[3] . $regs[4];
 		$mail_text 	= $regs[5];
-		
+
 		$replacement 	= mosHTML::emailCloaking( $mail, $mode, $mail_text, 0 );
-		
+
 		// replace the found address with the js cloacked email
 		$localtext 	= str_replace( $regs[0], $replacement, $localtext );
 	}
@@ -62,7 +63,7 @@
 		$mail = $regs[0];
 
 		$replacement = mosHTML::emailCloaking( $mail, $mode );
-		
+
 		// replace the found address with the js cloacked email
 		$localtext = str_replace( $regs[0], $replacement, $localtext );
 	}
diff -ruN 4.6-complete/mambots/content/mosvote.php 4.6.1/mambots/content/mosvote.php
--- 4.6-complete/mambots/content/mosvote.php	2006-09-20 19:05:03.000000000 -0500
+++ 4.6.1/mambots/content/mosvote.php	2006-10-10 11:05:15.000000000 -0500
@@ -50,6 +50,10 @@
 		$url = @$_SERVER['REQUEST_URI'];
 		$url = ampReplace( $url );
 		
+		require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpInputFilter/class.inputfilter.php');
+		$iFilter = new InputFilter( null, null, 1, 1 );
+		$url = trim( $iFilter->process( $url ) );
+		
 		if (!$params->get( 'intro_only' ) && $task != "blogsection") {
 			$html .= '<span class="content_vote">';
 			$html .= T_('Poor');
diff -ruN 4.6-complete/modules/mod_banners.php 4.6.1/modules/mod_banners.php
--- 4.6-complete/modules/mod_banners.php	2006-09-20 19:05:08.000000000 -0500
+++ 4.6.1/modules/mod_banners.php	2006-10-10 11:05:15.000000000 -0500
@@ -72,7 +72,7 @@
 			echo $banner->custombannercode;
 		} else if (eregi( "(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$", $banner->imageurl )) {
 			$imageurl = "$mosConfig_live_site/images/banners/$banner->imageurl";
-			echo "<a href=\"".sefRelToAbs("index.php?option=com_banners&amp;task=click&amp;bid=$banner->bid")."\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt=\"".T_('Advertisement')."\" /></a>";
+			echo "<a href=\"".sefRelToAbs("index.php?option=com_banners&amp;task=click&amp;bid=$banner->bid")."\" target=\"_blank\"><img src=\"$imageurl\" border=\"0\" alt=\"".T_('Banner')."\" /></a>";
 			
 		} else if (eregi("\.swf$", $banner->imageurl)) {
 			$imageurl = "$mosConfig_live_site/images/banners/".$banner->imageurl;
diff -ruN 4.6-complete/modules/mod_banners.xml 4.6.1/modules/mod_banners.xml
--- 4.6-complete/modules/mod_banners.xml	2006-09-20 19:05:08.000000000 -0500
+++ 4.6.1/modules/mod_banners.xml	2006-10-10 11:05:15.000000000 -0500
@@ -2,12 +2,12 @@
 <mosinstall type="module" version="4.6">
 	<name>Banner</name>
 	<author>Mambo Foundation</author>
-	<creationDate>August 2006</creationDate>
+	<creationDate>Oct 2006</creationDate>
 	<copyright>copyright (C) 2005 - 2006 Mambo Foundation Inc.</copyright>
 	<license>http://www.gnu.org/copyleft/gpl.html GNU/GPL</license>
 	<authorEmail>core@mambo-foundation.org</authorEmail>
 	<authorUrl>mambo-foundation.org</authorUrl>
-	<version>1.0</version>
+	<version>1.1</version>
 	<description>The banner module allows to show the active banners out of the component within your site.</description>
 	<files>
 		<filename module="mod_banners">mod_banners.php</filename>
