<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>inc/app/cms/boxes/services/webhooks/access.php</filename>
    </added>
    <added>
      <filename>inc/app/cms/boxes/services/webhooks/index.php</filename>
    </added>
    <added>
      <filename>inc/app/cms/boxes/services/webhooks/service.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/index/access.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/index/index.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/index/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/related/access.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/related/index.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/related/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/rpc/access.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/rpc/index.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/rpc/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/tags/access.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/tags/index.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/boxes/tags/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/conf/config.ini.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/conf/properties.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/conf/sets/keywords.ini.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/docs/en/001-about-sitetag.html</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/docs/en/002-tag-sets.html</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/docs/en/003-boxes.html</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/forms/edit/access.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/forms/edit/index.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/forms/edit/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/html/cloud.spt</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/html/list-items.spt</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/html/related.spt</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/html/tags.js</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/html/tags.spt</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/install/install-mysql.sql</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/lib/Filters.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/lib/TagCloud.php</filename>
    </added>
    <added>
      <filename>inc/app/sitetag/lib/Widget/Taginput.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/comments/access.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/comments/index.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/comments/rpc/access.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/comments/rpc/index.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/comments/rpc/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/comments/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/rating/access.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/rating/index.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/rating/rpc/access.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/rating/rpc/index.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/rating/rpc/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/rating/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/reviews/.index.php.swp</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/reviews/access.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/reviews/index.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/reviews/rpc/access.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/reviews/rpc/index.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/reviews/rpc/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/boxes/reviews/settings.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/conf/config.ini.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/conf/properties.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/docs/en/001-overview.html</filename>
    </added>
    <added>
      <filename>inc/app/ui/docs/en/002-rating.html</filename>
    </added>
    <added>
      <filename>inc/app/ui/docs/en/003-comments.html</filename>
    </added>
    <added>
      <filename>inc/app/ui/html/comment-add.js</filename>
    </added>
    <added>
      <filename>inc/app/ui/html/comment-add.spt</filename>
    </added>
    <added>
      <filename>inc/app/ui/html/comment-item.spt</filename>
    </added>
    <added>
      <filename>inc/app/ui/html/comments.css</filename>
    </added>
    <added>
      <filename>inc/app/ui/html/comments.spt</filename>
    </added>
    <added>
      <filename>inc/app/ui/html/review-add.js</filename>
    </added>
    <added>
      <filename>inc/app/ui/html/review-add.spt</filename>
    </added>
    <added>
      <filename>inc/app/ui/html/review-item.spt</filename>
    </added>
    <added>
      <filename>inc/app/ui/install/INSTALL</filename>
    </added>
    <added>
      <filename>inc/app/ui/install/install-mysql.sql</filename>
    </added>
    <added>
      <filename>inc/app/ui/js/rpc.rating.js</filename>
    </added>
    <added>
      <filename>inc/app/ui/js/ui.stars.css</filename>
    </added>
    <added>
      <filename>inc/app/ui/js/ui.stars.gif</filename>
    </added>
    <added>
      <filename>inc/app/ui/js/ui.stars.js</filename>
    </added>
    <added>
      <filename>inc/app/ui/js/ui.stars.min.css</filename>
    </added>
    <added>
      <filename>inc/app/ui/js/ui.stars.min.js</filename>
    </added>
    <added>
      <filename>inc/app/ui/lib/Comments.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/lib/Filters.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/lib/Reviews.php</filename>
    </added>
    <added>
      <filename>inc/app/ui/lib/Widget/Rating.php</filename>
    </added>
    <added>
      <filename>inc/app/upgrade/boxes/5_0_3/index.php</filename>
    </added>
    <added>
      <filename>js/jquery-ui-1.7.2.min.js</filename>
    </added>
    <added>
      <filename>js/jquery.ajaxQueue.js</filename>
    </added>
    <added>
      <filename>js/jquery.autocomplete.css</filename>
    </added>
    <added>
      <filename>js/jquery.autocomplete.js</filename>
    </added>
    <added>
      <filename>js/jquery.autocomplete.pack.js</filename>
    </added>
    <added>
      <filename>js/jquery.bgiframe.min.js</filename>
    </added>
    <added>
      <filename>js/jquery.tinysort.js</filename>
    </added>
    <added>
      <filename>js/jquery.tinysort.min.js</filename>
    </added>
    <added>
      <filename>js/jquery.tinysort.packed.js</filename>
    </added>
    <added>
      <filename>js/thickbox-compressed.js</filename>
    </added>
    <added>
      <filename>js/thickbox.css</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -33,10 +33,11 @@ class EditForm extends MailForm {
 
 		$b =&amp; $w-&gt;getButton ();
 		$b-&gt;setValues (intl_get ('Save'));
+		$b-&gt;extra = 'onclick=&quot;onbeforeunload_form_submitted=true;&quot;';
 
 		$b =&amp; $w-&gt;addButton ('submit_button');
 		$b-&gt;setValues (intl_get ('Cancel'));
-		$b-&gt;extra = 'onclick=&quot;window.location.href = \'' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $cgi-&gt;appname . '&amp;lang=' . $cgi-&gt;lang . '\'; return false&quot;';
+		$b-&gt;extra = 'onclick=&quot;onbeforeunload_form_submitted=true; window.location.href = \'' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $cgi-&gt;appname . '&amp;lang=' . $cgi-&gt;lang . '\'; return false&quot;';
 	}
 
 	function onSubmit ($vals) {
@@ -88,4 +89,4 @@ page_title (intl_get ('Editing Help File') . ': ' . $cgi-&gt;title);
 $form = new EditForm ();
 echo $form-&gt;run ();
 
-?&gt;
\ No newline at end of file
+?&gt;</diff>
      <filename>inc/app/appdoc/boxes/helpdoc/edit/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -59,7 +59,7 @@ fields = &quot;id, body&quot;
 [facet:owner]
 
 type = select
-display = Ower
+display = Owner
 values = &quot;db_shift_array (`select distinct owner from sitewiki_page where owner != ''`)&quot;
 
-; */ ?&gt;
\ No newline at end of file
+; */ ?&gt;</diff>
      <filename>inc/app/cms/conf/collections/sitewiki_page.php</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,12 @@ name                    = Document Workflow Notifier
 
 handler                 = &quot;box:cms/services/notice&quot;
 
+[service:cms_services_webhooks]
+
+name                    = Web Hooks
+
+handler                 = &quot;box:cms/services/webhooks&quot;
+
 [service:multilingual_services_translation]
 
 name                    = Translator Workflow Notifier</diff>
      <filename>inc/app/cms/conf/services/add.php</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,12 @@ name                    = Move Children of Deleted Pages
 
 handler                 = &quot;box:cms/services/movechildren&quot;
 
+[service:cms_services_webhooks]
+
+name                    = Web Hooks
+
+handler                 = &quot;box:cms/services/webhooks&quot;
+
 ;
 ; THE END
 ;</diff>
      <filename>inc/app/cms/conf/services/delete.php</filename>
    </modified>
    <modified>
      <diff>@@ -20,6 +20,12 @@ name                    = Update Links
 
 handler                 = &quot;box:cms/services/updatelinks&quot;
 
+[service:cms_services_webhooks]
+
+name                    = Web Hooks
+
+handler                 = &quot;box:cms/services/webhooks&quot;
+
 [service:multilingual_services_translation]
 
 name                    = Translator Workflow Notifier</diff>
      <filename>inc/app/cms/conf/services/edit.php</filename>
    </modified>
    <modified>
      <diff>@@ -14,6 +14,12 @@ name                    = Activity Logger
 
 handler                 = &quot;box:cms/services/log&quot;
 
+[service:cms_services_webhooks]
+
+name                    = Web Hooks
+
+handler                 = &quot;box:cms/services/webhooks&quot;
+
 ;
 ; THE END
 ;</diff>
      <filename>inc/app/cms/conf/services/error.php</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,12 @@
 ; Sitellite administrator first.
 ;
 
+[service:cms_services_webhooks]
+
+name                    = Web Hooks
+
+handler                 = &quot;box:cms/services/webhooks&quot;
+
 ;
 ; THE END
 ;</diff>
      <filename>inc/app/cms/conf/services/pre-delete.php</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,29 @@ setValues               = &quot;eval:array (0=&gt;'ALL', 2=&gt;2, 5=&gt;5, 10=&gt;10, 20=&gt;20, 50=
 
 value                   = 20
 
+[cms_webhooks]
+
+alt                     = &quot;Web Hooks (Sitellite will POST to these URLs on workflow events)&quot;
+
+type                    = textarea
+
+value                   = &quot;&quot;
+
+extra                   = &quot;style=`width: 100%`&quot;
+
+[cms_webhooks_auth]
+
+alt                     = Web Hooks Authorization Key
+
+type                    = text
+
+value                   = &quot;&quot;
+
+extra                   = &quot;size=`30`&quot;
+
+append                  = &quot; &lt;a href=`#` onclick=`var f=function(){var c='01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';var r='';for(var i=0;i&lt;32;i++){s=Math.floor(Math.random()*c.length);r+=c.substring(s,s+1);}return r;};document.getElementById('cms_webhooks_auth').value=f()`&gt;Auto-Generate&lt;/a&gt;&quot;
+
 ;
 ; THE END
 ;
-; DO NOT ALTER THIS LINE, IT IS HERE FOR SECURITY REASONS */ ?&gt;
+; DO NOT ALTER THIS LINE, IT IS HERE FOR SECURITY REASONS */ ?&gt;
\ No newline at end of file</diff>
      <filename>inc/app/cms/conf/settings.ini.php</filename>
    </modified>
    <modified>
      <diff>@@ -257,7 +257,7 @@ class CmsAddSitellite_sidebarForm extends MailForm {
 			$key = 'Unknown';
 		}
 
-		if (! empty ($return)) {
+		if (empty ($return)) {
 			$return = site_prefix () . '/index/cms-browse-action?collection=sitellite_sidebar';
 		}
 </diff>
      <filename>inc/app/cms/forms/add/sitellite_sidebar/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,5 @@
 &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;{site/prefix}/js/prompt.css&quot; /&gt;
-&lt;script language=&quot;javascript&quot; src=&quot;{site/prefix}/js/prototype-compressed.js&quot;&gt;&lt;/script&gt;
-&lt;script language=&quot;javascript&quot; src=&quot;{site/prefix}/js/scriptaculous/scriptaculous.js&quot;&gt;&lt;/script&gt;
+&lt;script language=&quot;javascript&quot; src=&quot;{site/prefix}/js/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
 &lt;script language=&quot;javascript&quot; src=&quot;{site/prefix}/js/prompt-compressed.js&quot;&gt;&lt;/script&gt;
 &lt;script language=&quot;javascript&quot;&gt;
 </diff>
      <filename>inc/app/cms/html/alert.spt</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,7 @@ function imagechooser_{name}_view (file, w, h) {
 		'ImageChooser',
 		'top=50,left=50,width=' + (w + 30) + ',height=' + (h + 60) + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no'
 	);
-	win.document.write ('&lt;html&gt;&lt;head&gt;&lt;title&gt;' + file + '&lt;/title&gt;&lt;/head&gt;');
+	win.document.write ('&lt;html&gt;&lt;head&gt;&lt;title&gt;' + file + '&lt;/title&gt;&lt;' + '/head&gt;');
 	win.document.write ('&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;javascript: window.close ()&quot;&gt;&lt;img src=&quot;' + file + '&quot; alt=&quot;{intl Click to close}&quot; title=&quot;{intl Click to close}&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;');
 	win.document.write ('&lt;p align=&quot;center&quot; style=&quot;font: 12px Verdana, Arial, sans-serif&quot;&gt;&lt;a href=&quot;javascript: window.close ()&quot; style=&quot;text-decoration: none; color: #d60&quot;&gt;{intl Close Window}&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;');
 	win.document.close ();</diff>
      <filename>inc/app/imagechooser/html/js.spt</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-&lt;?php// BEGIN KEEPOUT CHECKING// Add these lines to the very top of any file you don't want people to// be able to access directly.if (! defined ('SAF_VERSION')) {  header ('HTTP/1.1 404 Not Found');  echo &quot;&lt;!DOCTYPE HTML PUBLIC \&quot;-//IETF//DTD HTML 2.0//EN\&quot;&gt;\n&quot;		. &quot;&lt;html&gt;&lt;head&gt;\n&lt;title&gt;404 Not Found&lt;/title&gt;\n&lt;/head&gt;&lt;body&gt;\n&lt;h1&gt;Not Found&lt;/h1&gt;\n&quot;		. &quot;The requested URL &quot; . $PHP_SELF . &quot; was not found on this server.&lt;p&gt;\n&lt;hr&gt;\n&quot;		. $_SERVER['SERVER_SIGNATURE'] . &quot;&lt;/body&gt;&lt;/html&gt;&quot;;  exit;}// END KEEPOUT CHECKINGloader_box ('sitellite/nav/init');// import any object we need from the global namespaceglobal $page, $menu;// box logic begins hereif ($parameters['recursive'] == 'no') {	$recur = false;} else {	$recur = true;}//page_id ('sitemap');if ($context == 'action') {	page_title (intl_get ('Site Map'));}page_add_script (site_prefix () . '/js/jquery-1.2.3.min.js');page_add_script (site_prefix () . '/js/jquery.cookie.js');page_add_script (site_prefix () . '/js/jquery-treeview/jquery.treeview.min.js');page_add_style (site_prefix () . '/js/jquery-treeview/jquery.treeview.css');page_add_script ('&lt;script type=&quot;text/javascript&quot;&gt;$(function () {	$(&quot;#sitemap&quot;).treeview ({		animated: &quot;medium&quot;,		control: &quot;#sidetreecontrol&quot;,		persist: &quot;location&quot;	});});&lt;/script&gt;');page_add_style ('&lt;style type=&quot;text/css&quot;&gt;ul#sitemap&gt;li&gt;a {	font-weight: bold;}&lt;/style&gt;');echo preg_replace ('/^&lt;ul&gt;/', '&lt;ul id=&quot;sitemap&quot; class=&quot;treeview-gray&quot;&gt;', $menu-&gt;display ('html', '&lt;a href=&quot;{site/prefix}/index/{id}&quot;&gt;{title}&lt;/a&gt;', $recur));?&gt;
\ No newline at end of file
+&lt;?php// BEGIN KEEPOUT CHECKING// Add these lines to the very top of any file you don't want people to// be able to access directly.if (! defined ('SAF_VERSION')) {  header ('HTTP/1.1 404 Not Found');  echo &quot;&lt;!DOCTYPE HTML PUBLIC \&quot;-//IETF//DTD HTML 2.0//EN\&quot;&gt;\n&quot;		. &quot;&lt;html&gt;&lt;head&gt;\n&lt;title&gt;404 Not Found&lt;/title&gt;\n&lt;/head&gt;&lt;body&gt;\n&lt;h1&gt;Not Found&lt;/h1&gt;\n&quot;		. &quot;The requested URL &quot; . $PHP_SELF . &quot; was not found on this server.&lt;p&gt;\n&lt;hr&gt;\n&quot;		. $_SERVER['SERVER_SIGNATURE'] . &quot;&lt;/body&gt;&lt;/html&gt;&quot;;  exit;}// END KEEPOUT CHECKINGloader_box ('sitellite/nav/init');// import any object we need from the global namespaceglobal $page, $menu;// box logic begins hereif ($parameters['recursive'] == 'no') {	$recur = false;} else {	$recur = true;}//page_id ('sitemap');if ($context == 'action') {	page_title (intl_get ('Site Map'));}page_add_script (site_prefix () . '/js/jquery-1.3.2.min.js');page_add_script (site_prefix () . '/js/jquery.cookie.js');page_add_script (site_prefix () . '/js/jquery-treeview/jquery.treeview.min.js');page_add_style (site_prefix () . '/js/jquery-treeview/jquery.treeview.css');page_add_script ('&lt;script type=&quot;text/javascript&quot;&gt;$(function () {	$(&quot;#sitemap&quot;).treeview ({		animated: &quot;medium&quot;,		control: &quot;#sidetreecontrol&quot;,		persist: &quot;location&quot;	});});&lt;/script&gt;');page_add_style ('&lt;style type=&quot;text/css&quot;&gt;ul#sitemap&gt;li&gt;a {	font-weight: bold;}&lt;/style&gt;');echo preg_replace ('/^&lt;ul&gt;/', '&lt;ul id=&quot;sitemap&quot; class=&quot;treeview-gray&quot;&gt;', $menu-&gt;display ('html', '&lt;a href=&quot;{site/prefix}/index/{id}&quot;&gt;{title}&lt;/a&gt;', $recur));?&gt;
\ No newline at end of file</diff>
      <filename>inc/app/sitellite/boxes/nav/sitemap/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -47,7 +47,7 @@ $data = array (
 	'template_sets' =&gt; array (),
 );
 
-page_title (intl_get ('Choose a Template'));
+page_title (intl_get ('Choose a Template Set'));
 
 $path = session_get ('sitetemplate_path');
 
@@ -93,4 +93,4 @@ foreach($template_sets-&gt;readAll() as $file)
 template_simple_register ('cgi', $cgi);
 echo template_simple ('index.spt', $data);	  
 
-?&gt;
\ No newline at end of file
+?&gt;</diff>
      <filename>inc/app/sitetemplate/boxes/index/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -59,9 +59,10 @@ class SitetemplateEditForm extends MailForm {
 
 		list ($set, $tpl) = explode ('/', $vals['path']);
 
-		page_title ('Template Saved');
-		echo '&lt;p&gt;&lt;a href=&quot;' . site_prefix () . '/index/sitetemplate-templateselect-action?set_name=' . $set . '&quot;&gt;' . intl_get ('Return to template set') . '&lt;/a&gt;&lt;/p&gt;';
+		session_set ('sitellite_alert', intl_get ('Template Saved'));
+		header ('Location: ' . site_prefix () . '/index/sitetemplate-templateselect-action?set_name=' . $set);
+		exit;
 	}
 }
 
-?&gt;
\ No newline at end of file
+?&gt;</diff>
      <filename>inc/app/sitetemplate/forms/edit/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,7 @@
 
 global $cgi;
 
+@touch ('inc/html/' . $cgi-&gt;set . '/config.ini.php');
 if (! @is_writable('inc/html/' . $cgi-&gt;set) || ! @is_writable('inc/html/' . $cgi-&gt;set . '/config.ini.php')) {
 	page_title (intl_get ('An Error Occurred'));
 	echo '&lt;p&gt;' . intl_get ('Your template is not writeable by Sitellite.  Please adjust your server settings to continue.') . '&lt;/p&gt;';
@@ -63,4 +64,4 @@ class SitetemplateEditsetForm extends MailForm {
 	}
 }
 
-?&gt;
\ No newline at end of file
+?&gt;</diff>
      <filename>inc/app/sitetemplate/forms/editset/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,7 @@ function imagechooser_view (file, w, h) {
 		'Image Viewer',
 		'top=50,left=50,width=' + (w + 30) + ',height=' + (h + 60) + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,fullscreen=no'
 	);
-	win.document.write ('&lt;html&gt;&lt;head&gt;&lt;title&gt;' + file + '&lt;/title&gt;&lt;/head&gt;');
+	win.document.write ('&lt;html&gt;&lt;head&gt;&lt;title&gt;' + file + '&lt;/title&gt;&lt;' + '/head&gt;');
 	win.document.write ('&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;javascript: window.close ()&quot;&gt;&lt;img src=&quot;' + file + '&quot; alt=&quot;{intl Click to close}&quot; title=&quot;{intl Click to close}&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;');
 	win.document.write ('&lt;p align=&quot;center&quot; style=&quot;font: 12px Verdana, Arial, sans-serif&quot;&gt;&lt;a href=&quot;javascript: window.close ()&quot; style=&quot;text-decoration: none; color: #d60&quot;&gt;{intl Close Window}&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;');
 	return false;</diff>
      <filename>inc/app/sitetemplate/html/templateselect.spt</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,8 @@ function sitetemplate_preview (f) {
 }
 
 function sitetemplate_url_encode (text) {
-        orig = [/%/g, /(\r\n|\n\r|\r|\n)/g, /#/g, /&amp;/g, /\(/g, /\)/g, /\//g, /:/g, /;/g, /=/g, / /g, /&lt;/g, /&gt;/g, /\{/g, /\}/g];
+        orig = [/%/g, /(\r\n|\n\r|\r|\n)/g, /#/g, /&amp;/g, /\(/g, /\)/g, /\//g, /:/g, /;/g, /=/g, / /g, /&lt;/g, /&gt;/g, /\{/g,
+        /\}/g];
         uenc = ['%25', '%0D%0A', '%23', '%26', '%28', '%29', '%2F', '%3A', '%3B', '%3C', '+', '%3D', '%3E', '%7B', '%7D']; 
         for (i = 0; i &lt; orig.length; i++) {
                 text = text.replace (orig[i], uenc[i]);</diff>
      <filename>inc/app/sitetemplate/html/tpl_submit.spt</filename>
    </modified>
    <modified>
      <diff>@@ -58,7 +58,7 @@ fields = &quot;id, body&quot;
 [facet:owner]
 
 type = select
-display = Ower
+display = Owner
 values = &quot;db_shift_array (`select distinct owner from sitewiki_page where owner != ''`)&quot;
 
-; */ ?&gt;
\ No newline at end of file
+; */ ?&gt;</diff>
      <filename>inc/app/sitewiki/install/sitewiki_page.php</filename>
    </modified>
    <modified>
      <diff>@@ -55,8 +55,10 @@ class UsradmSettingsForm extends MailForm {
 			die ('Error writing to file: inc/conf/config.ini.php');
 		}
 
-		echo '&lt;p&gt;' . intl_get ('Site settings saved.') . '  &lt;a href=&quot;' . site_prefix () . '/index/cms-cpanel-action&quot;&gt;' . intl_get ('Continue') . '&lt;/a&gt;&lt;/p&gt;';
+		session_set ('sitellite_alert', intl_get ('Site settings saved.'));
+		header ('Location: ' . site_prefix () . '/index/cms-cpanel-action');
+		exit;
 	}
 }
 
-?&gt;
\ No newline at end of file
+?&gt;</diff>
      <filename>inc/app/usradm/forms/settings/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,7 @@
 	&lt;head&gt;
 		&lt;title&gt;{page/title}&lt;/title&gt;
 		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;{site/prefix}/js/prompt.css&quot; /&gt;
-		&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;{site/prefix}/js/prototype.js&quot;&gt;&lt;/script&gt;
-		&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;{site/prefix}/js/scriptaculous/scriptaculous.js&quot;&gt;&lt;/script&gt;
+		&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;{site/prefix}/js/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
 		&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;{site/prefix}/js/prompt.js&quot;&gt;&lt;/script&gt;
 		&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;{site/prefix}/js/dialog.js&quot;&gt;&lt;/script&gt;
 		&lt;script language=&quot;javascript&quot; type=&quot;text/javascript&quot; src=&quot;{site/prefix}/js/rpc.js&quot;&gt;&lt;/script&gt;</diff>
      <filename>inc/app/wffolderbrowser/html/browser.spt</filename>
    </modified>
    <modified>
      <diff>@@ -5,8 +5,9 @@ global $cgi;
 $cgi-&gt;html = the_cleaners ($cgi-&gt;html);
 
 page_add_style (site_prefix () . '/js/prompt.css');
-page_add_script (site_prefix () . '/js/prototype.js');
-page_add_script (site_prefix () . '/js/scriptaculous/scriptaculous.js');
+//page_add_script (site_prefix () . '/js/prototype.js');
+//page_add_script (site_prefix () . '/js/scriptaculous/scriptaculous.js');
+page_add_script (site_prefix () . '/js/jquery-1.3.2.min.js');
 page_add_script (site_prefix () . '/js/prompt.js');
 
 class XedSourceForm extends MailForm {</diff>
      <filename>inc/app/xed/forms/source/index.php</filename>
    </modified>
    <modified>
      <diff>@@ -66,7 +66,9 @@ compress_output         = Off
 
 error_reporting         = &quot;E_ALL ^ E_NOTICE&quot;
 
-xsendfile				= readfile
+xsendfile               = readfile
+
+default_timezone		= UTC
 
 [I18n]
 
@@ -78,31 +80,31 @@ serialize               = plain
 
 [Messaging]
 
-return_address          = &quot;&quot;
+return_address          = Off
 
-email_server            = &quot;&quot;
+email_server            = Off
 
 email_port              = 110
 
-email_username          = &quot;&quot;
+email_username          = Off
 
-email_password          = &quot;&quot;
+email_password          = Off
 
 jabber                  = Off
 
-jabber_server           = &quot;&quot;
+jabber_server           = Off
 
 jabber_port             = 5222
 
-jabber_username         = &quot;&quot;
+jabber_username         = Off
 
-jabber_password         = &quot;&quot;
+jabber_password         = Off
 
 [Services]
 
-recaptcha_public_key	= &quot;&quot;
+recaptcha_public_key    = Off
 
-recaptcha_private_key	= &quot;&quot;
+recaptcha_private_key   = Off
 
 ;
 ; THE END</diff>
      <filename>inc/conf/config.ini.php</filename>
    </modified>
    <modified>
      <diff>@@ -57,7 +57,9 @@ if (file_exists ('inc/conf/product.php')) {
 
 // set the error_reporting level
 eval ('?' . '&gt;&lt;?php error_reporting (' . $conf['Server']['error_reporting'] . '); ?' . '&gt;');
-
+if (function_exists ('date_default_timezone_set') &amp;&amp; $conf['Server']['default_timezone']) {
+	date_default_timezone_set ($conf['Server']['default_timezone']);
+}
 // split values which should be arrays
 //$conf['Cache']['cacheable'] = preg_split ('/, ?/', $conf['Cache']['cacheable']);
 /*************************************************************************/</diff>
      <filename>index</filename>
    </modified>
    <modified>
      <diff>@@ -79,6 +79,22 @@ Changes in 5.0.3-stable
 - Added option to replace an image file in imagechooser [#144].
 - Modified the way news story are splitted for better printing [#32].
 - Added possibility to upload many files together [#84].
+- Improved the email validation rules in saf.MailForm.Rule.
+- Fixed javascript rendering bug in SiteTemplate [#146].
+- Use alert in sitetemplate-edit-form.
+- Fixed an issue in sitetemplate. Create config file if it doesn't exist.
+- Fixed an issue with onbeforeload in AppDoc.
+- SiteTag application (first draft).
+- Use alert in usradm-settings-form.
+- Added autocompleted input box for sitetag.
+- Fixed a javascript error in the SiteTemplate edit form.
+- Added star rating ui component.
+- Added comments ui component.
+- Added web hooks to the CMS app settings and workflow services.
+- Removed prompt.js dependence on prototype.js, uses jquery instead.
+- Fixed a js error on the site maps, loading 2 versions of jquery.
+- Fixing PHP 5.3 compatibility issues and warnings.
+- Added reviews ui component.
 
 Changes in 5.0.2-stable
 </diff>
      <filename>install/changes.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1673,3 +1673,36 @@ create table myadm_report_results (
 	results mediumtext not null,
 	index (report_id, run)
 );
+
+CREATE TABLE `ui_comment` (
+  `id` int(11) NOT NULL auto_increment,
+  `name` varchar(128) NOT NULL,
+  `email` varchar(128) NOT NULL,
+  `website` varchar(256) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `comment` text NOT NULL,
+  `ip` varchar(15) NOT NULL,
+  `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `approved` tinyint(1) NOT NULL default '1',
+  PRIMARY KEY  (`id`),
+  KEY `item_group` (`item`,`group`)
+) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
+
+CREATE TABLE `ui_rating` (
+  `user` varchar(48) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `rating` int(11) default NULL,
+  PRIMARY KEY  (`user`,`item`,`group`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+CREATE TABLE `ui_review` (
+  `user` varchar(48) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `comment` text NOT NULL,
+  `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `approved` tinyint(1) NOT NULL default '1',
+  PRIMARY KEY  (`user`,`item`,`group`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;</diff>
      <filename>install/install-mysql.sql</filename>
    </modified>
    <modified>
      <diff>@@ -507,6 +507,7 @@ create table sitellite_news (
 	author char(72) not null,
 	category char(48) not null,
 	summary text not null,
+	external char(128) not null,
 	sitellite_status varchar(32) NOT NULL default '',
 	sitellite_access varchar(32) NOT NULL default '',
 	sitellite_startdate datetime default NULL,
@@ -1671,3 +1672,36 @@ create table myadm_report_results (
 	results mediumtext not null,
 	index (report_id, run)
 );
+
+CREATE TABLE `ui_comment` (
+  `id` int(11) NOT NULL auto_increment,
+  `name` varchar(128) NOT NULL,
+  `email` varchar(128) NOT NULL,
+  `website` varchar(256) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `comment` text NOT NULL,
+  `ip` varchar(15) NOT NULL,
+  `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `approved` tinyint(1) NOT NULL default '1',
+  PRIMARY KEY  (`id`),
+  KEY `item_group` (`item`,`group`)
+) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
+
+CREATE TABLE `ui_rating` (
+  `user` varchar(48) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `rating` int(11) default NULL,
+  PRIMARY KEY  (`user`,`item`,`group`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+CREATE TABLE `ui_review` (
+  `user` varchar(48) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `comment` text NOT NULL,
+  `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `approved` tinyint(1) NOT NULL default '1',
+  PRIMARY KEY  (`user`,`item`,`group`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;</diff>
      <filename>install/install-old.sql</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-var prompter_list=[];function prompt(B,A,C){p=new Prompter(C);p.open(B,A)}function Prompter(A){this.agent=navigator.userAgent.toLowerCase();this.msie=((this.agent.indexOf(&quot;msie&quot;)!=-1)&amp;&amp;(this.agent.indexOf(&quot;opera&quot;)==-1));this.width=300;this.height=125;this.popup=null;this.handler=A;this.type=&quot;text&quot;;this.options=[];this.maxlength=false;prompter_list.push(this);this.num=prompter_list.length-1}Prompter.prototype.open=function(A){if(arguments.length&gt;1){default_value=arguments[1]}else{default_value=&quot;&quot;}this.popup=document.createElement(&quot;div&quot;);w=this.popup;w.setAttribute(&quot;id&quot;,&quot;prompt-dialog-&quot;+this.num);label=document.createElement(&quot;p&quot;);label.setAttribute(&quot;class&quot;,&quot;label&quot;);label.setAttribute(&quot;className&quot;,&quot;label&quot;);label.appendChild(document.createTextNode(A));w.appendChild(label);form=document.createElement(&quot;form&quot;);p1=document.createElement(&quot;p&quot;);p1.setAttribute(&quot;align&quot;,&quot;center&quot;);form.appendChild(p1);w.appendChild(form);margin_top=scrollbar_offset();switch(this.type){case&quot;select&quot;:w.setAttribute(&quot;class&quot;,&quot;prompt-window&quot;);w.setAttribute(&quot;className&quot;,&quot;prompt-window&quot;);e=document.createElement(&quot;select&quot;);e.setAttribute(&quot;name&quot;,&quot;user&quot;);e.setAttribute(&quot;id&quot;,&quot;prompt-window-&quot;+this.num+&quot;-user&quot;);for(i=0;i&lt;this.options.length;i++){o=document.createElement(&quot;option&quot;);o.setAttribute(&quot;value&quot;,this.options[i]);if(this.options[i].value==default_value){o.setAttribute(&quot;selected&quot;,&quot;selected&quot;)}o.appendChild(document.createTextNode(this.options[i]));e.appendChild(o)}p1.appendChild(e);break;case&quot;textarea&quot;:w.setAttribute(&quot;class&quot;,&quot;prompt-window-textarea&quot;);w.setAttribute(&quot;className&quot;,&quot;prompt-window-textarea&quot;);e=document.createElement(&quot;textarea&quot;);e.setAttribute(&quot;name&quot;,&quot;user&quot;);e.setAttribute(&quot;id&quot;,&quot;prompt-window-&quot;+this.num+&quot;-user&quot;);e.setAttribute(&quot;cols&quot;,this.cols);e.setAttribute(&quot;rows&quot;,this.rows);e.style.overflow=&quot;hidden&quot;;if(this.height){w.style.height=this.height;margin_top+=Math.round(this.height/3)*-1}if(this.width){w.style.width=this.width;w.style.marginLeft=Math.round(this.width/2)*-1}e.appendChild(document.createTextNode(default_value));p1.appendChild(e);break;case&quot;text&quot;:default:w.setAttribute(&quot;class&quot;,&quot;prompt-window&quot;);w.setAttribute(&quot;className&quot;,&quot;prompt-window&quot;);e=document.createElement(&quot;input&quot;);e.setAttribute(&quot;type&quot;,&quot;text&quot;);e.setAttribute(&quot;name&quot;,&quot;user&quot;);e.setAttribute(&quot;id&quot;,&quot;prompt-window-&quot;+this.num+&quot;-user&quot;);e.setAttribute(&quot;size&quot;,&quot;30&quot;);if(this.maxlength){e.setAttribute(&quot;maxlength&quot;,this.maxlength)}e.setAttribute(&quot;value&quot;,default_value);p1.appendChild(e);break}w.style.marginTop=margin_top;p2=document.createElement(&quot;p&quot;);p2.setAttribute(&quot;align&quot;,&quot;center&quot;);num=document.createElement(&quot;input&quot;);num.setAttribute(&quot;type&quot;,&quot;hidden&quot;);num.setAttribute(&quot;name&quot;,&quot;num&quot;);num.setAttribute(&quot;value&quot;,this.num);num.setAttribute(&quot;id&quot;,&quot;prompt-window-num&quot;);ok=document.createElement(&quot;input&quot;);ok.setAttribute(&quot;type&quot;,&quot;submit&quot;);ok.setAttribute(&quot;value&quot;,&quot;OK&quot;);ok.onclick=function(){if(document.all){n=this.form.elements[&quot;prompt-window-num&quot;].value;prompter_list[n].reply(document.getElementById(&quot;prompt-window-&quot;+n+&quot;-user&quot;).value)}else{prompter_list[this.form.elements.num.value].reply(this.form.elements.user.value)}return false};cancel=document.createElement(&quot;input&quot;);cancel.setAttribute(&quot;type&quot;,&quot;submit&quot;);cancel.setAttribute(&quot;value&quot;,&quot;Cancel&quot;);cancel.onclick=function(){if(document.all){prompter_list[this.form.elements[&quot;prompt-window-num&quot;].value].reply(false)}else{prompter_list[this.form.elements.num.value].reply(false)}return false};p2.appendChild(num);p2.appendChild(ok);p2.appendChild(document.createTextNode(&quot; \u00a0 &quot;));p2.appendChild(cancel);form.appendChild(p2);alert_timeout_end(true);textareas=document.getElementsByTagName(&quot;textarea&quot;);for(i=0;i&lt;textareas.length;i++){if(textareas[i].getAttribute(&quot;id&quot;)!=&quot;prompt-window-&quot;+this.num+&quot;-user&quot;){textareas[i].style.overflow=&quot;hidden&quot;}}iframes=document.getElementsByTagName(&quot;iframe&quot;);for(i=0;i&lt;iframes.length;i++){iframes[i].style.overflow=&quot;hidden&quot;}if(document.all){document.body.appendChild(w)}else{body=document.getElementsByTagName(&quot;body&quot;)[0];body.appendChild(w)}new Effect.BlindDown(&quot;prompt-dialog-&quot;+this.num,{duration:1,afterFinish:function(B){n=B.element.id.split(&quot;-&quot;)[2];document.getElementById(&quot;prompt-window-&quot;+n+&quot;-user&quot;).style.overflow=&quot;auto&quot;;document.getElementById(&quot;prompt-window-&quot;+n+&quot;-user&quot;).focus()}});return false};Prompter.prototype.reply=function(A){if(this.type==&quot;textarea&quot;){document.getElementById(&quot;prompt-window-&quot;+this.num+&quot;-user&quot;).style.overflow=&quot;hidden&quot;}new Effect.BlindUp(&quot;prompt-dialog-&quot;+this.num,{duration:1});textareas=document.getElementsByTagName(&quot;textarea&quot;);for(i=0;i&lt;textareas.length;i++){if(textareas[i].getAttribute(&quot;id&quot;)!=&quot;prompt-window-&quot;+this.num+&quot;-user&quot;){textareas[i].style.overflow=&quot;auto&quot;}}iframes=document.getElementsByTagName(&quot;iframe&quot;);for(i=0;i&lt;iframes.length;i++){iframes[i].style.overflow=&quot;auto&quot;}this.handler(A);return false};var alert_timeout=false;var alert_loaded=false;var alert_select_boxes=[];function alert_timeout_end(){if(arguments.length&gt;0){display=true}else{display=false}if(alert_timeout){window.clearTimeout(alert_timeout)}if(display){e=document.getElementById(&quot;alert-window&quot;);if(e){e.style.display=&quot;none&quot;}}}function alert(A){if(arguments.length&gt;1){dur=arguments[1]*1000}else{dur=3000}msie=((navigator.userAgent.toLowerCase().indexOf(&quot;msie&quot;)!=-1)&amp;&amp;(navigator.userAgent.toLowerCase().indexOf(&quot;opera&quot;)==-1));alert_timeout_end(true);if(!alert_loaded){w=document.createElement(&quot;div&quot;);w.setAttribute(&quot;class&quot;,&quot;alert-window&quot;);w.setAttribute(&quot;className&quot;,&quot;alert-window&quot;);w.setAttribute(&quot;id&quot;,&quot;alert-window&quot;);w.onclick=function(){alert_timeout_end();new Effect.BlindUp(&quot;alert-window&quot;,{duration:1})};table=Builder.node(&quot;table&quot;,{width:&quot;300px&quot;,height:&quot;100px&quot;,border:&quot;0&quot;});tbody=Builder.node(&quot;tbody&quot;);tr=Builder.node(&quot;tr&quot;);td=Builder.node(&quot;td&quot;,{align:&quot;center&quot;,valign:&quot;middle&quot;,id:&quot;alert-window-contents&quot;});td.innerHTML=A;tr.appendChild(td);tbody.appendChild(tr);table.appendChild(tbody);w.appendChild(table);w.style.marginTop=scrollbar_offset();if(document.all){document.body.appendChild(w)}else{body=document.getElementsByTagName(&quot;body&quot;)[0];body.appendChild(w)}alert_loaded=true}else{document.getElementById(&quot;alert-window&quot;).style.marginTop=scrollbar_offset();document.getElementById(&quot;alert-window-contents&quot;).innerHTML=A}if(msie){boxes=document.getElementsByTagName(&quot;select&quot;);alert_select_boxes=[];for(i=0;i&lt;boxes.length;i++){if(boxes[i].style.display!=&quot;none&quot;){boxes[i].style.display=&quot;none&quot;;alert_select_boxes.push(boxes[i])}}}new Effect.BlindDown(&quot;alert-window&quot;,{duration:1});alert_timeout=window.setTimeout(function(){new Effect.BlindUp(&quot;alert-window&quot;,{duration:1});msie=((navigator.userAgent.toLowerCase().indexOf(&quot;msie&quot;)!=-1)&amp;&amp;(navigator.userAgent.toLowerCase().indexOf(&quot;opera&quot;)==-1));if(msie){for(i=0;i&lt;alert_select_boxes.length;i++){alert_select_boxes[i].style.display=&quot;inline&quot;}alert_select_boxes=[]}alert_timeout_end()},dur);return false}function scrollbar_offset(){return scrollbar_offset_filter_results(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)}function scrollbar_offset_filter_results(D,B,A){var C=D?D:0;if(B&amp;&amp;(!C||(C&gt;B))){C=B}return A&amp;&amp;(!C||(C&gt;A))?A:C};
\ No newline at end of file
+var prompter_list=[];function prompt(B,A,C){p=new Prompter(C);p.open(B,A)}function Prompter(A){this.agent=navigator.userAgent.toLowerCase();this.msie=((this.agent.indexOf(&quot;msie&quot;)!=-1)&amp;&amp;(this.agent.indexOf(&quot;opera&quot;)==-1));this.width=300;this.height=125;this.popup=null;this.handler=A;this.type=&quot;text&quot;;this.options=[];this.maxlength=false;prompter_list.push(this);this.num=prompter_list.length-1}Prompter.prototype.open=function(A){if(arguments.length&gt;1){default_value=arguments[1]}else{default_value=&quot;&quot;}this.popup=document.createElement(&quot;div&quot;);w=this.popup;w.setAttribute(&quot;id&quot;,&quot;prompt-dialog-&quot;+this.num);label=document.createElement(&quot;p&quot;);label.setAttribute(&quot;class&quot;,&quot;label&quot;);label.setAttribute(&quot;className&quot;,&quot;label&quot;);label.appendChild(document.createTextNode(A));w.appendChild(label);form=document.createElement(&quot;form&quot;);p1=document.createElement(&quot;p&quot;);p1.setAttribute(&quot;align&quot;,&quot;center&quot;);form.appendChild(p1);w.appendChild(form);margin_top=scrollbar_offset();switch(this.type){case&quot;select&quot;:w.setAttribute(&quot;class&quot;,&quot;prompt-window&quot;);w.setAttribute(&quot;className&quot;,&quot;prompt-window&quot;);e=document.createElement(&quot;select&quot;);e.setAttribute(&quot;name&quot;,&quot;user&quot;);e.setAttribute(&quot;id&quot;,&quot;prompt-window-&quot;+this.num+&quot;-user&quot;);for(i=0;i&lt;this.options.length;i++){o=document.createElement(&quot;option&quot;);o.setAttribute(&quot;value&quot;,this.options[i]);if(this.options[i].value==default_value){o.setAttribute(&quot;selected&quot;,&quot;selected&quot;)}o.appendChild(document.createTextNode(this.options[i]));e.appendChild(o)}p1.appendChild(e);break;case&quot;textarea&quot;:w.setAttribute(&quot;class&quot;,&quot;prompt-window-textarea&quot;);w.setAttribute(&quot;className&quot;,&quot;prompt-window-textarea&quot;);e=document.createElement(&quot;textarea&quot;);e.setAttribute(&quot;name&quot;,&quot;user&quot;);e.setAttribute(&quot;id&quot;,&quot;prompt-window-&quot;+this.num+&quot;-user&quot;);e.setAttribute(&quot;cols&quot;,this.cols);e.setAttribute(&quot;rows&quot;,this.rows);e.style.overflow=&quot;hidden&quot;;if(this.height){w.style.height=this.height;margin_top+=Math.round(this.height/3)*-1}if(this.width){w.style.width=this.width;w.style.marginLeft=Math.round(this.width/2)*-1}e.appendChild(document.createTextNode(default_value));p1.appendChild(e);break;case&quot;text&quot;:default:w.setAttribute(&quot;class&quot;,&quot;prompt-window&quot;);w.setAttribute(&quot;className&quot;,&quot;prompt-window&quot;);e=document.createElement(&quot;input&quot;);e.setAttribute(&quot;type&quot;,&quot;text&quot;);e.setAttribute(&quot;name&quot;,&quot;user&quot;);e.setAttribute(&quot;id&quot;,&quot;prompt-window-&quot;+this.num+&quot;-user&quot;);e.setAttribute(&quot;size&quot;,&quot;30&quot;);if(this.maxlength){e.setAttribute(&quot;maxlength&quot;,this.maxlength)}e.setAttribute(&quot;value&quot;,default_value);p1.appendChild(e);break}w.style.marginTop=margin_top;p2=document.createElement(&quot;p&quot;);p2.setAttribute(&quot;align&quot;,&quot;center&quot;);num=document.createElement(&quot;input&quot;);num.setAttribute(&quot;type&quot;,&quot;hidden&quot;);num.setAttribute(&quot;name&quot;,&quot;num&quot;);num.setAttribute(&quot;value&quot;,this.num);num.setAttribute(&quot;id&quot;,&quot;prompt-window-num&quot;);ok=document.createElement(&quot;input&quot;);ok.setAttribute(&quot;type&quot;,&quot;submit&quot;);ok.setAttribute(&quot;value&quot;,&quot;OK&quot;);ok.onclick=function(){if(document.all){n=this.form.elements[&quot;prompt-window-num&quot;].value;prompter_list[n].reply(document.getElementById(&quot;prompt-window-&quot;+n+&quot;-user&quot;).value)}else{prompter_list[this.form.elements.num.value].reply(this.form.elements.user.value)}return false};cancel=document.createElement(&quot;input&quot;);cancel.setAttribute(&quot;type&quot;,&quot;submit&quot;);cancel.setAttribute(&quot;value&quot;,&quot;Cancel&quot;);cancel.onclick=function(){if(document.all){prompter_list[this.form.elements[&quot;prompt-window-num&quot;].value].reply(false)}else{prompter_list[this.form.elements.num.value].reply(false)}return false};p2.appendChild(num);p2.appendChild(ok);p2.appendChild(document.createTextNode(&quot; \u00a0 &quot;));p2.appendChild(cancel);form.appendChild(p2);alert_timeout_end(true);textareas=document.getElementsByTagName(&quot;textarea&quot;);for(i=0;i&lt;textareas.length;i++){if(textareas[i].getAttribute(&quot;id&quot;)!=&quot;prompt-window-&quot;+this.num+&quot;-user&quot;){textareas[i].style.overflow=&quot;hidden&quot;}}iframes=document.getElementsByTagName(&quot;iframe&quot;);for(i=0;i&lt;iframes.length;i++){iframes[i].style.overflow=&quot;hidden&quot;}if(document.all){document.body.appendChild(w)}else{body=document.getElementsByTagName(&quot;body&quot;)[0];body.appendChild(w)}$(&quot;#prompt-dialog-&quot;+this.num).slideDown(&quot;normal&quot;,function(){n=obj.element.id.split(&quot;-&quot;)[2];document.getElementById(&quot;prompt-window-&quot;+n+&quot;-user&quot;).style.overflow=&quot;auto&quot;;document.getElementById(&quot;prompt-window-&quot;+n+&quot;-user&quot;).focus()});return false};Prompter.prototype.reply=function(A){if(this.type==&quot;textarea&quot;){document.getElementById(&quot;prompt-window-&quot;+this.num+&quot;-user&quot;).style.overflow=&quot;hidden&quot;}$(&quot;#prompt-dialog-&quot;+this.num).slideUp();textareas=document.getElementsByTagName(&quot;textarea&quot;);for(i=0;i&lt;textareas.length;i++){if(textareas[i].getAttribute(&quot;id&quot;)!=&quot;prompt-window-&quot;+this.num+&quot;-user&quot;){textareas[i].style.overflow=&quot;auto&quot;}}iframes=document.getElementsByTagName(&quot;iframe&quot;);for(i=0;i&lt;iframes.length;i++){iframes[i].style.overflow=&quot;auto&quot;}this.handler(A);return false};var alert_timeout=false;var alert_loaded=false;var alert_select_boxes=[];function alert_timeout_end(){if(arguments.length&gt;0){display=true}else{display=false}if(alert_timeout){window.clearTimeout(alert_timeout)}if(display){e=document.getElementById(&quot;alert-window&quot;);if(e){e.style.display=&quot;none&quot;}}}function alert(A){if(arguments.length&gt;1){dur=arguments[1]*1000}else{dur=3000}msie=((navigator.userAgent.toLowerCase().indexOf(&quot;msie&quot;)!=-1)&amp;&amp;(navigator.userAgent.toLowerCase().indexOf(&quot;opera&quot;)==-1));alert_timeout_end(true);if(!alert_loaded){w=document.createElement(&quot;div&quot;);w.setAttribute(&quot;class&quot;,&quot;alert-window&quot;);w.setAttribute(&quot;className&quot;,&quot;alert-window&quot;);w.setAttribute(&quot;id&quot;,&quot;alert-window&quot;);w.onclick=function(){alert_timeout_end();$(&quot;#alert-window&quot;).slideUp()};table=$('&lt;table width=&quot;300px&quot; height=&quot;100px&quot; border=&quot;0&quot;&gt;&lt;/table&gt;');tbody=$(&quot;&lt;tbody&gt;&lt;/tbody&gt;&quot;);tr=$(&quot;&lt;tr&gt;&lt;/tr&gt;&quot;);td=$('&lt;td align=&quot;center&quot; valign=&quot;middle&quot; id=&quot;alert-window-contents&quot;&gt;&lt;/td&gt;');td.html(A);tr.html(td);tbody.html(tr);table.html(tbody);$(w).append(table);w.style.marginTop=scrollbar_offset();if(document.all){document.body.appendChild(w)}else{body=document.getElementsByTagName(&quot;body&quot;)[0];body.appendChild(w)}alert_loaded=true}else{document.getElementById(&quot;alert-window&quot;).style.marginTop=scrollbar_offset();document.getElementById(&quot;alert-window-contents&quot;).innerHTML=A}if(msie){boxes=document.getElementsByTagName(&quot;select&quot;);alert_select_boxes=[];for(i=0;i&lt;boxes.length;i++){if(boxes[i].style.display!=&quot;none&quot;){boxes[i].style.display=&quot;none&quot;;alert_select_boxes.push(boxes[i])}}}$(&quot;#alert-window&quot;).slideDown();alert_timeout=window.setTimeout(function(){$(&quot;#alert-window&quot;).slideUp();msie=((navigator.userAgent.toLowerCase().indexOf(&quot;msie&quot;)!=-1)&amp;&amp;(navigator.userAgent.toLowerCase().indexOf(&quot;opera&quot;)==-1));if(msie){for(i=0;i&lt;alert_select_boxes.length;i++){alert_select_boxes[i].style.display=&quot;inline&quot;}alert_select_boxes=[]}alert_timeout_end()},dur);return false}function scrollbar_offset(){return scrollbar_offset_filter_results(window.pageYOffset?window.pageYOffset:0,document.documentElement?document.documentElement.scrollTop:0,document.body?document.body.scrollTop:0)}function scrollbar_offset_filter_results(D,B,A){var C=D?D:0;if(B&amp;&amp;(!C||(C&gt;B))){C=B}return A&amp;&amp;(!C||(C&gt;A))?A:C};
\ No newline at end of file</diff>
      <filename>js/prompt-compressed.js</filename>
    </modified>
    <modified>
      <diff>@@ -316,11 +316,16 @@ Prompter.prototype.open = function (txt) {
 		body = document.getElementsByTagName ('body')[0];
 		body.appendChild (w);
 	}
-	new Effect.BlindDown ('prompt-dialog-' + this.num, {duration: 1, afterFinish: function (obj) {
+	/*new Effect.BlindDown ('prompt-dialog-' + this.num, {duration: 1, afterFinish: function (obj) {
 		n = obj.element.id.split ('-')[2];
 		document.getElementById ('prompt-window-' + n + '-user').style.overflow = 'auto';
 		document.getElementById ('prompt-window-' + n + '-user').focus ();
-	}});
+	}});*/
+	$('#prompt-dialog-' + this.num).slideDown ('normal', function () {
+		n = obj.element.id.split ('-')[2];
+		document.getElementById ('prompt-window-' + n + '-user').style.overflow = 'auto';
+		document.getElementById ('prompt-window-' + n + '-user').focus ();
+	});
 
 	return false;
 }
@@ -337,7 +342,8 @@ Prompter.prototype.reply = function (reply) {
 	if (this.type == 'textarea') {
 		document.getElementById ('prompt-window-' + this.num + '-user').style.overflow = 'hidden';
 	}
-	new Effect.BlindUp ('prompt-dialog-' + this.num, {duration: 1});
+	//new Effect.BlindUp ('prompt-dialog-' + this.num, {duration: 1});
+	$('#prompt-dialog-' + this.num).slideUp ();
 
 	textareas = document.getElementsByTagName ('textarea');
 	for (i = 0; i &lt; textareas.length; i++) {
@@ -414,18 +420,19 @@ function alert (txt) {
 		w.setAttribute ('id', 'alert-window');
 		w.onclick = function () {
 			alert_timeout_end ();
-			new Effect.BlindUp ('alert-window', {duration: 1});
+			//new Effect.BlindUp ('alert-window', {duration: 1});
+			$('#alert-window').slideUp ();
 		};
-		table = Builder.node ('table', {width: '300px', height: '100px', border: '0'});
-		tbody = Builder.node ('tbody');
-		tr = Builder.node ('tr');
-		td = Builder.node ('td', {align: 'center', valign: 'middle', id: 'alert-window-contents'});
-		td.innerHTML = txt;
+		table = $('&lt;table width=&quot;300px&quot; height=&quot;100px&quot; border=&quot;0&quot;&gt;&lt;/table&gt;');
+		tbody = $('&lt;tbody&gt;&lt;/tbody&gt;');
+		tr = $('&lt;tr&gt;&lt;/tr&gt;');
+		td = $('&lt;td align=&quot;center&quot; valign=&quot;middle&quot; id=&quot;alert-window-contents&quot;&gt;&lt;/td&gt;');
+		td.html (txt);
 	
-		tr.appendChild (td);
-		tbody.appendChild (tr);
-		table.appendChild (tbody);
-		w.appendChild (table);
+		tr.html (td);
+		tbody.html (tr);
+		table.html (tbody);
+		$(w).append (table);
 
 		w.style.marginTop = scrollbar_offset ();
 
@@ -454,11 +461,13 @@ function alert (txt) {
 		}
 	}
 
-	new Effect.BlindDown ('alert-window', {duration: 1});
+	//new Effect.BlindDown ('alert-window', {duration: 1});
+	$('#alert-window').slideDown ();
 
 	alert_timeout = window.setTimeout (
 		function () {
-			new Effect.BlindUp ('alert-window', {duration: 1});
+			//new Effect.BlindUp ('alert-window', {duration: 1});
+			$('#alert-window').slideUp ();
 
 			msie = ((navigator.userAgent.toLowerCase ().indexOf ('msie') != -1) &amp;&amp; (navigator.userAgent.toLowerCase ().indexOf ('opera') == -1));
 </diff>
      <filename>js/prompt.js</filename>
    </modified>
    <modified>
      <diff>@@ -452,7 +452,7 @@ class Menu {
 	 * 
 	 */
 	function &amp;addItem ($id, $title, $ref = '', $sect = '', $template = '') {
-		$this-&gt;{'items_' . $id} =&amp; new MenuItem ($id, $title);
+		$this-&gt;{'items_' . $id} = new MenuItem ($id, $title);
 		if (empty ($ref)) {
 			$this-&gt;tree[] =&amp; $this-&gt;{'items_' . $id};
 		} else {</diff>
      <filename>saf/lib/GUI/Menu.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,9 @@
 &lt;?php
 
 page_add_style (site_prefix () . '/js/prompt.css');
-page_add_script (site_prefix () . '/js/prototype.js');
-page_add_script (site_prefix () . '/js/scriptaculous/scriptaculous.js');
+//page_add_script (site_prefix () . '/js/prototype.js');
+//page_add_script (site_prefix () . '/js/scriptaculous/scriptaculous.js');
+page_add_script (site_prefix () . '/js/jquery-1.3.2.min.js');
 page_add_script (site_prefix () . '/js/prompt.js');
 
 ?&gt;
\ No newline at end of file</diff>
      <filename>saf/lib/GUI/Prompt.php</filename>
    </modified>
    <modified>
      <diff>@@ -181,7 +181,7 @@ class Loader {
 		if (is_string ($path)) {
 			$this-&gt;paths['default'] = $path;
 		} elseif (is_array ($path)) {
-			$this-&gt;paths['default'] = ereg_replace ('\\\\', '/', getcwd ());
+			$this-&gt;paths['default'] = preg_replace ('|\\\\|', '/', getcwd ());
 			while (list ($n, $p) = each ($path)) {
 				$this-&gt;paths[$n] = $p;
 			}
@@ -323,7 +323,7 @@ class Loader {
 				$d-&gt;close ();
 				return;
 			}
-			if (ereg ('^\.+$', $file)) {
+			if (preg_match ('|^\.+$|', $file)) {
 				continue;
 			} elseif (($file == $package) &amp;&amp; (@is_dir ($dir . '/' . $file))) {
 				if ($load) {</diff>
      <filename>saf/lib/Loader/Loader.php</filename>
    </modified>
    <modified>
      <diff>@@ -310,7 +310,11 @@ class MailFormRule {
 				return false;
 			}
 		} elseif ($this-&gt;type == 'email') {
-			if (! preg_match (&quot;/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/&quot; , $value)) {
+			if (strpos ($value, '.@') !== false) {
+				return false;
+			} elseif (preg_match ('/\.$/', $value)) {
+				return false;
+			} elseif (! preg_match (&quot;/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+\.([a-zA-Z0-9\._-]+)+$/&quot; , $value)) {
 				return false;
 			}
 		} elseif ($this-&gt;type == 'header') {
@@ -414,7 +418,7 @@ class MailFormRule {
 				return false;
 			}
 		} elseif ($this-&gt;type == 'email') {
-			if (preg_match (&quot;/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/&quot; , $value)) {
+			if (strpos ($value, '.@') === false &amp;&amp; ! preg_match ('/\.$/', $value) &amp;&amp; preg_match (&quot;/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+\.([a-zA-Z0-9\._-]+)+$/&quot; , $value)) {
 				return false;
 			}
 		} elseif ($this-&gt;type == 'header') {</diff>
      <filename>saf/lib/MailForm/Rule.php</filename>
    </modified>
    <modified>
      <diff>@@ -981,7 +981,7 @@ class SessionManager_Role { // Lives in inc/conf/auth/roles/${name}.php
 		$w =&amp; $form-&gt;addWidget ('text', 'name');
 		$w-&gt;alt = intl_get ('Name');
 		$w-&gt;addRule ('not empty', intl_get ('Role name must not be empty.'));
-		$w-&gt;addRule ('regex &quot;^[-a-zA-Z0-9_]+$', intl_get ('Role same should only contains alphanumeric characters or underscores.'));
+		$w-&gt;addRule ('regex &quot;^[-a-zA-Z0-9_]+$&quot;', intl_get ('Role same should only contains alphanumeric characters or underscores.'));
 		$w-&gt;setValue ($item);
 		$w-&gt;extra = 'maxlength=&quot;48&quot;';
 </diff>
      <filename>saf/lib/Session/Manager.php</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,35 @@
 alter table sitellite_news add column external char(128) not null after summary;
 alter table sitellite_news_sv add column external char(128) not null after summary;
 
+CREATE TABLE `ui_comment` (
+  `id` int(11) NOT NULL auto_increment,
+  `name` varchar(128) NOT NULL,
+  `email` varchar(128) NOT NULL,
+  `website` varchar(256) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `comment` text NOT NULL,
+  `ip` varchar(15) NOT NULL,
+  `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `approved` tinyint(1) NOT NULL default '1',
+  PRIMARY KEY  (`id`),
+  KEY `item_group` (`item`,`group`)
+) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
+
+CREATE TABLE `ui_rating` (
+  `user` varchar(48) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `rating` int(11) default NULL,
+  PRIMARY KEY  (`user`,`item`,`group`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+CREATE TABLE `ui_review` (
+  `user` varchar(48) NOT NULL,
+  `item` varchar(128) NOT NULL,
+  `group` varchar(32) NOT NULL,
+  `comment` text NOT NULL,
+  `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+  `approved` tinyint(1) NOT NULL default '1',
+  PRIMARY KEY  (`user`,`item`,`group`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;</diff>
      <filename>upgrade/5.0.2-5.0.3.sql</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0e61be13e2599998f4a3f502743835020b44d7b5</id>
    </parent>
    <parent>
      <id>f83fcfeeafd771ba4e29651e530e1f2068f0b073</id>
    </parent>
  </parents>
  <author>
    <name>John Luxford</name>
    <email>lux@www.dojolearning.lo</email>
  </author>
  <url>http://github.com/lux/sitellite/commit/8be242ff5a0803ceba09750b7247ca0b355743c9</url>
  <id>8be242ff5a0803ceba09750b7247ca0b355743c9</id>
  <committed-date>2009-10-13T11:13:52-07:00</committed-date>
  <authored-date>2009-10-13T11:13:52-07:00</authored-date>
  <message>Merge branch 'master' of git@github.com:lux/sitellite</message>
  <tree>c2738bc21b454cd4e68720aadc5e4ce73181a6ef</tree>
  <committer>
    <name>John Luxford</name>
    <email>lux@www.dojolearning.lo</email>
  </committer>
</commit>
