[pLog-svn] r5368 - in plog/trunk: . bin-devel class class/action class/action/admin class/action/admin/chooser class/cache class/config class/controller class/dao class/dao/userdata class/data class/data/Date class/data/captcha class/data/validator/rules class/database class/file class/gallery/dao class/gallery/resizers class/locale class/logger/config class/mail/phpmailer class/misc class/net class/net/http class/net/http/phpsniff class/net/xmlrpc class/object class/plugin class/security class/summary/action class/summary/net class/summary/view class/template class/template/smarty/plugins class/test/helpers class/test/tests/dao class/test/tests/data class/test/tests/file class/test/tests/ui class/view class/view/admin class/view/admin/chooser class/xml/tree install js/tinymce js/ui locale locale/admin plugins/badbehavior plugins/badbehavior/bad-behavior plugins/badbehavior/locale styles templates/LifeType/en_UK templates/admin templates/admin/chooser templates/default template s/standard templates/summary templates/wizard

oscar at devel.lifetype.net oscar at devel.lifetype.net
Sun Apr 29 11:28:20 EDT 2007


Author: oscar
Date: 2007-04-29 11:28:19 -0400 (Sun, 29 Apr 2007)
New Revision: 5368

Added:
   plog/trunk/class/test/tests/file/file_test.class.php
   plog/trunk/plugins/badbehavior/locale/locale_de_DE.php
   plog/trunk/templates/wizard/fix120.template
Removed:
   plog/trunk/templates/wizard/update111.template
Modified:
   plog/trunk/bin-devel/build-svn.sh
   plog/trunk/blog
   plog/trunk/class/action/admin/adminaddarticlecategoryajaxaction.class.php
   plog/trunk/class/action/admin/adminaddblogtemplateaction.class.php
   plog/trunk/class/action/admin/adminaddpostaction.class.php
   plog/trunk/class/action/admin/adminaddtemplateaction.class.php
   plog/trunk/class/action/admin/adminchangecommentsstatusaction.class.php
   plog/trunk/class/action/admin/adminchangetrackbacksstatusaction.class.php
   plog/trunk/class/action/admin/admincleanupaction.class.php
   plog/trunk/class/action/admin/admindeletecommentaction.class.php
   plog/trunk/class/action/admin/admindeletereferreraction.class.php
   plog/trunk/class/action/admin/admindeletetrackbackaction.class.php
   plog/trunk/class/action/admin/admineditcommentsaction.class.php
   plog/trunk/class/action/admin/adminmainaction.class.php
   plog/trunk/class/action/admin/adminpostmanagementcommonaction.class.php
   plog/trunk/class/action/admin/adminpoststatsaction.class.php
   plog/trunk/class/action/admin/adminpreviewpostaction.class.php
   plog/trunk/class/action/admin/adminupdatepostaction.class.php
   plog/trunk/class/action/admin/chooser/adminresourcelistaction.class.php
   plog/trunk/class/action/blogaction.class.php
   plog/trunk/class/action/commentaction.class.php
   plog/trunk/class/action/defaultaction.class.php
   plog/trunk/class/action/resourceserveraction.class.php
   plog/trunk/class/action/rssaction.class.php
   plog/trunk/class/action/searchaction.class.php
   plog/trunk/class/action/viewalbumaction.class.php
   plog/trunk/class/action/viewarticleaction.class.php
   plog/trunk/class/action/viewarticletrackbacksaction.class.php
   plog/trunk/class/action/viewresourceaction.class.php
   plog/trunk/class/bootstrap.php
   plog/trunk/class/cache/cache.class.php
   plog/trunk/class/cache/cachemanager.class.php
   plog/trunk/class/cache/memcache.class.php
   plog/trunk/class/config/configdbstorage.class.php
   plog/trunk/class/config/configfilestorage.class.php
   plog/trunk/class/controller/admincontroller.class.php
   plog/trunk/class/controller/blogcontroller.class.php
   plog/trunk/class/dao/article.class.php
   plog/trunk/class/dao/articlenotifications.class.php
   plog/trunk/class/dao/articles.class.php
   plog/trunk/class/dao/bloginfo.class.php
   plog/trunk/class/dao/blogs.class.php
   plog/trunk/class/dao/blogsettings.class.php
   plog/trunk/class/dao/commentscommon.class.php
   plog/trunk/class/dao/permission.class.php
   plog/trunk/class/dao/purgedata.class.php
   plog/trunk/class/dao/referers.class.php
   plog/trunk/class/dao/searchengine.class.php
   plog/trunk/class/dao/usercomment.class.php
   plog/trunk/class/dao/userdata/baseuserdataprovider.class.php
   plog/trunk/class/dao/userdata/joomlauserdataprovider.class.php
   plog/trunk/class/dao/userdata/lifetypeuserdataprovider.class.php
   plog/trunk/class/dao/userdata/phpbb2userdataprovider.class.php
   plog/trunk/class/dao/userdata/simplepostnukeuserdataprovider.class.php
   plog/trunk/class/dao/userdata/vbb3userdataprovider.class.php
   plog/trunk/class/dao/userdata/wbbuserdataprovider.class.php
   plog/trunk/class/dao/userinfo.class.php
   plog/trunk/class/dao/userpermissions.class.php
   plog/trunk/class/data/Date.class.php
   plog/trunk/class/data/Date/Span.class.php
   plog/trunk/class/data/captcha/captcha.class.php
   plog/trunk/class/data/htmlcalendar.class.php
   plog/trunk/class/data/textfilter.class.php
   plog/trunk/class/data/validator/rules/emaildnsrule.class.php
   plog/trunk/class/database/db.class.php
   plog/trunk/class/file/file.class.php
   plog/trunk/class/file/fileuploads.class.php
   plog/trunk/class/gallery/dao/galleryalbums.class.php
   plog/trunk/class/gallery/dao/galleryresource.class.php
   plog/trunk/class/gallery/dao/galleryresources.class.php
   plog/trunk/class/gallery/dao/galleryresourcestorage.class.php
   plog/trunk/class/gallery/resizers/gallerygdresizer.class.php
   plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php
   plog/trunk/class/locale/bloglocale.class.php
   plog/trunk/class/locale/locale.class.php
   plog/trunk/class/locale/locales.class.php
   plog/trunk/class/locale/pluginlocale.class.php
   plog/trunk/class/logger/config/loggerconfigloader.class.php
   plog/trunk/class/mail/phpmailer/class.phpmailer.php
   plog/trunk/class/misc/version.class.php
   plog/trunk/class/net/baserequestgenerator.class.php
   plog/trunk/class/net/http/phpsniff/phpSniff.class.php
   plog/trunk/class/net/http/subdomains.class.php
   plog/trunk/class/net/xmlrpc/xmlrpcserver.class.php
   plog/trunk/class/object/loader.class.php
   plog/trunk/class/plugin/globalpluginconfig.class.php
   plog/trunk/class/plugin/pluginmanager.class.php
   plog/trunk/class/security/bayesianfilter.class.php
   plog/trunk/class/security/nullpipelinefilter.class.php
   plog/trunk/class/security/pipeline.class.php
   plog/trunk/class/summary/action/registeraction.class.php
   plog/trunk/class/summary/action/summarydefaultaction.class.php
   plog/trunk/class/summary/net/summaryrequestgenerator.class.php
   plog/trunk/class/summary/view/summarycachedview.class.php
   plog/trunk/class/template/smarty/plugins/function.adminpager.php
   plog/trunk/class/template/smarty/plugins/function.pager.php
   plog/trunk/class/template/smarty/plugins/modifier.utf8_truncate.php
   plog/trunk/class/template/templateservice.class.php
   plog/trunk/class/test/helpers/consolereporter.class.php
   plog/trunk/class/test/helpers/uiscriptrunner.class.php
   plog/trunk/class/test/tests/dao/article_test.class.php
   plog/trunk/class/test/tests/dao/articlecategories_test.class.php
   plog/trunk/class/test/tests/dao/commentscommon_test.class.php
   plog/trunk/class/test/tests/dao/userinfo_test.class.php
   plog/trunk/class/test/tests/data/textfilter_test.class.php
   plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php
   plog/trunk/class/test/tests/ui/login_test.class.php
   plog/trunk/class/test/tests/ui/permissionsui_test.class.php
   plog/trunk/class/view/admin/adminblogsettingsview.class.php
   plog/trunk/class/view/admin/admineditpostview.class.php
   plog/trunk/class/view/admin/adminnewpostview.class.php
   plog/trunk/class/view/admin/adminuserprofileview.class.php
   plog/trunk/class/view/admin/chooser/adminsimpleresourceslistview.class.php
   plog/trunk/class/view/blogview.class.php
   plog/trunk/class/view/redirectview.class.php
   plog/trunk/class/view/smartyview.class.php
   plog/trunk/class/xml/tree/Tree.php
   plog/trunk/install/defaultconfig.properties.php
   plog/trunk/js/tinymce/tiny_mce-plog-resourcelist.js
   plog/trunk/js/tinymce/tiny_mce-plog.js
   plog/trunk/js/ui/default.js
   plog/trunk/js/ui/plogui.js
   plog/trunk/locale/admin/locale_ca_ES.php
   plog/trunk/locale/admin/locale_de_DE.php
   plog/trunk/locale/admin/locale_en_UK.php
   plog/trunk/locale/admin/locale_en_US.php
   plog/trunk/locale/admin/locale_es_ES.php
   plog/trunk/locale/admin/locale_fr_FR.php
   plog/trunk/locale/admin/locale_it_IT.php
   plog/trunk/locale/admin/locale_nl_NL.php
   plog/trunk/locale/admin/locale_zh_CN.php
   plog/trunk/locale/admin/locale_zh_TW.php
   plog/trunk/locale/locale_ca_ES.php
   plog/trunk/locale/locale_de_DE.php
   plog/trunk/locale/locale_en_UK.php
   plog/trunk/locale/locale_en_US.php
   plog/trunk/locale/locale_es_ES.php
   plog/trunk/locale/locale_fr_FR.php
   plog/trunk/locale/locale_it_IT.php
   plog/trunk/locale/locale_nl_NL.php
   plog/trunk/locale/locale_zh_CN.php
   plog/trunk/locale/locale_zh_TW.php
   plog/trunk/plugins/badbehavior/bad-behavior/admin.inc.php
   plog/trunk/plugins/badbehavior/bad-behavior/blacklist.inc.php
   plog/trunk/plugins/badbehavior/bad-behavior/common_tests.inc.php
   plog/trunk/plugins/badbehavior/bad-behavior/functions.inc.php
   plog/trunk/plugins/badbehavior/bad-behavior/post.inc.php
   plog/trunk/plugins/badbehavior/bad-behavior/version.inc.php
   plog/trunk/plugins/badbehavior/bad-behavior/whitelist.inc.php
   plog/trunk/plugins/badbehavior/index.inc.php
   plog/trunk/plugins/badbehavior/locale/locale_en_UK.php
   plog/trunk/plugins/badbehavior/locale/locale_zh_TW.php
   plog/trunk/plugins/badbehavior/pluginbadbehavior.class.php
   plog/trunk/plugins/badbehavior/readme.txt
   plog/trunk/resserver.php
   plog/trunk/runtests.php
   plog/trunk/styles/summary.css
   plog/trunk/summary.php
   plog/trunk/templates/LifeType/en_UK/strings.txt
   plog/trunk/templates/admin/addbloguser.template
   plog/trunk/templates/admin/chooser/resourcelist.template
   plog/trunk/templates/admin/chooser/siteuserschooser.template
   plog/trunk/templates/admin/chooser/userpictureselect.template
   plog/trunk/templates/admin/createblog.template
   plog/trunk/templates/admin/default.template
   plog/trunk/templates/admin/editblog.template
   plog/trunk/templates/admin/editbloguser.template
   plog/trunk/templates/admin/editpost.template
   plog/trunk/templates/admin/globalsettings_resources.template
   plog/trunk/templates/admin/globalsettings_summary.template
   plog/trunk/templates/admin/globalsettings_uploads.template
   plog/trunk/templates/admin/header.template
   plog/trunk/templates/admin/menus.xml
   plog/trunk/templates/admin/newpost.template
   plog/trunk/templates/default/commentform.template
   plog/trunk/templates/standard/header.template
   plog/trunk/templates/summary/blog.template
   plog/trunk/templates/summary/post.template
   plog/trunk/templates/summary/user.template
   plog/trunk/templates/wizard/checks.template
   plog/trunk/templates/wizard/header.template
   plog/trunk/templates/wizard/update1.template
   plog/trunk/templates/wizard/update2.template
   plog/trunk/templates/wizard/update3.template
   plog/trunk/templates/wizard/update4.template
   plog/trunk/xmlrpc.php
Log:
Merge from the 1.2 branch to trunk (5156 to HEAD)


Modified: plog/trunk/bin-devel/build-svn.sh
===================================================================
--- plog/trunk/bin-devel/build-svn.sh	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/bin-devel/build-svn.sh	2007-04-29 15:28:19 UTC (rev 5368)
@@ -23,7 +23,7 @@
 # can be used here
 #
 
-TOREMOVE="include_files release/ locale/old/ templates/standard-with-plugins/ templates/grey-sf/ templates/plogworld templates/lifetype bin-devel/ docs-devel/ class/gallery/getid3/module.archive.rar.php class/gallery/getid3/module.archive.szip.php class/gallery/getid3/module.audio-video.bink.php class/gallery/getid3/module.audio-video.matroska.php class/gallery/getid3/module.audio-video.nsv.php class/gallery/getid3/module.audio.avr.php class/gallery/getid3/module.audio.bonk.php class/gallery/getid3/module.audio.la.php class/gallery/getid3/module.audio.lpac.php class/gallery/getid3/module.audio.monkey.php class/gallery/getid3/module.audio.optimfrog.php class/gallery/getid3/module.audio.rkau.php class/gallery/getid3/module.audio.shorten.php class/gallery/getid3/module.audio.tta.php class/gallery/getid3/module.audio.voc.php class/gallery/getid3/module.audio.vqf.php class/gallery/getid3/module.graphic.bmp.php class/gallery/getid3/module.graphpc.pcd.php class/gallery/getid3/modul
 e.misc.exe.php class/gallery/getid3/module.misc.iso.php class/gallery/getid3/extension.cache.dbm.php class/gallery/getid3/extension.cache.mysql.php class/gallery/getid3/write.apetag.php class/gallery/getid3/write.id3v1.php class/gallery/getid3/write.id3v2.php class/gallery/getid3/write.lyrics3.php class/gallery/getid3/write.metaflac.php class/gallery/getid3/write.php class/gallery/getid3/write.real.php class/gallery/getid3/write.vorbiscomment.php dbperf.php *.xcode tools/ runtests.php"
+TOREMOVE="include_files release/ locale/old/ templates/LifeType/ templates/standard-with-plugins/ templates/grey-sf/ templates/plogworld bin-devel/ docs-devel/ class/gallery/getid3/module.archive.rar.php class/gallery/getid3/module.archive.szip.php class/gallery/getid3/module.audio-video.bink.php class/gallery/getid3/module.audio-video.matroska.php class/gallery/getid3/module.audio-video.nsv.php class/gallery/getid3/module.audio.avr.php class/gallery/getid3/module.audio.bonk.php class/gallery/getid3/module.audio.la.php class/gallery/getid3/module.audio.lpac.php class/gallery/getid3/module.audio.monkey.php class/gallery/getid3/module.audio.optimfrog.php class/gallery/getid3/module.audio.rkau.php class/gallery/getid3/module.audio.shorten.php class/gallery/getid3/module.audio.tta.php class/gallery/getid3/module.audio.voc.php class/gallery/getid3/module.audio.vqf.php class/gallery/getid3/module.graphic.bmp.php class/gallery/getid3/module.graphpc.pcd.php class/gallery/getid3/modu
 le.misc.exe.php class/gallery/getid3/module.misc.iso.php class/gallery/getid3/extension.cache.dbm.php class/gallery/getid3/extension.cache.mysql.php class/gallery/getid3/write.apetag.php class/gallery/getid3/write.id3v1.php class/gallery/getid3/write.id3v2.php class/gallery/getid3/write.lyrics3.php class/gallery/getid3/write.metaflac.php class/gallery/getid3/write.php class/gallery/getid3/write.real.php class/gallery/getid3/write.vorbiscomment.php dbperf.php *.xcode tools/ runtests.php"
 
 #
 # helper functions to print things in different colors

Modified: plog/trunk/blog
===================================================================
--- plog/trunk/blog	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/blog	2007-04-29 15:28:19 UTC (rev 5368)
@@ -5,5 +5,5 @@
     }
 	
 	// and transfer execution to the main script
-    include_once( PLOG_CLASS_PATH."blog.php" );
-?>
\ No newline at end of file
+    include( PLOG_CLASS_PATH."blog.php" );
+?>

Modified: plog/trunk/class/action/admin/adminaddarticlecategoryajaxaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddarticlecategoryajaxaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminaddarticlecategoryajaxaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -24,9 +24,41 @@
         function AdminAddArticleCategoryAjaxAction( $actionInfo, $request )
         {
         	$this->AdminAjaxAction( $actionInfo, $request );
+        }
 
+        function validate()
+        {
+			// check if the user has the add_category permission
+            if( !$this->userHasPermission( "add_category" ) ) {
+	            $this->_view = new AdminXmlView( $this->_blogInfo, "response" );				
+	            $this->_view->setValue( "method", "addCategoryAjax" );
+            	$this->_view->setValue( "success", "0" );
+            	$this->_view->setValue( "message", $this->_locale->tr("error_permission_required") );    	            
+                return false;
+            }
+
+            // check if category name is empty
+        	$this->_categoryName     = Textfilter::filterAllHTML($this->_request->getValue( "categoryName" ));
+            $this->_categoryUrl      = "";
+            $this->_categoryInMainPage = 1;
+			$this->_categoryDescription = $this->_categoryName;
+			$this->_properties = "";	
+>>>>>>> .merge-right.r5367
+
+<<<<<<< .working
 			$this->registerFieldValidator( "categoryName", new StringValidator());
 			$this->setValidationErrorView( $this->getErrorView( $this->_locale->tr("error_adding_article_category" )));
+=======
+            if( empty($this->_categoryName) || $this->_categoryName == "" ) {
+	            $this->_view = new AdminXmlView( $this->_blogInfo, "response" );				
+	            $this->_view->setValue( "method", "addCategoryAjax" );
+            	$this->_view->setValue( "success", "0" );
+            	$this->_view->setValue( "message", $this->_locale->tr("error_adding_article_category") );    	            
+                return false;
+            }
+
+            return true;
+>>>>>>> .merge-right.r5367
         }
 
         /**

Modified: plog/trunk/class/action/admin/adminaddblogtemplateaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddblogtemplateaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminaddblogtemplateaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -77,7 +77,6 @@
 
             $result = $uploads->process( $tmpFolder );
             if( $result < 0 ) {
-
                 $this->_view->setErrorMessage( $this->_locale->tr("error_uploads_disabled"));
                 $this->setCommonData();
 
@@ -85,7 +84,16 @@
             }
 
             $upload   = new FileUpload( $files["templateFile"] );
+			$templateName = TemplateSandbox::toTemplateSetName( $upload->getFileName() );            
 
+			// Check the template set exist or not
+			if( TemplateSets::isTemplate( $templateName ) || TemplateSets::isBlogTemplate( $templateName, $this->_blogInfo->getId() ) ) {
+                $this->_view->setErrorMessage( $this->_locale->pr("error_template_exist", $templateName));
+                $this->setCommonData();
+
+                return false;
+            }
+
             // and make it go through the template sandbox to check if
             // we're dealing with a 'healthy' file
             $templateSandbox = new TemplateSandbox();
@@ -125,7 +133,6 @@
 
             // if the template set was installed ok in the template folder, we can record
             // it as a valid set
-			$templateName = TemplateSandbox::toTemplateSetName( $upload->getFileName() );
             $ts->addTemplate( $templateName, $this->_blogInfo->getId());
 
             // remove the file

Modified: plog/trunk/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddpostaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminaddpostaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -43,7 +43,8 @@
         	$this->registerField( "commentsEnabled" );
         	$this->registerField( "customField" );
         	$this->registerField( "postDateTime" );
-        	$this->registerField( "trackbackUrls" );        	
+        	$this->registerField( "trackbackUrls" );
+			$this->registerField( "postUser" );
 
 			// security checks
 			$this->requirePermission( "add_post" );
@@ -125,7 +126,7 @@
 			$article  = new Article( $this->_postTopic, 
 			                         $postText, 
 			                         $this->_postCategories,
-									 $this->_userInfo->getId(), 
+									 $this->_posterId, 
 									 $this->_blogInfo->getId(), 
 									 $this->_postStatus, 
 									 0, 
@@ -156,13 +157,13 @@
                 
                 // train the filter, but only if enabled
 				if( $this->_config->getValue( "bayesian_filter_enabled" ) == true ) {
-		            include_once( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" );
+		            lt_include( PLOG_CLASS_PATH."class/bayesian/bayesianfiltercore.class.php" );
 	                BayesianFilterCore::trainWithArticle( $article );
 				}
                                 
         		// add the article notification if requested to do so
             	if( $this->_sendNotification ) {
-                    require_once( PLOG_CLASS_PATH."class/dao/articlenotifications.class.php" );
+                    lt_include( PLOG_CLASS_PATH."class/dao/articlenotifications.class.php" );
 
                 	$artNotifications = new ArticleNotifications();
 	            	$artNotifications->addNotification( $artId, $this->_blogInfo->getId(), $this->_userInfo->getId());

Modified: plog/trunk/class/action/admin/adminaddtemplateaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddtemplateaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminaddtemplateaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -88,7 +88,17 @@
 
             // and from there, unpack it
             $upload   = new FileUpload( $files['templateFile'] );
+			$templateName = TemplateSandbox::toTemplateSetName( $upload->getFileName() );            
 
+			// Check the template set exist or not
+			if( TemplateSets::isTemplate( $templateName ) ) {
+				$this->_view = new AdminSiteTemplatesListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->pr("error_template_exist", $templateName));
+                $this->setCommonData();
+
+                return false;
+            }
+
             $templateSandbox = new TemplateSandbox();
             $valid = $templateSandbox->checkTemplateSet( $upload->getFileName(), $tmpFolder.'/');
 
@@ -121,7 +131,6 @@
             // if the template set was installed ok in the template folder, we can record
             // it as a valid set
             $ts = new TemplateSetStorage();
-			$templateName = TemplateSandbox::toTemplateSetName( $upload->getFileName() );
             $ts->addTemplate( $templateName );
 
             $this->_view = new AdminSiteTemplatesListView( $this->_blogInfo );

Modified: plog/trunk/class/action/admin/adminchangecommentsstatusaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminchangecommentsstatusaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminchangecommentsstatusaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -66,7 +66,7 @@
 				$article = $articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId());
 				if( !$article ) {
 					$this->_view = new AdminArticleCommentsListView( $this->_blogInfo );
-					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_post" ));
+					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));
 					$this->setCommonData();
 					
 					return false;

Modified: plog/trunk/class/action/admin/adminchangetrackbacksstatusaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminchangetrackbacksstatusaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminchangetrackbacksstatusaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -66,7 +66,7 @@
 				$article = $articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId());
 				if( !$article ) {
 					$this->_view = new AdminArticleTrackbacksListView( $this->_blogInfo );
-					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_post" ));
+					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));
 					$this->setCommonData();
 					
 					return false;

Modified: plog/trunk/class/action/admin/admincleanupaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admincleanupaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/admincleanupaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -49,7 +49,7 @@
 		 */
 		function cleanupPosts()
 		{
-			include_once( PLOG_CLASS_PATH."class/dao/purgedata.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/purgedata.class.php" );
 			
 			$purge = new PurgeData();
             $result = $purge->purgePosts();
@@ -77,7 +77,7 @@
 		 */		
 		function cleanupUsers()
 		{
-			include_once( PLOG_CLASS_PATH."class/dao/purgedata.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/purgedata.class.php" );
 			
 			$purge = new PurgeData();
 			$result = $purge->purgeUsers();
@@ -105,7 +105,7 @@
 		 */		
 		function cleanupBlogs()
 		{
-			include_once( PLOG_CLASS_PATH."class/dao/purgedata.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/purgedata.class.php" );
 			
 			$purge = new PurgeData();
 			$result = $purge->purgeBlogs();
@@ -134,7 +134,7 @@
 		 */
 		function cleanupComments()
 		{
-			include_once( PLOG_CLASS_PATH."class/dao/purgedata.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/purgedata.class.php" );
 			
 			$purge = new PurgeData();
 			$result = $purge->purgeSpamComments();

Modified: plog/trunk/class/action/admin/admindeletecommentaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admindeletecommentaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/admindeletecommentaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -78,7 +78,7 @@
 				$article = $articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId());
 				if( !$article ) {
 					$this->_view = new AdminArticleCommentsListView( $this->_blogInfo );
-					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_post" ));
+					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));
 					$this->setCommonData();
 					
 					return false;

Modified: plog/trunk/class/action/admin/admindeletereferreraction.class.php
===================================================================
--- plog/trunk/class/action/admin/admindeletereferreraction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/admindeletereferreraction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -73,7 +73,7 @@
 				$referrer = $referrers->getBlogReferer( $referrerId, $this->_blogInfo->getId());
 				
 				// fire the pre-event
-				$this->notifyEvent( EVEN_PRE_REFERRER_DELETE, Array( "referrer" => &$referrer ));
+				$this->notifyEvent( EVENT_PRE_REFERRER_DELETE, Array( "referrer" => &$referrer ));
 				
 				if( !$referrer ) {
 					$errorMessage .= $this->_locale->pr("error_deleting_referrer2", $referrerId )."<br/>";

Modified: plog/trunk/class/action/admin/admindeletetrackbackaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admindeletetrackbackaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/admindeletetrackbackaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -78,7 +78,7 @@
 				$article = $articles->getBlogArticle( $this->_articleId, $this->_blogInfo->getId());
 				if( !$article ) {
 					$this->_view = new AdminArticleTrackbacksListView( $this->_blogInfo );
-					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_post" ));
+					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));
 					$this->setCommonData();
 					
 					return false;

Modified: plog/trunk/class/action/admin/admineditcommentsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditcommentsaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/admineditcommentsaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -51,7 +51,7 @@
 				$article = $articles->getBlogArticle( $articleId, $this->_blogInfo->getId());
 				if( !$article ) {
 					$this->_view = new AdminPostsListView( $this->_blogInfo );
-					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_post" ));				
+					$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_article" ));				
 				}			
 				else
 					$this->_view = new $this->_viewClass( $this->_blogInfo, Array( "article" => $article,

Modified: plog/trunk/class/action/admin/adminmainaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminmainaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminmainaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -52,7 +52,7 @@
             }
 
 			// load the blog
-            require_once( PLOG_CLASS_PATH . "class/dao/blogs.class.php" );
+            lt_include( PLOG_CLASS_PATH . "class/dao/blogs.class.php" );
 			$blogs = new Blogs();
             $this->_blogInfo = $blogs->getBlogInfo( $this->_blogId );
 			 

Modified: plog/trunk/class/action/admin/adminpostmanagementcommonaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminpostmanagementcommonaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminpostmanagementcommonaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -20,7 +20,6 @@
 	{
 
     	var $_postText;
-        var $_postExtendedText;
         var $_postTopic;
         var $_postCategories;
         var $_postStatus;
@@ -31,6 +30,7 @@
         var $_commentsEnabled;
         var $_globalCategoryId;
         var $_trackbackUrls;
+		var $_posterId;
         // stuff about the date
         var $_postYear;
         var $_postMonth;
@@ -123,9 +123,14 @@
 		
 		function _fetchCommonData()
 		{
-        	$this->_postText     = trim(Textfilter::xhtmlize(Textfilter::filterJavaScript($this->_request->getValue( "postText" ))));
-            $this->_postExtendedText = trim(Textfilter::xhtmlize(Textfilter::filterJavaScript($this->_request->getValue( "postExtendedText" ))));
+			if( ini_get( "magic_quotes_gpc" ))
+				$this->_postText = stripslashes($this->_request->getValue( "postText" ));
+			else
+				$this->_postText = $this->_request->getValue( "postText" );
+				
+        	$this->_postText     = trim(Textfilter::xhtmlize(Textfilter::filterJavaScript($this->_postText)));
             $this->_postTopic    = trim(Textfilter::xhtmlize(Textfilter::filterAllHTML($this->_request->getValue( "postTopic" ))));
+			$this->_posterId = $this->_request->getValue( "posterId" );
             $this->_postCategories = $this->_request->getValue( "postCategories" );
 			$this->_postSlug = Textfilter::filterAllHTML($this->_request->getValue( "postSlug" ));
             $this->_postStatus   = $this->_request->getValue( "postStatus" );
@@ -142,6 +147,16 @@
 			
             // fetch the timestamp that the post will have
 			$this->_fetchPostDateInformation();
+
+			// information about the poster but only if the user is supposed to be able to change it
+			if( $this->_userInfo->hasPermissionByName( "update_all_user_articles", $this->_blogInfo->getId()) || 
+			    $this->_userInfo->isSiteAdmin() || 
+			    $this->_blogInfo->getOwnerId() == $this->_userInfo->getId()) {			
+				$this->_posterId = $this->_request->getValue( "postUser" );
+			}
+			else {
+				$this->_posterId = $this->_userInfo->getId();
+			}			
 		}
 		
 		/**

Modified: plog/trunk/class/action/admin/adminpoststatsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminpoststatsaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminpoststatsaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -59,7 +59,7 @@
             $post  = $posts->getBlogArticle( $this->_postId, $this->_blogInfo->getId());
             if( !$post ) {
             	$this->_view = new AdminPostsListView( $this->_blogInfo );
-                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_post"));
+                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_article"));
                 $this->setCommonData();
                 return false;
             }

Modified: plog/trunk/class/action/admin/adminpreviewpostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminpreviewpostaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminpreviewpostaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -56,7 +56,7 @@
 			$this->_fetchCommonData();
 			
 			// and now, create a harmless Article object with it
-			$postText = Textfilter::xhtmlize($this->_postText).POST_EXTENDED_TEXT_MODIFIER.Textfilter::xhtmlize($this->_postExtendedText);
+			$postText = Textfilter::xhtmlize($this->_postText);
 			// create the main object
 			$article  = new Article( $this->_postTopic, 
 			                         $postText, 

Modified: plog/trunk/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdatepostaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/adminupdatepostaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -65,9 +65,10 @@
         	$this->registerField( "commentsEnabled" );
         	$this->registerField( "customField" );
         	$this->registerField( "postDateTime" );   
-        	$this->registerField( "trackbackUrls" );     	
+        	$this->registerField( "trackbackUrls" );
+			$this->registerField( "postUser" );   	
 
-			$this->requirePermission( "add_post" );
+			$this->requirePermission( "update_post" );
         }
         
         /**
@@ -85,7 +86,7 @@
             // there must be something wrong if we can't fetch the post that we are trying to update...
             if( !$post ) {
 				$this->_view = new AdminPostsListView( $this->_blogInfo );
-				$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_post"));
+				$this->_view->setErrorMessage( $this->_locale->tr("error_fetching_article"));
                 $this->setCommonData();
 
                 return false;
@@ -107,8 +108,6 @@
              // if we got it, update some fields
             $post->setTopic( stripslashes($this->_postTopic));
             $postText = $this->_postText;
-            if($this->_postExtendedText)
-                $postText .= POST_EXTENDED_TEXT_MODIFIER.$this->_postExtendedText;
             $post->setText( stripslashes($postText));
             $post->setTopic( $this->_postTopic );
             $post->setText( $postText );
@@ -117,7 +116,8 @@
             $post->setDateObject( $this->_postTimestamp );
             $post->setCommentsEnabled( $this->_commentsEnabled );
 			$post->setPostSlug( $this->_postSlug );
-			$post->setGlobalCategoryId( $this->_globalArticleCategoryId );
+			$post->setGlobalCategoryId( $this->_globalArticleCategoryId );		
+			$post->setUser( $this->_posterId );			
 
             // prepare the custom fields
             $fields = Array();

Modified: plog/trunk/class/action/admin/chooser/adminresourcelistaction.class.php
===================================================================
--- plog/trunk/class/action/admin/chooser/adminresourcelistaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/admin/chooser/adminresourcelistaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -11,8 +11,6 @@
      */
     class AdminResourceListAction extends AdminAction
     {
-
-    	var $_destination;
 		var $_albumId;
 
     	/**
@@ -23,8 +21,6 @@
         {
         	$this->AdminAction( $actionInfo, $request );
 			
-        	$this->_destination = $this->_request->getValue( "mode" );
-        	
             $this->_albumId = $this->_request->getValue( "albumId" );
             if( $this->_albumId == "" )
             	$this->_albumId = 0;	
@@ -38,7 +34,6 @@
         function perform()
         {
 			$this->_view = new AdminSimpleResourcesListView( $this->_blogInfo, Array( "albumId" => $this->_albumId));
-			$this->_view->setValue( "destination", $this->_destination );
             $this->setCommonData();
 
             return true;

Modified: plog/trunk/class/action/blogaction.class.php
===================================================================
--- plog/trunk/class/action/blogaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/blogaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -229,7 +229,7 @@
             }
 			
             // fetch the BlogInfo object
-            include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );			
+            lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );			
             $blogs = new Blogs();
             if( $blogId ) {
 				lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );			

Modified: plog/trunk/class/action/commentaction.class.php
===================================================================
--- plog/trunk/class/action/commentaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/commentaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -65,8 +65,10 @@
         	$this->_view = new BlogView( $this->_blogInfo, "commentarticle", SMARTY_VIEW_CACHE_CHECK, 
 											   Array( "articleId" => $this->_articleId, "parentId" => $this->_parentId ));
 			// do nothing if the view was already cached
-			if( $this->_view->isCached()) 
+			if( $this->_view->isCached()){
+                $this->setCommonData();
 				return true;
+            }
 
 			// fetch the comments so far
             lt_include( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );

Modified: plog/trunk/class/action/defaultaction.class.php
===================================================================
--- plog/trunk/class/action/defaultaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/defaultaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 <?php
 
-	require_once( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
-	require_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );	
     lt_include( PLOG_CLASS_PATH."class/view/errorview.class.php" );
@@ -65,8 +65,8 @@
          */
         function perform()
         {
-            require_once( PLOG_CLASS_PATH."class/view/defaultview.class.php" );
-
+            lt_include( PLOG_CLASS_PATH."class/view/defaultview.class.php" );
+            
         	// first of all, we have to determine which blog we would like to see
 			$blogId = $this->_blogInfo->getId();
 
@@ -88,13 +88,14 @@
 			// do any work... it's already been done before and we should "safely" assume
 			// that there hasn't been any change so far
 			if( $this->_view->isCached()) {
+				$this->setCommonData();
 				return true;
 			}
 
-            require_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
-            require_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
-            require_once( PLOG_CLASS_PATH."class/data/pager/pager.class.php" );
-			require_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/data/pager/pager.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
 			lt_include( PLOG_CLASS_PATH."class/config/siteconfig.class.php" );			
 
             // if we got a category name instead of a category id, then we

Modified: plog/trunk/class/action/resourceserveraction.class.php
===================================================================
--- plog/trunk/class/action/resourceserveraction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/resourceserveraction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -90,7 +90,7 @@
             	// check if there was a user parameter
                 if( !empty($userName) ) {
                 	// if so, check to which blogs the user belongs
-					include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
+					lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
                 	$users = new Users();
                  	$userInfo = $users->getUserInfoFromUsername( $userName );
                     // if the user exists and is valid...
@@ -120,7 +120,7 @@
             }
 			
             // fetch the BlogInfo object
-            include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );			
+            lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );			
             $blogs = new Blogs();
             if( $blogId ) {
                 $this->_blogInfo = $blogs->getBlogInfo( $blogId );

Modified: plog/trunk/class/action/rssaction.class.php
===================================================================
--- plog/trunk/class/action/rssaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/rssaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -87,6 +87,7 @@
 			
 			// do nothing if the view was already cached
 			if( $this->_view->isCached()) {
+                $this->setCommonData();
 				return true;
 			}
 			

Modified: plog/trunk/class/action/searchaction.class.php
===================================================================
--- plog/trunk/class/action/searchaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/searchaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -45,6 +45,7 @@
 			// create the view and make sure that it hasn't been cached
             $this->_view = new BlogTemplatedView( $this->_blogInfo, VIEW_SEARCH_TEMPLATE, Array( "searchTerms" => $this->_searchTerms, "page" => $this->_page ));
 			if( $this->_view->isCached()) {
+                $this->setCommonData();
 				return true;
 			}
 			
@@ -67,9 +68,6 @@
 			                                                        POST_STATUS_PUBLISHED,
 			                                                        false );
 																		
-            // MARKWU: I add the searchterms variable for smarty/plog template
-            $searchTerms = $searchEngine->getAdaptSearchTerms( $this->_searchTerms );			
-            
             // if no search results, return an error message
             if( count($searchResults) == 0 ) {
                 $this->_view = new ErrorView( $this->_blogInfo, "error_no_search_results" );
@@ -102,7 +100,7 @@
             // search terms
             $this->_view->setValue( "searchresults", $searchResults );
             // MARKWU: Now, I can use the searchterms to get the keyword
-            $this->_view->setValue( "searchterms", $searchTerms );
+            $this->_view->setValue( "searchterms", $this->_searchTerms );
             // MARKWU:
 			$config =& Config::getConfig();
             $urlmode = $config->getValue( "request_format_mode" );			

Modified: plog/trunk/class/action/viewalbumaction.class.php
===================================================================
--- plog/trunk/class/action/viewalbumaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/viewalbumaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -63,7 +63,8 @@
 												"page" => $this->_page ));
 			if( $this->_view->isCached()) {
 				// nothing to do if it is cached!
-				return true;
+				$this->setCommonData();
+                return true;
 			}
 			
 			lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresources.class.php" );

Modified: plog/trunk/class/action/viewarticleaction.class.php
===================================================================
--- plog/trunk/class/action/viewarticleaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/viewarticleaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -6,8 +6,6 @@
     lt_include( PLOG_CLASS_PATH."class/view/errorview.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/config/siteconfig.class.php" );
 
-	define( "DEFAULT_SHOW_COMMENTS_MAX", 20 );
-
     /**
      * \ingroup Action
      * @private
@@ -73,8 +71,6 @@
 		
 		function _setErrorView()
 		{
-            lt_include( PLOG_CLASS_PATH."class/view/errorview.class.php" );
-
 			$this->_view = new ErrorView( $this->_blogInfo );
 			$this->_view->setValue( "message", "error_fetching_article" );
 			$this->setCommonData();		
@@ -244,7 +240,7 @@
 			// and the comments
 			$blogSettings = $this->_blogInfo->getSettings();			
 			$hardLimit = SiteConfig::getHardShowCommentsMax();
-			$commentsPerPage = $blogSettings->getValue( "show_comments_max", DEFAULT_SHOW_COMMENTS_MAX );	
+			$commentsPerPage = $blogSettings->getValue( "show_comments_max", $this->_config->getValue( "show_comments_max" ));	
 			if( $commentsPerPage > $hardLimit ) $commentsPerPage = $hardLimit;						
 
 			$comments = new ArticleComments();

Modified: plog/trunk/class/action/viewarticletrackbacksaction.class.php
===================================================================
--- plog/trunk/class/action/viewarticletrackbacksaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/viewarticletrackbacksaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -74,7 +74,8 @@
 						    "date" => $this->_date ));
 
 			 if( $this->_view->isCached()) {
-				return true;
+                 $this->setCommonData();
+                 return true;
 			 }
 			 
     		lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
@@ -92,7 +93,9 @@
 				$users = new Users();
 				$user = $users->getUserInfoFromUsername( $this->_userName );
 				if( !$user ) {
-					$this->_setErrorView();
+                    $this->_view = new ErrorView( $this->_blogInfo );
+                    $this->_view->setValue( "message", "error_incorrect_user" );
+                    $this->setCommonData();
 					return false;				
 				}
 				// if there was a user, use his/her id
@@ -103,7 +106,9 @@
 				$categories = new ArticleCategories();
 				$category = $categories->getCategoryByName( $this->_categoryName, $this->_blogInfo->getId());
 				if( !$category ) {
-					$this->_setErrorView();
+                    $this->_view = new ErrorView( $this->_blogInfo );
+                    $this->_view->setValue( "message", "error_fetching_category" );
+                    $this->setCommonData();
 					return false;				
 				}
 				// if there was a user, use his/her id

Modified: plog/trunk/class/action/viewresourceaction.class.php
===================================================================
--- plog/trunk/class/action/viewresourceaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/action/viewresourceaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -77,7 +77,8 @@
 										        "albumId" => $this->_albumId ));
 			// if it's cached, do nothing
 			if( $this->_view->isCached()) {
-				return true;
+				$this->setCommonData();
+                return true;
 			}
 			
 			// otherwise continue as normal...

Modified: plog/trunk/class/bootstrap.php
===================================================================
--- plog/trunk/class/bootstrap.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/bootstrap.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -20,7 +20,7 @@
      */
 
 	// load our custom lt_include method to speed up the inclusion of files
-	include_once( PLOG_CLASS_PATH."class/object/loader.class.php" );
+	include( PLOG_CLASS_PATH."class/object/loader.class.php" );
     
     // load the Exception class and set the needed error handlers for PHP 4.x
     if(PHP_VERSION < 5)

Modified: plog/trunk/class/cache/cache.class.php
===================================================================
--- plog/trunk/class/cache/cache.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/cache/cache.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -37,7 +37,7 @@
 		 */
         function Cache( $cacheProperties )
         {
-            require_once( PLOG_CLASS_PATH . "class/cache/Cache_Lite/Lite.php" );
+            lt_include( PLOG_CLASS_PATH . "class/cache/Cache_Lite/Lite.php" );
             
             $this->cache = new Cache_Lite( $cacheProperties );
             $this->lifeTime = $cacheProperties['lifeTime'];

Modified: plog/trunk/class/cache/cachemanager.class.php
===================================================================
--- plog/trunk/class/cache/cachemanager.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/cache/cachemanager.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -24,12 +24,12 @@
 
             if( $cache == null ) {
                 // source the neccessary files
-                require_once( PLOG_CLASS_PATH . "class/config/configfilestorage.class.php" );
+                lt_include( PLOG_CLASS_PATH . "class/config/configfilestorage.class.php" );
 
 				$config = new ConfigFileStorage( Array( "file" => PLOG_CLASS_PATH."config/cache.properties.php" ));
 				
 				if( $config->getValue( 'cache_method' ) == 'memcached' ) {
-					require_once( PLOG_CLASS_PATH . "class/cache/memcache.class.php" );
+					lt_include( PLOG_CLASS_PATH . "class/cache/memcache.class.php" );
 					// define defaults
 					$cacheParameter = array(
 						'servers' => $config->getValue( 'memcached_servers' ),
@@ -43,7 +43,7 @@
 					$cache = new MemCache( $cacheParameter);
 				}
 				else {					
-                	require_once( PLOG_CLASS_PATH . "class/cache/cache.class.php" );					
+                	lt_include( PLOG_CLASS_PATH . "class/cache/cache.class.php" );					
 	                // configure the Cache_Lite parameters, but providing some defaults in case the config file isn't there
 	                $cacheParameter = array(
 						'cacheDir' => $config->getValue( 'cache_lite_cache_dir', "./tmp/" ),

Modified: plog/trunk/class/cache/memcache.class.php
===================================================================
--- plog/trunk/class/cache/memcache.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/cache/memcache.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -18,7 +18,7 @@
 
         function MemCache( $cacheProperties )
         {
-            require_once( PLOG_CLASS_PATH . "class/cache/Memcached_Client/memcached-client.php" );
+            lt_include( PLOG_CLASS_PATH . "class/cache/Memcached_Client/memcached-client.php" );
             
             $this->cache = new memcached( $cacheProperties );
             $this->lifeTime = $cacheProperties['life_time'];

Modified: plog/trunk/class/config/configdbstorage.class.php
===================================================================
--- plog/trunk/class/config/configdbstorage.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/config/configdbstorage.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 <?php
 
     
-    lt_include( PLOG_CLASS_PATH."class/config/configfilestorage.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/config/configabstractstorage.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/cache/cachemanager.class.php" );
 	lt_include( PLOG_CLASS_PATH.'class/dao/daocacheconstants.properties.php' );
 

Modified: plog/trunk/class/config/configfilestorage.class.php
===================================================================
--- plog/trunk/class/config/configfilestorage.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/config/configfilestorage.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -55,9 +55,10 @@
 			lt_include( PLOG_CLASS_PATH."class/file/file.class.php" );
 			lt_include( PLOG_CLASS_PATH."class/config/properties.class.php" );			
             if( File::isReadable( $this->_configFile )) {
-        	   include( $this->_configFile );
-        	   $this->_props = new Properties( $config );
-        	   $result = true;
+                    // Note: It is correct to not use lt_include() here
+                include( $this->_configFile );
+                $this->_props = new Properties( $config );
+                $result = true;
             }
             else {
                 $this->_props = new Properties();

Modified: plog/trunk/class/controller/admincontroller.class.php
===================================================================
--- plog/trunk/class/controller/admincontroller.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/controller/admincontroller.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -76,6 +76,7 @@
          */
         function _loadActionMaps()
         {
+                // NOTE: this is an acceptable use of include()
 			include( PLOG_CLASS_PATH."class/controller/admincontrollermap.properties.php" );
 
             return $actions;

Modified: plog/trunk/class/controller/blogcontroller.class.php
===================================================================
--- plog/trunk/class/controller/blogcontroller.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/controller/blogcontroller.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -68,6 +68,7 @@
          */
         function _loadActionMaps()
         {
+                // Note: this is an acceptable use of include()
 			include( PLOG_CLASS_PATH."class/controller/controllermap.properties.php" );
 
             return $actions;

Modified: plog/trunk/class/dao/article.class.php
===================================================================
--- plog/trunk/class/dao/article.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/article.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -342,11 +342,14 @@
 		function getComments( $status = COMMENT_STATUS_NONSPAM )
 		{
 			// load the comments if they haven't been loaded yet
-			lt_include( PLOG_CLASS_PATH.'class/dao/articlecomments.class.php' );			
-			$userComments =  new ArticleComments();
-			$blogInfo = $this->getBlogInfo();
-			$blogSettings = $blogInfo->getSettings();
-			return( $userComments->getPostComments( $this->getId(), $blogSettings->getValue( 'comments_order' ), $status ));
+			if( is_null( $this->_comments[$status] )) {
+				lt_include( PLOG_CLASS_PATH.'class/dao/articlecomments.class.php' );			
+				$userComments =  new ArticleComments();
+				$blogInfo = $this->getBlogInfo();
+				$blogSettings = $blogInfo->getSettings();
+				$this->setComments( $userComments->getPostComments( $this->getId(), $blogSettings->getValue( 'comments_order' ), $status ), $status );
+			}	
+			return( $this->_comments[$status] );
 		}
 		
         /**
@@ -557,11 +560,12 @@
         /**
          * @private
          */
-		function setComments( $comments )
+		function setComments( $comments, $status = COMMENT_STATUS_NONSPAM )
 		{
-			$this->_comments = $comments;
-			if( !is_array( $this->_comments ))
-				$this->_comments = Array();
+			if( !isset( $this->_comments[$status] ))
+				$this->_comments[$status] = Array();
+				
+			$this->_comments[$status] = $comments;
 			
 			return true;
 		}

Modified: plog/trunk/class/dao/articlenotifications.class.php
===================================================================
--- plog/trunk/class/dao/articlenotifications.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/articlenotifications.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -189,7 +189,7 @@
          {
             // source classes
             lt_include( PLOG_CLASS_PATH."class/net/xmlrpcclient.class.php" );
-            require_once( PLOG_CLASS_PATH . 'class/config/config.class.php' );            
+            lt_include( PLOG_CLASS_PATH . 'class/config/config.class.php' );            
 
             // if this feature is not enabled, we quit
             $config =& Config::getConfig();

Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/articles.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -524,7 +524,7 @@
             $arcnives = false;
 
             if( !$archives ) {
-                require_once( PLOG_CLASS_PATH . 'class/dao/blogs.class.php' );
+                lt_include( PLOG_CLASS_PATH . 'class/dao/blogs.class.php' );
                 $blogs = new Blogs();
                 $blogInfo = $blogs->getBlogInfo( $blogId );
                 $blogSettings = $blogInfo->getSettings();
@@ -661,8 +661,8 @@
          */
         function addPostCategoriesLink( $article )
         {        	
-            require_once( PLOG_CLASS_PATH.'class/database/db.class.php' );
-            require_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+            lt_include( PLOG_CLASS_PATH.'class/database/db.class.php' );
+            lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
             
             $articleId = $article->getId();
             $categories = $article->getCategoryIds();
@@ -698,8 +698,8 @@
          */
         function deletePostCategoriesLink( $article )
         {
-            require_once( PLOG_CLASS_PATH.'class/database/db.class.php' );
-            require_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+            lt_include( PLOG_CLASS_PATH.'class/database/db.class.php' );
+            lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
 
 			$articleId = $article->getId();
 			$query = "DELETE FROM ".$this->getPrefix()."article_categories_link WHERE article_id = '".Db::qstr( $article->getId())."'";
@@ -824,7 +824,7 @@
             
             // update the blog counters
             if( $newArticle->getStatus() == POST_STATUS_PUBLISHED ) {
-				include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );	
+				lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );	
 	            $blogs = new Blogs();
     	        $blogInfo = $newArticle->getBlogInfo();
         	    $blogInfo->setTotalPosts( $blogInfo->getTotalPosts() + 1 );
@@ -849,7 +849,7 @@
 		 */
 		function addArticleText( $newArticle )
 		{
-            require_once( PLOG_CLASS_PATH . 'class/data/textfilter.class.php' );
+            lt_include( PLOG_CLASS_PATH . 'class/data/textfilter.class.php' );
 
 			$filter = new Textfilter();
 			$query = "INSERT INTO ".$this->getPrefix()."articles_text (article_id, topic, text, normalized_text, normalized_topic, mangled_topic) ".
@@ -972,14 +972,14 @@
 
 			// update the blog counter
 			if( $oldArticle->getStatus() == POST_STATUS_PUBLISHED && $article->getStatus() != POST_STATUS_PUBLISHED ) {
-				include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );				
+				lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );				
 		    	$blogs = new Blogs();
 	    	    $blogInfo = $article->getBlogInfo();
 	        	$blogInfo->setTotalPosts( $blogInfo->getTotalPosts() - 1 );
 				$blogInfo->setUpdateDate( Timestamp::getNowTimestamp());
 	            $blogs->updateBlog( $blogInfo );
 	        } elseif ( $oldArticle->getStatus() != POST_STATUS_PUBLISHED && $article->getStatus() == POST_STATUS_PUBLISHED ) {
-				include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );		
+				lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );		
 		    	$blogs = new Blogs();
 	    	    $blogInfo = $article->getBlogInfo();
 	        	$blogInfo->setTotalPosts( $blogInfo->getTotalPosts() + 1 );
@@ -1037,7 +1037,7 @@
          */
         function updateArticleNumReads( $articleId )
         {
-            require_once( PLOG_CLASS_PATH . 'class/database/db.class.php' );
+            lt_include( PLOG_CLASS_PATH . 'class/database/db.class.php' );
 
             $query = "UPDATE ".$this->getPrefix()."articles SET ".
                      " num_reads = num_reads+1, date = date".

Modified: plog/trunk/class/dao/bloginfo.class.php
===================================================================
--- plog/trunk/class/dao/bloginfo.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/bloginfo.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -89,7 +89,7 @@
 			$this->_fields = Array(
 				"blog" => "getBlog",
 				"owner_id" => "getOwnerId",
-				"about" => "getAbout",
+				"about" => "getUnformattedAbout",
 				"settings" => "getSettings",
 				"mangled_blog" => "getMangledBlogName",
 				"status" => "getStatus",
@@ -140,13 +140,29 @@
          * Returns a longer and descriptive text about this blog. It can also be empty since it is
          * configurable from within the "Blog Settings" in the administration interface.
          *
+		 * @param format Whether basic formatting should be applied to the text
          * @return A string containing the more descriptive text about the journal.
          */
-        function getAbout()
+        function getAbout( $format = true )
         {
-            return $this->_about;
+			$text = $this->_about;
+			
+			if( $format ) {
+				lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+				$text = TextFilter::autoP( $text );
+			}
+			
+            return( $text );
         }
 
+		/** 
+		 * @return Returns the information about this blog without any formatting.
+		 */
+		function getUnformattedAbout()
+		{
+			return( $this->getAbout( false ));
+		}
+
         /**
          * Returns a BlogSettings object with information about the settings of the journal.
          * @private
@@ -707,6 +723,7 @@
 			$this->_usersInfo = null;
 			$this->_category  = null;
 			$this->_locale    = null;
+			$this->_blogLocale = null;
 			//return( get_object_vars( $this ));
 			return( parent::__sleep());
 		}

Modified: plog/trunk/class/dao/blogs.class.php
===================================================================
--- plog/trunk/class/dao/blogs.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/blogs.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -27,7 +27,7 @@
          */
         function getBlogInfo( $blogId )
         {
-            require_once( PLOG_CLASS_PATH . 'class/dao/bloginfo.class.php' );
+            lt_include( PLOG_CLASS_PATH . 'class/dao/bloginfo.class.php' );
             return( $this->get( "id", $blogId,
                                 CACHE_BLOGINFOS,
                                 Array( CACHE_BLOGIDBYNAME => "getMangledBlogName",
@@ -42,14 +42,14 @@
          */
         function getBlogInfoByName( $blogName, $extendedInfo = false )
         {
-            require_once( PLOG_CLASS_PATH . 'class/dao/bloginfo.class.php' );        
+            lt_include( PLOG_CLASS_PATH . 'class/dao/bloginfo.class.php' );        
         	return( $this->get( "mangled_blog", $blogName,
                                 CACHE_BLOGIDBYNAME,
                                 Array( CACHE_BLOGINFOS => "getId" )));
         }
 
         function getBlogInfoByDomain($blogDomain, $extendedInfo = false){
-            require_once(PLOG_CLASS_PATH . 'class/dao/bloginfo.class.php');
+            lt_include(PLOG_CLASS_PATH . 'class/dao/bloginfo.class.php');
         	return( $this->get( "custom_domain", $blogDomain,
                                 CACHE_BLOGIDBYDOMAIN,
                                 Array( CACHE_BLOGINFOS => "getId" )));

Modified: plog/trunk/class/dao/blogsettings.class.php
===================================================================
--- plog/trunk/class/dao/blogsettings.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/blogsettings.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -51,7 +51,7 @@
 		{
 			// is it a plugin key?
 			if( substr( $key, 0, strlen( "plugin_" )) == "plugin_" ) {
-				include_once( PLOG_CLASS_PATH."class/plugin/globalpluginconfig.class.php" );
+				lt_include( PLOG_CLASS_PATH."class/plugin/globalpluginconfig.class.php" );
 				// check if users can override the plugin setting. If so, return the blog plugin settings
 				// and if not return the global setting
 				if( GlobalPluginConfig::canOverride( $key ) == PLUGIN_SETTINGS_USER_CAN_OVERRIDE ) {
@@ -59,8 +59,12 @@
 					// plugin settings say					
 					$value = parent::getValue( $key, GlobalPluginConfig::getValue( $key ));
 				}
-				else
+				else {
 					$value = GlobalPluginConfig::getValue( $key );
+				}
+				// If there no values from user or site plugin config, then we get it from $defaultValue
+				if( empty( $value ) )
+					$value = $defaultValue;
 			}
 			else {
 				$value = parent::getValue( $key, $defaultValue );

Modified: plog/trunk/class/dao/commentscommon.class.php
===================================================================
--- plog/trunk/class/dao/commentscommon.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/commentscommon.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -441,8 +441,8 @@
 		 */
 		function mapRow( $row )
 		{
-			require_once( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
-			require_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
 
 			$prefix = $this->getPrefix();
 			$date = $row["date"];

Modified: plog/trunk/class/dao/permission.class.php
===================================================================
--- plog/trunk/class/dao/permission.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/permission.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -33,7 +33,7 @@
 			$this->_name = $name;
 			$this->_description = $description;
 			$this->_id = $id;
-			$this->_adMinOnly = false;
+			$this->_adminOnly = false;
 			$this->_corePerm = false;
 			
 			$this->_fields = Array(

Modified: plog/trunk/class/dao/purgedata.class.php
===================================================================
--- plog/trunk/class/dao/purgedata.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/purgedata.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -2,7 +2,7 @@
 
 	lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
 	
-	define( "DEFAULT_PURGE_AMOUNT", 5 );
+	define( "DEFAULT_PURGE_AMOUNT", 15 );
 
 	/**
 	 * This class takes care of purging data, since it's a very complex process anyway

Modified: plog/trunk/class/dao/referers.class.php
===================================================================
--- plog/trunk/class/dao/referers.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/referers.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 <?php
 
-	require_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
-    require_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/model.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 	
 	define( "REFERRERS_LIST_ITEMS_PER_PAGE", 15 );	
 
@@ -34,17 +34,17 @@
          */
         function addReferer( $refererHeader, $articleId, $blogId )
         {
-            require_once( PLOG_CLASS_PATH."class/net/url.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/net/url.class.php" );
 
         	// we only add a new referer if we come from somewhere else than our own server
             $ourHost = $_SERVER["HTTP_HOST"];
 
             $refererUrl = new Url( $refererHeader );
+            $refererUrlHost = ( $refererUrl->getPort() == 80 ) ? $refererUrl->getHost() : $refererUrl->getHost().':'.$refererUrl->getPort();
 
             // if they're the same, we quit
-            if( $refererUrl->getHost() == $ourHost || $refererUrl->getHost() == "" ) {
+            if( $refererUrlHost == $ourHost || $refererUrlHost == "" )
             	return;
-            }
 
             // we have to check if a referer with that information exists
             // in the database
@@ -148,7 +148,7 @@
          */
         function mapRow( $row )
         {
-            require_once( PLOG_CLASS_PATH."class/dao/referer.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/referer.class.php" );
 
         	$referer = new Referer( $row["url"], 
         	                        $row["article_id"], 

Modified: plog/trunk/class/dao/searchengine.class.php
===================================================================
--- plog/trunk/class/dao/searchengine.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/searchengine.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -12,8 +12,7 @@
     /**
 	 * \ingroup DAO
 	 *
-	 * Provides search facilities. At the moment it does not use MySQL's FULLTEXT index features because we are
-	 * targetting as many people as possible and believe it or not, many people are still running MySQL 3.x.
+	 * Provides search facilities.
 	 *
 	 * This class provides methods for searching through articles, comments and custom fields.
 	 *
@@ -97,12 +96,12 @@
 			if( $db->isFullTextSupported()) {
 				$query = "(SELECT a.* FROM {$prefix}articles a 
 						  INNER JOIN {$prefix}articles_text at ON a.id = at.article_id
-				          WHERE MATCH(at.normalized_text, at.normalized_topic) AGAINST ('{$searchTerms}' IN BOOLEAN MODE) 
+				          WHERE MATCH(at.normalized_text, at.normalized_topic) AGAINST ('".Db::qstr($searchTerms)."' IN BOOLEAN MODE) 
 				          {$conds})
 					 	  UNION
 						  (SELECT a.* FROM {$prefix}articles a 
 						  INNER JOIN {$prefix}custom_fields_values cfv ON a.id = cfv.article_id
-						  WHERE MATCH(cfv.normalized_value) AGAINST ('{$searchTerms}' IN BOOLEAN MODE) 
+						  WHERE MATCH(cfv.normalized_value) AGAINST ('".Db::qstr($searchTerms)."' IN BOOLEAN MODE) 
 						  {$conds})
 						  ORDER BY date DESC";
 			}
@@ -113,7 +112,7 @@
 
 			$result = $this->Execute( $query, $page, $itemsPerPage );
 
-			include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
 			$articles = new Articles();
 
 			if( !$result )
@@ -162,12 +161,12 @@
 				// faster path via the fulltext indexes
 				$query = "(SELECT COUNT(a.id) AS total FROM {$prefix}articles a 
 						  INNER JOIN {$prefix}articles_text at ON a.id = at.article_id
-				          WHERE MATCH(at.normalized_text, at.normalized_topic) AGAINST ('{$searchTerms}' IN BOOLEAN MODE) 
+				          WHERE MATCH(at.normalized_text, at.normalized_topic) AGAINST ('".Db::qstr($searchTerms)."' IN BOOLEAN MODE) 
 				          {$conds})
 					 	  UNION
 						  (SELECT COUNT(a.id) AS total FROM {$prefix}articles a 
 						  INNER JOIN {$prefix}custom_fields_values cfv ON a.id = cfv.article_id
-						  WHERE MATCH(cfv.normalized_value) AGAINST ('{$searchTerms}' IN BOOLEAN MODE) 
+						  WHERE MATCH(cfv.normalized_value) AGAINST ('".Db::qstr($searchTerms)."' IN BOOLEAN MODE) 
 						  {$conds})";
 				// execute the query, and it should give us exactly two rows: one per each one of the queries of the union, so 
 				// the total amount of posts that match the search condition should be the sum of those two rows

Modified: plog/trunk/class/dao/usercomment.class.php
===================================================================
--- plog/trunk/class/dao/usercomment.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/usercomment.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -74,7 +74,7 @@
 			$this->_type = COMMENT_TYPE_COMMENT;
 			
 			$this->_blogId = $blogId;
-			$this->_sendNotification = false;
+			$this->_sendNotification = 0;
 			
 			$this->_normalizedTopic = '';
 			$this->_normalizedText = '';
@@ -427,7 +427,7 @@
 		function setSendNotification( $sendNotification )
 		{
 			if( $sendNotification == "" )
-				$sendNotificaton = false;
+				$sendNotificaton = 0;
 			$this->_sendNotification = $sendNotification;
 		}
 		
@@ -501,7 +501,7 @@
 		function getBlogInfo()
 		{
 			if( $this->_blogInfo === null ) {
-				include_once( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
+				lt_include( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
 				$blogs = new Blogs();
 				$this->_blogInfo = $blogs->getBlogInfo( $this->getBlogId());
 			}

Modified: plog/trunk/class/dao/userdata/baseuserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/baseuserdataprovider.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userdata/baseuserdataprovider.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -207,11 +207,36 @@
          *
          * @param blogId The blog identifier.
          * @param includeOwner Wether to include the owner of the blog or not.
+         * @param status
+         * @param searchTerms
          * @return An array with the information about the users who belong in
          * one way or another to that blog.
          */
-        function getBlogUsers( $blogId, $includeOwner = true, $status = USER_STATUS_ALL )
+        function getBlogUsers( $blogId, $includeOwner = true, $status = USER_STATUS_ALL, $searchTerms = "" )
         {
+            $users = Array();
+	        $prefix = $this->getPrefix();
+
+            // get the information about the owner, if requested so
+            if( $includeOwner ) {
+				lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+				$blogs = new Blogs();
+				$blogInfo = $blogs->getBlogInfo( $blogId );				
+                array_push( $users, $this->getUserInfoFromId( $blogInfo->getOwnerId()));
+            }
+
+            // now get the other users who have permission for that blog.
+            $query2 = "SELECT DISTINCT user_id FROM {$prefix}users_permissions WHERE blog_id = '".Db::qstr( $blogId )."'";
+            $result2 = $this->Execute( $query2 );
+            if( !$result2 ) // if error, return what we have so far...
+                return $users;
+
+            while( $row = $result2->FetchRow()) {
+                array_push( $users, $this->getUserInfoFromId( $row["user_id"] ));
+            }
+            $result2->Close();
+
+            return $users;
         }
         
         /**
@@ -241,5 +266,29 @@
         function emailExists($email)
         {
         }
+
+		/**
+		 * @final
+		 * Grants the given user is the login_perm. This is something that all integrations
+		 * must use or else users won't be allowed to log in.
+		 *
+		 * @param userInfo A UserInfo object
+		 * @return True if successful or false otherwise
+		 */
+		function grantLoginPermission( $userInfo )
+		{
+			lt_include( PLOG_CLASS_PATH."class/dao/permissions.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/userpermission.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+			
+			$perms = new Permissions();
+			$loginPerm = $perms->getPermissionByName( "login_perm" );
+			$perm = new UserPermission( $userInfo->getId(),    // user id
+			                            0,   // it's a global permission, no blog id needed
+			                            $loginPerm->getId()  // id of the permission
+			);
+			$userPerms = new UserPermissions();
+			$userPerms->grantPermission( $perm, true );
+		}		
 	}
 ?>
\ No newline at end of file

Modified: plog/trunk/class/dao/userdata/joomlauserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/joomlauserdataprovider.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userdata/joomlauserdataprovider.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 <?php
 
-    include_once( PLOG_CLASS_PATH."class/dao/userdata/baseuserdataprovider.class.php" );
-    include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/userdata/baseuserdataprovider.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
     
     define( "JOOMLA_USER_IS_BLOCKED", 1);
     define( "JOOMLA_USER_IS_ACTIVE", 0);
@@ -75,7 +75,6 @@
 	        $result = $this->_dbc->Execute( $query );
 	        	        
 	        if( !$result ){
-		        $this->log->debug("Joomla: User".$user." has failed to authenticate..." );
 	        	return false;
         	}
 	        	
@@ -85,7 +84,6 @@
             if($ret)
                 return true;
             else{
-	            $this->log->debug("Joomla: User ".$user." has no entrys in joomla db" );
                 return false;    	
             }
         }
@@ -137,7 +135,6 @@
         	}
 	        		        	
 	        if( $result->RowCount() != 1 ){
-	        	$this->log->debug("Joomla: No data found for username $username or not unique record");
                 $result->Close();
 	        	return false;
             }
@@ -158,7 +155,7 @@
          */
         function getUserInfoFromId( $userid, $extendedInfo = false )
         {
-	        include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+	        lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
 	        
 	        $query = "SELECT * FROM ".$this->_joomladbprefix."users WHERE id = '".Db::qstr( $userid )."'";
 
@@ -178,9 +175,10 @@
         function JoomlaAddBlog( $row )
         {
 		    // create a new blog
-		    include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
-            include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-            include_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+		    lt_include( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );				
+		    lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
 		    
 		    $blogs = new Blogs();
 		    $blog = new BlogInfo( $row["user"].$this->_blogtitle_postfix,  // name of the new blog
@@ -221,7 +219,7 @@
          */
         function _mapUserInfoObject( $row, $extraInfo=false)
         {
-	        include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+	        lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
 	        
 	        $plogJoomlaData = $this->getpLogJoomlaUserData( $row["id"] );
 
@@ -262,15 +260,13 @@
 		        $userInfo = BaseUserDataProvider::mapRow( $row, true );
 		        // check if this user is assigned to any blog
 		        $userBlogs = $userInfo->getBlogs();
-		        $this->log->debug("Joomla: checking if user ".$row["user"]." has at least one blog..." );
 		        if( empty($userBlogs )) {
-			        $this->log->debug( "Joomla: creating new blog for user!" );
+					// assign the login_perm permission
+					$this->grantLoginPermission( $userInfo );
+								
 			        $this->JoomlaAddBlog( $row );
 			        $userInfo->setBlogs( $this->getUsersBlogs( $userInfo->getId()));
      			}
-				else {
-					$this->log->debug("he already has one!!!");
-				}
 	        }
 	        else {
 		        $userInfo = BaseUserDataProvider::mapRow( $row );
@@ -362,7 +358,6 @@
         {
 	    	// is the user already there?
 	    	if( $this->getpLogJoomlaUserData( $user->getId())) {
-		    	$this->log->debug("Joomla user ".$user->getUsername()." already exists! Running an UPDATE query..." );
 		    	// we need to run an UPDATE query...
 		    	$query = "UPDATE ".$this->getPrefix().$this->_joomlaauxtable.
 		    	         " SET about = '".Db::qstr( $user->getAboutMyself()).
@@ -373,7 +368,6 @@
 	    	}
 	    	else {
 		    	// we need to run an INSERT query...	
-		    	$this->log->debug("Joomla user ".$user->getUsername()." does NOT exist yet! Running an INSERT query..." );
 		    	$query = "INSERT INTO ".$this->getPrefix().$this->_joomlaauxtable."(joomla_id, about, properties, blog_site_admin, resource_picture_id) ".
 		    			  " VALUES (".
 		    			  Db::qstr($user->getId()).",'".

Modified: plog/trunk/class/dao/userdata/lifetypeuserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/lifetypeuserdataprovider.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userdata/lifetypeuserdataprovider.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -69,14 +69,13 @@
         function getUserInfoFromUsername( $username )
         {
         	$user = $this->get( "username", $username, CACHE_USERIDBYNAME, Array( CACHE_USERINFO => "getId" ));
-		if( $user ) {
-			if( $user->getUsername() != $username ) {
-				$this->log->error( "MySQL returned object (".$user->getId().",".$user->getUsername().") for username = ".$username );
-				$user = false;
+			if( $user ) {
+				if( $user->getUsername() != $username ) {
+					$user = false;
+				}
 			}
-		}
 
-		return( $user );
+			return( $user );
         }
 
         /**
@@ -205,50 +204,6 @@
         }
 
         /**
-         * Returns an array with all the users that belong to the given
-         * blog.
-         *
-         * @param blogId The blog identifier.
-         * @param includeOwner Wether to include the owner of the blog or not.
-         * @param status
-         * @param searchTerms
-         * @return An array with the information about the users who belong in
-         * one way or another to that blog.
-         */
-        function getBlogUsers( $blogId, $includeOwner = true, $status = USER_STATUS_ALL, $searchTerms = "" )
-        {
-            $users = Array();
-	        $prefix = $this->getPrefix();
-
-            // get the information about the owner, if requested so
-            if( $includeOwner ) {
-                $query = "SELECT {$prefix}users.* FROM {$prefix}users, {$prefix}blogs 
-                          WHERE {$prefix}users.id = {$prefix}blogs.owner_id AND {$prefix}blogs.id = '".Db::qstr($blogId)."';";
-                $result = $this->Execute( $query );
-
-                if( !$result )
-                    return false;
-
-                $row = $result->FetchRow();
-                $result->Close();
-                array_push( $users, $this->mapRow( $row ));
-            }
-
-            // now get the other users who have permission for that blog.
-            $query2 = "SELECT DISTINCT user_id FROM {$prefix}users_permissions WHERE blog_id = '".Db::qstr( $blogId )."'";
-            $result2 = $this->Execute( $query2 );
-            if( !$result2 ) // if error, return what we have so far...
-                return $users;
-
-            while( $row = $result2->FetchRow()) {
-                array_push( $users, $this->getUserInfoFromId( $row["user_id"] ));
-            }
-            $result2->Close();
-
-            return $users;
-        }
-        
-        /**
          * Removes users from the database
          *
          * @param userId The identifier of the user we are trying to remove

Modified: plog/trunk/class/dao/userdata/phpbb2userdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/phpbb2userdataprovider.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userdata/phpbb2userdataprovider.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -41,7 +41,7 @@
          * @return true if user and password correct or false otherwise.
          */
         function authenticateUser( $user, $pass )
-        {
+        {	
 	        $query = "SELECT * FROM ".$this->_phpbbprefix."users WHERE username = '".Db::qstr( $user )."'
 	                  AND user_password = '".md5( $pass )."' AND user_active > 0";
 	                  
@@ -120,8 +120,6 @@
 	        
 	        $query = "SELECT * FROM ".$this->_phpbbprefix."users WHERE user_id = '".Db::qstr( $userid )."'";
 
-//print("user__id = $userid");
-	                  
 	        $result = $this->_dbc->Execute( $query );
 	        
 	        if( !$result )
@@ -130,16 +128,13 @@
 	        $row = $result->FetchRow();
             $result->Close();
 	        
-	        // fetch the user permissions
-	        //$perms = new UserPermissions();
-	        //$row["site_admin"] = $perms->isSiteAdmin( $userid );
-	        
 	        return( $this->_mapUserInfoObject( $row ));
         }
         
         function phpBB2AddBlog( $row )
         {
 		    // create a new blog
+		    lt_include( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );		
 		    lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
             lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
             lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
@@ -191,28 +186,28 @@
 	        $row["properties"] = serialize(Array());
 	        $row["id"] = $row["user_id"];   
 	        $row["status"] = ($row["user_active"] > 0) ? USER_STATUS_ACTIVE : USER_STATUS_DISABLED;
-			$row["site_admin"] = $row["user_level"];	        
+			$row["site_admin"] = $row["user_level"];	     
 	        	        
 	       	// does this phpbb user have a blog yet? If so, create one if the configuration
 	        // of the user data provider says so
 	        $providerConfig = $this->getProviderConfiguration();
 	        if( $providerConfig->getValue( "createBlogIfNotExisting" )) {
+		
+		
 		        $userInfo = BaseUserDataProvider::mapRow( $row, true );
 		        // check if this user is assigned to any blog
 		        $userBlogs = $userInfo->getBlogs();
-		        $this->log->debug("phpbb: checking if user ".$row["user"]." has at least one blog..." );
 		        if( empty($userBlogs )) {
-			        $this->log->debug( "phpbb: creating new blog for user!" );
+					// assign the login_perm permission
+					$this->grantLoginPermission( $userInfo );
+								
 			        $this->phpBB2AddBlog( $row );
 			        $userInfo->setBlogs( $this->getUsersBlogs( $userInfo->getId()));
-     			}
-				else {
-					$this->log->debug("he already has one!!!");
-				}
+     			}				
 	        }
 	        else {
 		        $userInfo = BaseUserDataProvider::mapRow( $row );
-	        }	        
+	        }
 	        
 	        return( $userInfo );
         }
@@ -327,7 +322,6 @@
         {
 	    	// is the user already there?
 	    	if( $this->getpLogPHPBBUserData( $user->getId())) {
-		    	$this->log->debug("phpbb user ".$user->getUsername()." already exists! Running an UPDATE query..." );
 		    	// we need to run an UPDATE query...
 		    	$query = "UPDATE ".$this->getPrefix()."phpbb2_users
 		    	          SET full_name = '".Db::qstr( $user->getFullName())."', 
@@ -338,8 +332,7 @@
 		    	          WHERE phpbb_id = '".Db::qstr( $user->getId())."'";    
 	    	}
 	    	else {
-		    	// we need to run an INSERT query...	
-		    	$this->log->debug("phpbb user ".$user->getUsername()." does NOT exist yet! Running an INSERT query..." );
+		    	// we need to run an INSERT query...
 		    	$query = "INSERT INTO ".$this->getPrefix()."phpbb2_users
 		    	          (full_name, about, properties, resource_picture_id,phpbb_id,status)
 		    	          VALUES ('".Db::qstr( $user->getFullName())."', '".
@@ -367,11 +360,11 @@
 	        $query = "SELECT * FROM ".$this->getPrefix()."phpbb2_users WHERE phpbb_id = '".Db::qstr($userId)."'";
 	        
 	        $result = $this->Execute( $query );
-	        
-	        if( !$result )
+	
+	        if( !$result ) 
 	        	return false;
 	        	
-	        if( $result->RowCount() == 0 ){
+	        if( $result->RowCount() == 0 ) {
                 $result->Close();
                 return false;
             }

Modified: plog/trunk/class/dao/userdata/simplepostnukeuserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/simplepostnukeuserdataprovider.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userdata/simplepostnukeuserdataprovider.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -90,6 +90,9 @@
                     //add Blog
                     $this->_PostNukeAddBlog($username, $newUserId);
 
+					// assign the login_perm permission
+					$this->grantLoginPermission( $userInfo );
+
                     return true;
                 }
                 else{
@@ -131,6 +134,7 @@
         */
         function _PostNukeAddBlog( &$username, &$userid )
         {
+		    lt_include( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );			
 		    lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
             lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
             lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );

Modified: plog/trunk/class/dao/userdata/vbb3userdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/vbb3userdataprovider.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userdata/vbb3userdataprovider.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -19,8 +19,8 @@
  */
 
 
-    include_once( PLOG_CLASS_PATH."class/dao/userdata/baseuserdataprovider.class.php" );
-    include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/userdata/baseuserdataprovider.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
     
     /**
      * Model representing the users in our application. Provides the methods such as
@@ -199,7 +199,7 @@
          */
         function getUserInfoFromId( $userid, $extendedInfo = false )
         {
-	        include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );	        
+	        lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );	        
 	        
 	        
 	        $query = "SELECT * FROM ".$this->_vbb3prefix."user WHERE userid = '".Db::qstr( $userid )."'";
@@ -223,10 +223,11 @@
         
         function vbb3AddBlog( $row )
         {
-		        // create a new blog
-		        include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
-            include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-            include_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+		    // create a new blog
+		    lt_include( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
 		    
 		    $blogs = new Blogs();
 		    $blog = new BlogInfo( $row["user"],  // name of the new blog
@@ -260,7 +261,7 @@
         
         function _mapUserInfoObject( $row, $extraInfo = false )
         {
-	        include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+	        lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
 	        
 	        $plogPhpBB2Data = $this->getpLogPHPBBUserData( $row["userid"] );
 
@@ -284,15 +285,13 @@
 		        $userInfo = BaseUserDataProvider::mapRow( $row, true );
 		        // check if this user is assigned to any blog
 		        $userBlogs = $userInfo->getBlogs();
-		        $this->log->debug("vbb3: checking if user ".$row["user"]." has at least one blog..." );
 		        if( empty($userBlogs )) {
-			        $this->log->debug( "vbb3: creating new blog for user!" );
+					// assign the login_perm permission
+					$this->grantLoginPermission( $userInfo );			
+			
 			        $this->vbb3AddBlog( $row );
 			        $userInfo->setBlogs( $this->getUsersBlogs( $userInfo->getId()));
      			}
-				else {
-					$this->log->debug("he already has one!!!");
-				}
 	        }
 	        else {
 		        $userInfo = BaseUserDataProvider::mapRow( $row );
@@ -441,7 +440,6 @@
         {
 	    	// is the user already there?
 	    	if( $this->getpLogPHPBBUserData( $user->getId())) {
-		    	$this->log->debug("phpbb user ".$user->getUsername()." already exists! Running an UPDATE query..." );
 		    	// we need to run an UPDATE query...
 		    	$query = "UPDATE ".$this->getPrefix()."phpbb2_users
 		    	          SET full_name = '".Db::qstr( $user->getFullName())."', 
@@ -453,7 +451,6 @@
 	    	}
 	    	else {
 		    	// we need to run an INSERT query...	
-		    	$this->log->debug("vbb3 user ".$user->getUsername()." does NOT exist yet! Running an INSERT query..." );
 		    	$query = "INSERT INTO ".$this->getPrefix()."phpbb2_users
 		    	          (full_name, about, properties, resource_picture_id,phpbb_id,status)
 		    	          VALUES ('".Db::qstr( $user->getFullName())."', '".
@@ -580,7 +577,7 @@
 				 */
 				function getSearchConditions( $searchTerms )
 				{
-					include_once( PLOG_CLASS_PATH."class/dao/searchengine.class.php" );			
+					lt_include( PLOG_CLASS_PATH."class/dao/searchengine.class.php" );			
 					// prepare the query string
 					$searchTerms = SearchEngine::adaptSearchString( $searchTerms );
 					

Modified: plog/trunk/class/dao/userdata/wbbuserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/wbbuserdataprovider.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userdata/wbbuserdataprovider.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 <?php
 
-    include_once( PLOG_CLASS_PATH."class/dao/userdata/baseuserdataprovider.class.php" );
-    include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/userdata/baseuserdataprovider.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
     
     /**
      * Model representing the users in our application. Provides the methods such as
@@ -119,7 +119,7 @@
          */
         function getUserInfoFromId( $userid, $extendedInfo = false )
         {
-	        include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+	        lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
 	        
 	        $query = "SELECT * FROM ".$this->_wbbprefix."users WHERE userid = '".Db::qstr( $userid )."'";
 
@@ -143,9 +143,10 @@
         function WBB2AddBlog( $row )
         {
 		    // create a new blog
-		    include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
-            include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-            include_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+		    lt_include( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );				
+		    lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
 
             $config =& Config::getConfig();
             $locale =& Locales::getLocale( $config->getValue( "default_locale" ));
@@ -180,7 +181,7 @@
         
         function _mapUserInfoObject( $row, $extraInfo = false )
         {
-	        include_once( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
+	        lt_include( PLOG_CLASS_PATH."class/dao/userpermissions.class.php" );
 	        
 	        $plogWBB2Data = $this->getpLogWBBUserData( $row["userid"] );
 
@@ -204,15 +205,13 @@
 		        $userInfo = BaseUserDataProvider::mapRow( $row, true );
 		        // check if this user is assigned to any blog
 		        $userBlogs = $userInfo->getBlogs();
-		        $this->log->debug("wbb: checking if user ".$row["user"]." has at least one blog..." );
 		        if( empty($userBlogs )) {
-			        $this->log->debug( "wbb: creating new blog for user!" );
+					// assign the login_perm permission
+					$this->grantLoginPermission( $userInfo );			
+			
 			        $this->WBB2AddBlog( $row );
 			        $userInfo->setBlogs( $this->getUsersBlogs( $userInfo->getId()));
      			}
-				else {
-					$this->log->debug("he already has one!!!");
-				}
 	        }
 	        else {
 		        $userInfo = BaseUserDataProvider::mapRow( $row );
@@ -341,7 +340,6 @@
         {
 	    	// is the user already there?
 	    	if( $this->getpLogWBBUserData( $user->getId())) {
-		    	$this->log->debug("wbb user ".$user->getUsername()." already exists! Running an UPDATE query..." );
 		    	// we need to run an UPDATE query...
 		    	$query = "UPDATE ".$this->getPrefix()."phpbb2_users
 		    	          SET full_name = '".Db::qstr( $user->getFullName())."', 
@@ -353,7 +351,6 @@
 	    	}
 	    	else {
 		    	// we need to run an INSERT query...	
-		    	$this->log->debug("wbb user ".$user->getUsername()." does NOT exist yet! Running an INSERT query..." );
 		    	$query = "INSERT INTO ".$this->getPrefix()."phpbb2_users
 		    	          (full_name, about, properties, resource_picture_id,phpbb_id,status)
 		    	          VALUES ('".Db::qstr( $user->getFullName())."', '".

Modified: plog/trunk/class/dao/userinfo.class.php
===================================================================
--- plog/trunk/class/dao/userinfo.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userinfo.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -67,7 +67,7 @@
 			   "password" => "getMD5Password",
 			   "email" => "getEmail",
 			   "full_name" => "getFullName",
-			   "about" => "getAboutMyself",
+			   "about" => "getUnformattedAboutMyself",
 			   "properties" => "getProperties",
 			   "status" => "getStatus",
 			   "resource_picture_id" => "getPictureId",
@@ -116,10 +116,32 @@
 			return $this->_id;
 		}
 
-		function getAboutMyself()
+		/**
+		 * Returns the text that was input in the 'about myself' text box
+		 * in the admin interface
+		 *
+		 * @param format Whether basic formatting should be applied to the text
+		 * @return Returns a string
+		 */
+		function getAboutMyself( $format = true ) 
 		{
-			return $this->_aboutmyself;
+			$text = $this->_aboutmyself;			
+			
+			if( $format ) {
+				lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+				$text = TextFilter::autoP( $text );
+			}
+			
+			return( $text );
 		}
+		
+		/**
+		 * @return Returns the information about this user without any formatting.
+		 */
+		function getUnformattedAboutMyself()
+		{
+			return( $this->getAboutMyself( false ));
+		}
 
 		function getEmail()
 		{

Modified: plog/trunk/class/dao/userpermissions.class.php
===================================================================
--- plog/trunk/class/dao/userpermissions.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/dao/userpermissions.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -53,13 +53,14 @@
          * Grants a permission to a user, for a given blog.
          * Any permission can be granted, as long as it exists.
          *
-         * @param userId The user which will receive the permission
-         * @param blogId The blog to which this permission will be given for this user
-         * @param permissionId The identifier of the permission that will be granted
+		 * @param perm A UserPermission object containing information abotu the permissions
+		 * and user that we'd like to grant
+		 * @param doNotCleanCache Whether we should ignore the code that triggers the cache. You should
+		 * probably not use this parameter if in doubt.
          * @return Returns true if the permission was set or already existed, or false
          * if there was any problem.
          */
-        function grantPermission( &$perm )
+        function grantPermission( &$perm, $doNotCleanCache = false )
         {
             // check if the permission has already been granted
 			$userPerms = $this->getUserPermissions( $perm->getUserId(), $perm->getUserId());
@@ -76,10 +77,12 @@
 				
 			// if not, grant it now
 			if(( $result = $this->add( $perm ))) {
-				$this->_cache->removeData( $perm->getUserId(), CACHE_USER_PERMISSIONS );
-				$this->_cache->removeData( $perm->getUserId(), CACHE_USERINFO );
-				$userInfo = $perm->getUserInfo();
-				$this->_cache->removeData( $userInfo->getUserName(), CACHE_USERIDBYNAME );
+				if( !$doNotCleanCache ) {
+					$this->_cache->removeData( $perm->getUserId(), CACHE_USER_PERMISSIONS );
+					$this->_cache->removeData( $perm->getUserId(), CACHE_USERINFO );
+					$userInfo = $perm->getUserInfo();
+					$this->_cache->removeData( $userInfo->getUserName(), CACHE_USERIDBYNAME );
+				}
 			}
 			
 			return( $result );

Modified: plog/trunk/class/data/Date/Span.class.php
===================================================================
--- plog/trunk/class/data/Date/Span.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/data/Date/Span.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -19,8 +19,8 @@
 // $Id: Span.php,v 1.4 2003/04/30 03:56:26 llucax Exp $
 //
 
-require_once PLOG_CLASS_PATH.'class/data/Date.class.php';
-require_once PLOG_CLASS_PATH.'class/data/Date/Calc.class.php';
+lt_include(PLOG_CLASS_PATH.'class/data/Date.class.php');
+lt_include(PLOG_CLASS_PATH.'class/data/Date/Calc.class.php');
 
 /**
  *
@@ -459,7 +459,7 @@
      *
      * @access public
      */
-    function setFromDateDiff($date1, $date2)
+    /*function setFromDateDiff($date1, $date2)
     {
         if (!is_a($date1, 'date') or !is_a($date2, 'date')) {
             return false;
@@ -480,7 +480,7 @@
             $days * 86400 + $hours * 3600 + $mins * 60 + $secs
         );
         return true;
-    }
+    }*/
 
     /**
      * Set the time span from another time object.

Modified: plog/trunk/class/data/Date.class.php
===================================================================
--- plog/trunk/class/data/Date.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/data/Date.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -24,9 +24,9 @@
  * Include supporting classes
  */
 // require_once PLOG_CLASS_PATH.'class/data/Date/TimeZone.class.php';
-require_once PLOG_CLASS_PATH.'class/data/Date/Calc.class.php';
-require_once PLOG_CLASS_PATH.'class/data/Date/Span.class.php';
-require_once PLOG_CLASS_PATH.'class/data/Date/TimeZone.class.php';
+lt_include(PLOG_CLASS_PATH.'class/data/Date/Calc.class.php');
+lt_include(PLOG_CLASS_PATH.'class/data/Date/Span.class.php');
+lt_include(PLOG_CLASS_PATH.'class/data/Date/TimeZone.class.php');
 /**@#-*/
 
 /**@#+
@@ -743,7 +743,7 @@
      * @param object Date $d2 the second date
      * @return int 0 if the dates are equal, -1 if d1 is before d2, 1 if d1 is after d2
      */
-    function compare($d1, $d2)
+    /*function compare($d1, $d2)
     {
         // $d1->convertTZ(new Date_TimeZone('UTC'));
         $d2->convertTZ(new Date_TimeZone('UTC'));
@@ -758,7 +758,7 @@
         if ($d1->second < $d2->second) return -1;
         if ($d1->second > $d2->second) return 1;
         return 0;
-    }
+    }*/
 
     /**
      * Test if this date/time is before a certain date/time
@@ -769,14 +769,14 @@
      * @param object Date $when the date to test against
      * @return boolean true if this date is before $when
      */
-    function before($when)
+    /*function before($when)
     {
         if (Date::compare($this,$when) == -1) {
             return true;
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Test if this date/time is after a certian date/time
@@ -787,14 +787,14 @@
      * @param object Date $when the date to test against
      * @return boolean true if this date is after $when
      */
-    function after($when)
+    /*function after($when)
     {
         if (Date::compare($this,$when) == 1) {
             return true;
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Test if this date/time is exactly equal to a certian date/time
@@ -805,14 +805,14 @@
      * @param object Date $when the date to test against
      * @return boolean true if this date is exactly equal to $when
      */
-    function equals($when)
+    /*function equals($when)
     {
         if (Date::compare($this,$when) == 0) {
             return true;
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Determine if this date is in the future
@@ -822,7 +822,7 @@
      * @access public
      * @return boolean true if this date is in the future
      */
-    function isFuture()
+    /*function isFuture()
     {
         $now = new Date();
         if ($this->after($now)) {
@@ -830,7 +830,7 @@
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Determine if this date is in the past
@@ -840,7 +840,7 @@
      * @access public
      * @return boolean true if this date is in the past
      */
-    function isPast()
+    /*function isPast()
     {
         $now = new Date();
         if ($this->before($now)) {
@@ -848,7 +848,7 @@
         } else {
             return false;
         }
-    }
+    }*/
 
     /**
      * Determine if the year in this date is a leap year

Modified: plog/trunk/class/data/captcha/captcha.class.php
===================================================================
--- plog/trunk/class/data/captcha/captcha.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/data/captcha/captcha.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -59,6 +59,11 @@
 			
 			$config =& Config::getConfig();
 			$this->cacheFolder = $config->getValue( "temp_folder", CAPTCHA_CACHE_FOLDER );
+			/**
+			 * Activate the line below and comment the line above if you have moved
+			 * your temporary folder outside of the web server tree
+			 */
+			//$this->cacheFolder = CAPTCHA_CACHE_FOLDER;
 			
 			$this->key = CAPTCHA_DEFAULT_KEY;
 			$this->expiredTime = CAPTCHA_DEFAULT_EXPIRATION_TIME;

Modified: plog/trunk/class/data/htmlcalendar.class.php
===================================================================
--- plog/trunk/class/data/htmlcalendar.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/data/htmlcalendar.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -266,7 +266,7 @@
 
     	$header = $monthName . (($showYear > 0) ? " " . $year : "");
         //$s .= '<h2>'.$header.'</h2>';     // remove this line #1
-    	$s .= "<table class=\"calMonth\">\n";
+    	$s .= "<table class=\"calMonth\" summary=\"\">\n";
 
         ///* // remove this line #2
 		$s .= "<thead>\n";
@@ -344,7 +344,7 @@
     	$prev = $this->getCalendarLink(0, $year - 1);
     	$next = $this->getCalendarLink(0, $year + 1);
 
-        $s .= "<table class=\"calYear\">\n";
+        $s .= "<table class=\"calYear\" summary=\"\">\n";
 		$s .= "<thead>\n";
         $s .= "<tr>";
     	$s .= "\t<th class=\"calYearBackward\">" . (($prev == "") ? "&nbsp;" : "<a href=\"$prev\">&laquo;</a>")  . "</th>\n";

Modified: plog/trunk/class/data/textfilter.class.php
===================================================================
--- plog/trunk/class/data/textfilter.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/data/textfilter.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -250,7 +250,7 @@
             // This should fixed the CJK/UTF-8 characters break by Jon's original modification.
             //
             // If possible, I really hope we can accept UTF-8 encoding only, it will make our life easier.
-            require_once( PLOG_CLASS_PATH . "class/config/configfilestorage.class.php" );
+            lt_include( PLOG_CLASS_PATH . "class/config/configfilestorage.class.php" );
 			$config = new ConfigFileStorage();
 			if( $config->getValue( 'db_character_set' ) == 'utf8' ) {
 				// Convert the ISO-8859-1 translation table to UTF-8
@@ -420,33 +420,53 @@
          *
          * @param string The string that we wish to convert into something that can be used as a URL
          */
-        function urlize( $string )
+        function urlize( $string, $domainize = false )
         {
-		    // remove unnecessary spaces and make everything lower case
+            lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
+			$config =& Config::getConfig();
+            $separator = $config->getValue( "urlize_word_separator", URLIZE_WORD_SEPARATOR_DEFAULT );
+
+            // remove unnecessary spaces and make everything lower case
 		    $string = preg_replace( "/ +/", " ", strtolower($string) );
 
             // removing a set of reserved characters (rfc2396: ; / ? : @ & = + $ ,)
-            $string = str_replace(array(';','/','?',':','@','&','=','+','$',','), '', $string);
+            $string = str_replace(array(';','/','?',':','@','&','=','+','$',','),
+                                  $separator, $string);
 
             // replace some characters to similar ones
             $search  = array(' ', 'ä', 'ö', 'ü','é','è','à','ç', 'à', 'è', 'ì',
                              'ò', 'ù', 'á', 'é', 'í', 'ó', 'ú', 'ë', 'ï' );
-            lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
-			$config =& Config::getConfig();
-            $separator = $config->getValue( "urlize_word_separator", URLIZE_WORD_SEPARATOR_DEFAULT );
-            
-            $replace = array( $separator , 'a','o','u','e','e','a','c', 'a', 'e', 'i',
+            $replace = array( $separator, 'a','o','u','e','e','a','c', 'a', 'e', 'i',
                               'o', 'u', 'a', 'e', 'i', 'o', 'u', 'e', 'i' );
+            if($domainize){
+                    // domains shouldn't have underscores, and we'll convert
+                    // hyphens to the user-customizable $separator to be
+                    // consistent
+                $search[] = '-';
+                $search[] = '_';
+                $replace[] = $separator;
+                $replace[] = $separator;
+            }
             $string = str_replace($search, $replace, $string);
             
-            // and everything that is still left that hasn't been replaced/encoded, throw it away
-            $string = preg_replace( '/[^a-z0-9 _.-]/', '', $string );        
+                // and everything that is still left that hasn't been
+                // replaced/encoded, throw it away
+                // NOTE: need double backslash to pass the escape to preg_replace
+            $good_characters = "a-z0-9.\\".$separator;
+            if(!$domainize){
+                $good_characters .= "_\\-";
+            }
+            $string = preg_replace( '/[^'.$good_characters.']/', '', $string );        
             
                 // remove doubled separators
             $string = preg_replace("/[".$separator."]+/", $separator, $string);
                 // remove starting and trailing separator chars
             $string = trim($string, $separator);
-
+            if($domainize){
+                // remove trailing dots - LT will add them back in if appropriate
+                $string = trim($string, ".");
+            }
+            
             return $string;            
         }
 		
@@ -467,28 +487,7 @@
          */
         function domainize( $string )
         {
-		    // remove unnecessary spaces and make everything lower case
-		    $string = preg_replace( "/ +/", " ", strtolower($string) );
-
-            // removing a set of reserved characters (rfc2396: ; / ? : @ & = + $ ,)
-            $string = str_replace(array(';','/','?',':','@','&','=','+','$',','), '', $string);
-
-            include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
-			$config =& Config::getConfig();
-            $sep = $config->getValue( "urlize_word_separator", URLIZE_WORD_SEPARATOR_DEFAULT );
-
-            // replace some characters to similar ones
-            // underscores aren't allowed in domain names according to rfc specs, and
-            // cause trouble in some browsers, particularly with cookies.
-            $search  = array('-', '_',' ', 'ä','ö','ü','é','è','à','ç','à','è','ì','ò','ù','á','é','í','ó','ú','ë','ï' );
-            $replace = array( $sep, $sep, $sep, 'a','o','u','e','e','a','c','a','e','i','o','u','a','e','i','o','u','e','i' );
-            $string = str_replace($search, $replace, $string);
-
-            // and everything that is still left that hasn't been replaced/encoded, throw it away
-            $string = preg_replace( "/[^a-z0-9.".$sep."]/", '', $string );
-            $string = trim($string, "-.");
-
-            return $string;            
+            return Textfilter::urlize($string, true);
         }
 
 		/**

Modified: plog/trunk/class/data/validator/rules/emaildnsrule.class.php
===================================================================
--- plog/trunk/class/data/validator/rules/emaildnsrule.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/data/validator/rules/emaildnsrule.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -68,7 +68,7 @@
 
             if ($connect = fsockopen($connectAddress, 25))
             {
-                $greetin = fgets($connect, 1024);
+                $greeting = fgets($connect, 1024);
 
                 if (ereg("^220", $greeting))
                 {
@@ -94,7 +94,8 @@
                     {
                         if(ereg("^4[0-9][0-9]", $helo) || ereg("^4[0-9][0-9]", $from) || ereg ("^4[0-9][0-9]", $to)){
                             $this->_setError(ERROR_RULE_EMAIL_DNS_SERVER_TEMP_FAIL);
-                            return false;
+                                // Note: see http://bugs.lifetype.net/view.php?id=718 to fix this
+                            return true;
                         }
                         else{
                             $this->_setError(ERROR_RULE_EMAIL_DNS_NOT_PERMITTED);

Modified: plog/trunk/class/database/db.class.php
===================================================================
--- plog/trunk/class/database/db.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/database/db.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -119,9 +119,11 @@
             		throw( new Exception( "getNewDb: Fatal error: could not connect to the database!" ));
                 	die();
             	}
-			}		
+			}	
 			
-			return( $dbs[$key] );				
+			$conn = $dbs[$key];	
+			
+			return( $conn );				
 		}
 
 		/**

Modified: plog/trunk/class/file/file.class.php
===================================================================
--- plog/trunk/class/file/file.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/file/file.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -224,9 +224,9 @@
                 return false;
 			 
 			 if( File::isDir( $file ))
-				 $result = rmdir( $file );
+				 $result = @rmdir( $file );
 			 else
-				 $result = unlink( $file );
+				 $result = @unlink( $file );
 			 
 			 return $result;
 		 }
@@ -392,7 +392,7 @@
               // copy the file to the new location
               if (!copy($inFile, $outFile)) {
                   // The copy failed, return false
-                  return FALSE;
+                  return false;
               }
             
               // Now delete the old file
@@ -404,7 +404,7 @@
               // but this call to unlink could just as easily fail
               unlink( $inFile );
             
-              return TRUE;
+              return true;;
           }
 		 
 		 /**
@@ -469,5 +469,22 @@
 
              return touch($fileName);
          }
+
+         /** 
+          * returns the basename of a file
+          *
+          * @return basename of the file
+          * @see PHP Function basename()
+          *
+          */
+         function basename( $fileName = null )
+         {
+             if( $fileName == null )
+                 return false;
+
+             $basename = preg_replace( '/^.+[\\\\\/]/', '', $fileName );
+
+             return $basename;
+         }         
 	 }
 ?>

Modified: plog/trunk/class/file/fileuploads.class.php
===================================================================
--- plog/trunk/class/file/fileuploads.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/file/fileuploads.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -2,6 +2,7 @@
 
 	
     lt_include( PLOG_CLASS_PATH."class/file/fileupload.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 
 	define( "FILE_UPLOADS_NOT_ENABLED", -200 );
 
@@ -43,6 +44,7 @@
 		{
         	// first, check if the upload feature is available
             $config =& Config::getConfig();
+
             if( !$config->getValue( "uploads_enabled" )) {
             	return FILE_UPLOADS_NOT_ENABLED;
             }
@@ -50,17 +52,15 @@
             if( $destinationFolder[strlen($destinationFolder)-1] != "/" )
             	$destinationFolder .= "/";
 				
-			//use basename of tmp_name istead of filename
-			//because there is locale problem with filename
-			//$fileName = $upload->getFileName();
-			if( $this->my_move_uploaded_file( $upload->getTmpName(), 
-			                                   $destinationFolder.basename($upload->getFileName()))){//$fileName)) {
+			$destFileName = basename( $upload->getTmpName() );
+
+			if( $this->my_move_uploaded_file( $upload->getTmpName(), $destinationFolder.$destFileName ) ) {
                	$upload->setFolder( $destinationFolder );
 				$error = 0;
             }
             else {
 				$error = 1;
-			}				
+			}
 			
 			$upload->setError( $error );
 			
@@ -79,6 +79,7 @@
         {
         	// first, check if the upload feature is available
             $config =& Config::getConfig();
+
             if( !$config->getValue( "uploads_enabled" )) {
             	return FILE_UPLOADS_NOT_ENABLED;
             }
@@ -91,8 +92,10 @@
 
         	foreach( $this->_files as $file ) {
                 $upload = new FileUpload( $file );
-                $fileName = $upload->getFileName();
-                if( $this->my_move_uploaded_file( $upload->getTmpName(), $destinationFolder.$fileName)) {
+
+				$destFileName = $upload->getFileName();
+
+                if( $this->my_move_uploaded_file( $upload->getTmpName(), $destinationFolder.$destFileName ) ) {
                 	$upload->setFolder( $destinationFolder );
                     $upload->setError( 0 );
                 }

Modified: plog/trunk/class/gallery/dao/galleryalbums.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryalbums.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/gallery/dao/galleryalbums.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -410,7 +410,7 @@
 		{
 			$db =& Db::getDb();
 			if( $db->isFullTextSupported()) {			
-				$query = "MATCH(normalized_name,normalized_description) AGAINST ('{$searchTerms}')";
+				$query = "MATCH(normalized_name,normalized_description) AGAINST ('".Db::qstr($searchTerms)."')";
 			}
 			else {
 				$query = "name LIKE '%".Db::qstr( $searchTerms )."%' OR normalized_description LIKE '%".Db::qstr( $searchTerms )."%'";

Modified: plog/trunk/class/gallery/dao/galleryresource.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresource.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/gallery/dao/galleryresource.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -202,6 +202,17 @@
         }
 
 		/**
+		 * @return the encoded name of the file in disk
+		 */
+        function getEncodedFileName()
+        {
+            $fileParts = explode( ".", $this->_fileName );
+            $fileExt = strtolower($fileParts[count($fileParts)-1]);
+            $encodedFileName = $this->getOwnerId()."-".$this->getId().".".$fileExt;
+        	return $encodedFileName;
+        }
+
+		/**
 		 * @return the description of the resource
 		 */
         function getDescription()
@@ -375,13 +386,20 @@
 		function getPreviewFileName()
 		{
     		lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );	
+
+			$config =& Config::getConfig();
+
+			// encoding the filename if "encoded_file_name" enabled
+			if( $config->getValue( "resources_naming_rule" ) == "encoded_file_name" )
+				$fileName = $this->getEncodedFileName();
+			else
+				$fileName = $this->getFileName();
 		
-			if( $this->getThumbnailFormat() == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE ) {
-				$previewFile = $this->getFileName();
-			}
-			else {
-				$previewFile = str_replace( ".".$this->_getFileExtension(), ".".$this->getThumbnailFormat(), $this->getFileName());
-			}
+			// change the file extension, if the thumbnail output format is different from the original file
+			if( $this->getThumbnailFormat() == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE )
+				$previewFile = $fileName;
+			else
+				$previewFile = str_replace( ".".$this->_getFileExtension(), ".".$this->getThumbnailFormat(), $fileName );
 
 			return $previewFile;
 		}
@@ -411,16 +429,43 @@
 		{
 			lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );		
 		
-			if( $this->getThumbnailFormat() == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE ) {
-				$previewFile = $this->getFileName();
-			}
-			else {			
-				$previewFile = str_replace( ".".$this->_getFileExtension(), ".".$this->getThumbnailFormat(), $this->getFileName());
-			}
+			$config =& Config::getConfig();
 
+			// encoding the filename if "encoded_file_name" enabled
+			if( $config->getValue( "resources_naming_rule" ) == "encoded_file_name" )
+				$fileName = $this->getEncodedFileName();
+			else
+				$fileName = $this->getFileName();
+			
+			// change the file extension, if the thumbnail output format is different from the original file
+			if( $this->getThumbnailFormat() == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE )
+				$previewFile = $fileName;
+			else
+				$previewFile = str_replace( ".".$this->_getFileExtension(), ".".$this->getThumbnailFormat(), $fileName );
+
 			return $previewFile;
 		}
+
+		/**
+		 * returns the full path to the file with the original size
+		 *
+		 * @return full path to the original size
+		 */
+		function getOriginalSizeFileName()
+		{
+			lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );		
 		
+			$config =& Config::getConfig();
+
+			// encoding the filename if "encoded_file_name" enabled
+			if( $config->getValue( "resources_naming_rule" ) == "encoded_file_name" )
+				$fileName = $this->getEncodedFileName();
+			else
+				$fileName = $this->getFileName();
+			
+			return $fileName;
+		}
+		
 		function getNormalizedDescription()
 		{
 			lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );

Modified: plog/trunk/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresources.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/gallery/dao/galleryresources.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -354,12 +354,6 @@
 				$this->Execute( $query );
 			}
 			
-			lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryalbums.class.php" );			
-			$albums = new GalleryAlbums();
-			$album = $albums->getAlbum( $albumId );
-			$album->setNumResources( $album->getNumResources() + 1 );
-			$albums->updateAlbum( $album );			
-			
 			// clear our own caches
             $this->_cache->removeData( $resourceId, CACHE_RESOURCES );
 			$this->_cache->removeData( $ownerId, CACHE_RESOURCES_USER );
@@ -483,6 +477,12 @@
                 $this->Execute( $query );
                 return $resFile;
             }
+
+			lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryalbums.class.php" );			
+			$albums = new GalleryAlbums();
+			$album = $albums->getAlbum( $albumId );
+			$album->setNumResources( $album->getNumResources() + 1 );
+			$albums->updateAlbum( $album );			
 			
             // and finally, we can generate the thumbnail only if the file is an image, of course :)
             if( $resourceType == GALLERY_RESOURCE_IMAGE ) {
@@ -863,7 +863,7 @@
 			// search the text via the existing FULLTEXT index
 			$db =& Db::getDb();
 			if( $db->isFullTextSupported()) {			
-				$query .= " OR MATCH(normalized_description) AGAINST ('{$searchTerms}')";	
+				$query .= " OR MATCH(normalized_description) AGAINST ('".Db::qstr($searchTerms)."')";	
 			}
 			else {
 				$query .= " OR normalized_description LIKE '%".Db::qstr( $searchTerms )."%'";

Modified: plog/trunk/class/gallery/dao/galleryresourcestorage.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresourcestorage.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/gallery/dao/galleryresourcestorage.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -240,20 +240,26 @@
             	return $result;
             }
 
-            // rename it while it's there
-			$origFile = $tmpFolder."/".basename($upload->getFileName());
+			$origFile = $tmpFolder."/".basename( $upload->getTmpName() );
+
 			//do not use storeFile method because I have change filename in $tmpFolder.
 			//$destFile = $this->storeFile( $resourceId, $ownerId, $origFile, RESOURCE_STORAGE_STORE_MOVE );
 			//$destFile use $filePath and $fileName generated above.
-
 			//$destFile = $filePath.$fileName;
-			$destFile = $filePath.$upload->getFileName();
 
-//=========================================			
-//codes below are copy and modify from method storeFile
+			if( $config->getValue( "resources_naming_rule" ) == "encoded_file_name" ) {
+				$fileName = $upload->getFileName();
+	            // new name for the file
+	            $fileParts = explode( ".", $fileName);
+	            $fileExt = strtolower($fileParts[count($fileParts)-1]);
+				$destFile = $filePath.$ownerId."-".$resourceId.".".$fileExt;
+			}
+			else {
+				$destFile = $filePath.$upload->getFileName();
+			}
+
 			// first of all, check if the file is readable and if not, quit	
 			if( !File::isReadable($origFile)) {
-				print("dest file = ".$destFile." - orig file = ".$origFile."<br/>");
 				return false;
 			}
 
@@ -265,8 +271,6 @@
 			// check that the permissions are correct
 			File::chMod( $destFile, 0755 );
 
-//=========================================			
-
             return $destFile;
         }
 
@@ -289,9 +293,18 @@
 
             // new name for the file
             $fileParts = explode( ".", $fileName);
-            $fileExt = $fileParts[count($fileParts)-1];
+            $fileExt = strtolower($fileParts[count($fileParts)-1]);
+
             //$destFile = "$ownerId-$resourceId.$fileExt";
-			$destFile = basename( $fileName );
+			$config =& Config::getConfig();
+
+			// first of all, remove the resource file itself
+            $filePath = $this->getUserFolder( $ownerId );
+			if( $config->getValue( "resources_naming_rule" ) == "encoded_file_name" )
+				$destFile = $ownerId."-".$resourceId.".".$fileExt;
+			else
+				$destFile = basename( $fileName );
+
             $destPath = $this->getUserFolder( $ownerId );
 
 			// first of all, check if the file is readable and if not, quit	
@@ -324,9 +337,14 @@
         function remove( $resource )
         {
         	if( $resource ) {
+				$config =& Config::getConfig();
+
 				// first of all, remove the resource file itself
                 $filePath = $this->getUserFolder( $resource->getOwnerId());
-				$fullName = $filePath.$resource->getFileName();
+				if( $config->getValue( "resources_naming_rule" ) == "encoded_file_name" )
+					$fullName = $filePath.$resource->getEncodedFileName();
+				else
+					$fullName = $filePath.$resource->getFileName();
 
 				if( File::isReadable( $fullName)) {
 					$result = File::delete( $fullName );
@@ -361,7 +379,17 @@
 		 */
 		function getResourcePath( $resource )
 		{
-			return( $this->getUserFolder( $resource->getOwnerId()).$resource->getFileName());
+			$config =& Config::getConfig();
+
+			// first of all, remove the resource file itself
+            $filePath = $this->getUserFolder( $resource->getOwnerId());
+			if( $config->getValue( "resources_naming_rule" ) == "encoded_file_name" )
+				$fileName = $resource->getEncodedFileName();
+			else
+				$fileName = $resource->getFileName();
+
+			$resourcePath = $this->getUserFolder( $resource->getOwnerId()).$fileName;
+			return $resourcePath;
 		}
     }
 ?>

Modified: plog/trunk/class/gallery/resizers/gallerygdresizer.class.php
===================================================================
--- plog/trunk/class/gallery/resizers/gallerygdresizer.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/gallery/resizers/gallerygdresizer.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -55,6 +55,10 @@
             if( !$this->save( $outFile ))
             	return false;
 
+                // depending on the default file creation settings in some hosts,
+                // files created may not be readable by the web server
+            File::chMod( $outFile, 0644 );
+
             return $outFile;
         }
         

Modified: plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php
===================================================================
--- plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/gallery/resizers/gallerythumbnailgenerator.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -28,7 +28,8 @@
 			$resizer = new GalleryResizer( $resFile );
 			lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );			
 			GalleryResourceStorage::checkPreviewsStorageFolder( $ownerId );
-			$outFile = GalleryResourceStorage::getPreviewsFolder( $ownerId ).basename($resFile);
+			lt_include( PLOG_CLASS_PATH."class/file/file.class.php" );
+			$outFile = GalleryResourceStorage::getPreviewsFolder( $ownerId ).File::basename($resFile);
 			
 			// and finally, we can generate the preview!
 			$result = $resizer->generate( $outFile, $previewHeight, $previewWidth, $previewKeepAspectRatio );
@@ -61,7 +62,8 @@
 			$resizer = new GalleryResizer( $resFile );
 		    lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );			
 			GalleryResourceStorage::checkMediumSizePreviewsStorageFolder( $ownerId );
-			$outFile = GalleryResourceStorage::getMediumSizePreviewsFolder( $ownerId ).basename( $resFile );
+			lt_include( PLOG_CLASS_PATH."class/file/file.class.php" );
+			$outFile = GalleryResourceStorage::getMediumSizePreviewsFolder( $ownerId ).File::basename( $resFile );
 			
 			// and finally, we can generate the preview!
 			$result = $resizer->generate( $outFile, $previewWidth, $previewHeight, $previewKeepAspectRatio );
@@ -96,7 +98,8 @@
 			$resizer = new GalleryResizer( $resFile );
 		    lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );			
 			GalleryResourceStorage::checkUserStorageFolder( $ownerId );
-			$outFile = GalleryResourceStorage::getUserFolder( $ownerId ).basename( $resFile );
+			lt_include( PLOG_CLASS_PATH."class/file/file.class.php" );
+			$outFile = GalleryResourceStorage::getUserFolder( $ownerId ).File::basename( $resFile );
 			
 			// and finally, we can generate the preview!
 			$result = $resizer->generate( $outFile, $previewWidth, $previewHeight, $previewKeepAspectRatio );

Modified: plog/trunk/class/locale/bloglocale.class.php
===================================================================
--- plog/trunk/class/locale/bloglocale.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/locale/bloglocale.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -46,8 +46,10 @@
   
             $fileName = $this->_defaultFolder."/locale_".$this->_code.".php";
 
-            if( File::isReadable( $fileName ))
+            if( File::isReadable( $fileName )){
+                    // TODO: check to see that this is only called once??
                 include( $fileName );
+            }
 
 			// The following is just to handle the case where there isn't
 			// a valid local file.

Modified: plog/trunk/class/locale/locale.class.php
===================================================================
--- plog/trunk/class/locale/locale.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/locale/locale.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -119,8 +119,10 @@
   
 			// load the blog locale
             $fileName = $this->_defaultFolder."/locale_".$this->_code.".php";
-            if( File::isReadable( $fileName ))
+            if( File::isReadable( $fileName )){
+                    // TODO: this function is only called once, right?
                 include( $fileName );
+            }
 			if ( !isset($messages) || !is_array( $messages ) ) {
 				$messages = array();
 			}
@@ -128,8 +130,10 @@
 			
 			// load the admin locale
 			$fileName = $this->_defaultFolder."/admin/locale_".$this->_code.".php";
-            if( File::isReadable( $fileName ))
+            if( File::isReadable( $fileName )){
+                    // TODO: this function is only called once, right?
                 include( $fileName );
+            }
 			if ( !isset($messages) || !is_array( $messages ) ) {
 				$messages = array();
 			}

Modified: plog/trunk/class/locale/locales.class.php
===================================================================
--- plog/trunk/class/locale/locales.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/locale/locales.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -51,7 +51,7 @@
          */
         function &getBlogLocale( $localeCode = null )
         {
-			include_once( PLOG_CLASS_PATH."class/locale/bloglocale.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/locale/bloglocale.class.php" );
 	
         	// array to keep track of the locales that we have already loaded, so that
             // we don't have to fetch them from disk
@@ -69,7 +69,7 @@
             	$locale = $loadedLocales[$localeCode];
             } 
 			else {
-                require_once( PLOG_CLASS_PATH . "class/cache/cachemanager.class.php" );
+                lt_include( PLOG_CLASS_PATH . "class/cache/cachemanager.class.php" );
                 $cache =& CacheManager::getCache();
                 $locale = $cache->getData( $localeCode, CACHE_BLOG_LOCALES );
                 if ( !$locale ) {
@@ -148,7 +148,7 @@
             	$locale = $loadedLocales[$localeCode];
             } 
 			else {
-                require_once( PLOG_CLASS_PATH . "class/cache/cachemanager.class.php" );
+                lt_include( PLOG_CLASS_PATH . "class/cache/cachemanager.class.php" );
                 $cache =& CacheManager::getCache();
                 $locale = $cache->getData( $localeCode, CACHE_LOCALES );
                 if ( !$locale ) {

Modified: plog/trunk/class/locale/pluginlocale.class.php
===================================================================
--- plog/trunk/class/locale/pluginlocale.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/locale/pluginlocale.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -48,6 +48,7 @@
 
 			if( File::isReadable( $fileName ))
 			{
+                    // TODO: this function is only called once, right?
 				include( $fileName );
 			}
 	

Modified: plog/trunk/class/logger/config/loggerconfigloader.class.php
===================================================================
--- plog/trunk/class/logger/config/loggerconfigloader.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/logger/config/loggerconfigloader.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -23,7 +23,7 @@
 		{
 			// load the config file if it is readable
 			if( File::isReadable( $defaultFilePath )) {
-				include_once( $defaultFilePath );
+				include( $defaultFilePath );
 				$this->_keys = $config;
 			}
 			else {

Modified: plog/trunk/class/mail/phpmailer/class.phpmailer.php
===================================================================
--- plog/trunk/class/mail/phpmailer/class.phpmailer.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/mail/phpmailer/class.phpmailer.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -457,7 +457,7 @@
      * @return bool
      */
     function SmtpSend($header, $body) {
-        include_once($this->PluginDir . "class.smtp.php");
+        lt_include($this->PluginDir . "class.smtp.php");
         $error = "";
         $bad_rcpt = array();
 

Modified: plog/trunk/class/misc/version.class.php
===================================================================
--- plog/trunk/class/misc/version.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/misc/version.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -27,6 +27,7 @@
 			$version = "undefined";
 
             if( File::isReadable( $versionFile )) {
+                    // NOTE: this is a valid use of include()
                 include( $versionFile );
             } else {
                 $version = "UNKNOWN";

Modified: plog/trunk/class/net/baserequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/baserequestgenerator.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/net/baserequestgenerator.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -11,7 +11,12 @@
     
     define( "DEFAULT_SCRIPT_NAME", "index.php" );
 
+	/**
+	 * Default folder where resources are installed
+	 */
+	define( "DEFAULT_GALLERY_RESOURCES_FOLDER", "./gallery/" );
 
+
     /**
      * \ingroup Net
      *
@@ -205,6 +210,25 @@
             return $url;
         }
 
+		/**
+		 * Returns the base URL to resources
+		 */
+		function getResourcesBaseUrl()
+		{
+			lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
+			$config =& Config::getConfig();
+			// the default value for this setting is to use a relative path that starts with './' so we have to make sure that
+			// that bit is not included in the URL (it wouldn't have any harmful effect, but it'd look ugly)
+			$galleryFolder = str_replace( "./", "/", $config->getValue( "resources_folder", DEFAULT_GALLERY_RESOURCES_FOLDER ));
+			// make sure that the base URL ends with a forward slash
+			if( $galleryFolder[strlen($galleryFolder)-1] != "/" )
+				$galleryFolder .= "/";
+			
+			$url = $this->getBaseUrl().$galleryFolder;
+			
+			return( $url );
+		}
+
         /** 
          * @return Returns the URL pointing to the given parameter. This URL is built by querying the current
          * base URL and then appending the value of the $res parameter
@@ -481,7 +505,6 @@
         	throw( new Exception( "This function must be implemented by child classes." ));
         }
 
-
         /**
          * Returns the link to a resource preview
          *
@@ -490,7 +513,7 @@
         function resourcePreviewLink( $resource )
         {
             $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId());            
-			$resourceLink = $this->getBaseUrl()."/gallery/".$blogId."/previews/".rawurlencode($resource->getPreviewFileName());            
+			$resourceLink = $this->getResourcesBaseUrl().$blogId."/previews/".rawurlencode($resource->getPreviewFileName());            
             return $resourceLink;
         }
 		
@@ -502,7 +525,7 @@
         function resourceMediumSizePreviewLink( $resource )
         {
             $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId());            
-			$resourceLink = $this->getBaseUrl()."/gallery/".$blogId."/previews-med/".rawurlencode($resource->getMediumSizePreviewFileName());
+			$resourceLink = $this->getResourcesBaseUrl().$blogId."/previews-med/".rawurlencode($resource->getMediumSizePreviewFileName());
             return $resourceLink;
 		}
 
@@ -514,10 +537,46 @@
         function resourceDownloadLink( $resource )
         {
             $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId());            
-			$resourceLink = $this->getBaseUrl()."/gallery/".$blogId."/".rawurlencode($resource->getFileName());
+			$resourceLink = $this->getResourcesBaseUrl().$blogId."/".rawurlencode($resource->getOriginalSizeFileName());
             return $resourceLink;
         }
+
+        /**
+         * Returns the link to a resource preview with raw file name, for TinyMCE use only
+         *
+         * @param album Generates the correct link to fetch a resource preview
+         */
+        function rawResourcePreviewLink( $resource )
+        {
+            $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId());            
+			$resourceLink = $this->getResourcesBaseUrl().$blogId."/previews/".$resource->getPreviewFileName();            
+            return $resourceLink;
+        }
 		
+        /**
+         * Returns the link to a resource preview with raw file name, for TinyMCE use only
+         *
+         * @param album Generates the correct link to fetch a resource preview
+         */
+        function rawResourceMediumSizePreviewLink( $resource )
+        {
+            $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId());            
+			$resourceLink = $this->getResourcesBaseUrl().$blogId."/previews-med/".$resource->getMediumSizePreviewFileName();
+            return $resourceLink;
+		}
+
+        /**
+         * Returns the link to a resource with raw file name, for TinyMCE use only
+         *
+         * @param resource Generates the correct link to fetch a resource
+         */
+        function rawResourceDownloadLink( $resource )
+        {
+            $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId());            
+			$resourceLink = $this->getResourcesBaseUrl().$blogId."/".$resource->getOriginalSizeFileName();
+            return $resourceLink;
+        }
+		
 		/**
 		 * whether we should generate valid xhtml requests or not
 		 * (used for example when sending out messages, as some email clients will

Modified: plog/trunk/class/net/http/phpsniff/phpSniff.class.php
===================================================================
--- plog/trunk/class/net/http/phpsniff/phpSniff.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/net/http/phpsniff/phpSniff.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -19,7 +19,7 @@
     License along with this library; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *******************************************************************************/
-require_once( PLOG_CLASS_PATH.'class/net/http/phpsniff/phpSniff.core.php');
+lt_include( PLOG_CLASS_PATH.'class/net/http/phpsniff/phpSniff.core.php');
 
 //===============================================================
 //  the following defines are used to create the short

Modified: plog/trunk/class/net/http/subdomains.class.php
===================================================================
--- plog/trunk/class/net/http/subdomains.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/net/http/subdomains.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -139,7 +139,7 @@
 		 */
 		function domainNameExists( $domain, $ignoreBlogId=0 )
 		{
-			include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
 			$blogs = new Blogs();
             $blog = $blogs->getBlogInfoByDomain( $domain );
 			$valid = is_object($blog);

Modified: plog/trunk/class/net/xmlrpc/xmlrpcserver.class.php
===================================================================
--- plog/trunk/class/net/xmlrpc/xmlrpcserver.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/net/xmlrpc/xmlrpcserver.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -160,7 +160,7 @@
 	                // Add article notifcations if this is specified by the default setting.
 	                if ($blogSettings->getValue( "default_send_notification" ))
 	                {
-	                    require_once( PLOG_CLASS_PATH."class/dao/articlenotifications.class.php" );
+	                    lt_include( PLOG_CLASS_PATH."class/dao/articlenotifications.class.php" );
 
 	                    $artNotifications = new ArticleNotifications();
 	                    $artNotifications->addNotification( $postid, $blogid, $userInfo->getId());
@@ -336,7 +336,7 @@
                     // Add article notifcations if this is specified by the default setting.
                     if ($blogSettings->getValue( "default_send_notification" ))
                     {
-                        require_once( PLOG_CLASS_PATH."class/dao/articlenotifications.class.php" );
+                        lt_include( PLOG_CLASS_PATH."class/dao/articlenotifications.class.php" );
     
                         $artNotifications = new ArticleNotifications();
                         $artNotifications->addNotification( $postid, $blogid, $userInfo->getId());
@@ -461,7 +461,7 @@
 
 	    function getPost($args)
 	    {
-	        include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );		
+	        lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );		
 		
 			$users = new Users();
 			$articles = new Articles();
@@ -735,7 +735,10 @@
 					return( new IXR_Error(-1, 'This user does not have enough permissions' ));
 				}
 
-	            $catList = $content["categories"];
+                $catList = NULL;
+				if ( array_key_exists( "categories",  $content ) ) {
+                    $catList = $content["categories"];
+	            }
 	            //
 	            // :KLUDGE:
 	            // not exactly the smartest and fastest bit of code ever but it seems to work :-)
@@ -1184,7 +1187,7 @@
 
 	        if( $userInfo )
 	        {
-	            include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+	            lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
 
 	            $item = $articles->getBlogArticle($postid,
 	                                              -1, // blogId
@@ -1236,7 +1239,7 @@
 	        $userInfo = $users->getUserInfo( $username, $password );
 
 	        if( $userInfo ) {
-	            include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+	            lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
 
 	            $article = $articles->getBlogArticle($postid,
 	                                              -1, // blogId

Modified: plog/trunk/class/object/loader.class.php
===================================================================
--- plog/trunk/class/object/loader.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/object/loader.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -3,8 +3,8 @@
 	function lt_include( $filename )
 	{ 
 		if(!isset($GLOBALS['included_files'][$filename] )) { 
-			include_once($filename);
 			$GLOBALS['included_files'][$filename] = TRUE; 
+			include($filename);
 		}
 	}
 

Modified: plog/trunk/class/plugin/globalpluginconfig.class.php
===================================================================
--- plog/trunk/class/plugin/globalpluginconfig.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/plugin/globalpluginconfig.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,6 +1,6 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 	
 	define( "PLUGIN_SETTINGS_USER_CAN_OVERRIDE", 1 );
 	define( "PLUGIN_SETTINGS_USER_CANNOT_OVERRIDE", 2 );

Modified: plog/trunk/class/plugin/pluginmanager.class.php
===================================================================
--- plog/trunk/class/plugin/pluginmanager.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/plugin/pluginmanager.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -287,7 +287,7 @@
          */
         function _loadPluginLocale( $pluginId, $locale )
         {
-            require_once( PLOG_CLASS_PATH . "class/locale/locales.class.php" );
+            lt_include( PLOG_CLASS_PATH . "class/locale/locales.class.php" );
 
             return( Locales::getPluginLocale( $pluginId, $locale ));
         }
@@ -310,7 +310,7 @@
         function getPlugins()
         {
             foreach( $this->_pluginList as $name ) {
-                if( $this->_pluginInstances["$name"] ) {
+                if( array_key_exists( $name, $this->_pluginInstances ) ) {
                     $this->_pluginInstances["$name"]->setBlogInfo( $this->_blogInfo );
                     $this->_pluginInstances["$name"]->setUserInfo( $this->_userInfo );
                     $this->_pluginInstances["$name"]->register();

Modified: plog/trunk/class/security/bayesianfilter.class.php
===================================================================
--- plog/trunk/class/security/bayesianfilter.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/security/bayesianfilter.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,8 +1,8 @@
 <?php
 
     lt_include( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
-	include_once( PLOG_CLASS_PATH."class/net/client.class.php" );
-	include_once( PLOG_CLASS_PATH."class/net/client.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/net/client.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/net/client.class.php" );
 
     define("HIGH_SPAM_PROBABILITY", 1000);
 

Modified: plog/trunk/class/security/nullpipelinefilter.class.php
===================================================================
--- plog/trunk/class/security/nullpipelinefilter.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/security/nullpipelinefilter.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,6 +1,6 @@
 <?php
 
-	require_once( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/security/pipelinefilter.class.php" );
 
     /**
      * \ingroup Security
@@ -23,7 +23,7 @@
          */
         function filter()
         {
-            require_once( PLOG_CLASS_PATH . 'class/security/pipelineresult.class.php' );
+            lt_include( PLOG_CLASS_PATH . 'class/security/pipelineresult.class.php' );
 
         	$result = new PipelineResult();
 

Modified: plog/trunk/class/security/pipeline.class.php
===================================================================
--- plog/trunk/class/security/pipeline.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/security/pipeline.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -115,8 +115,8 @@
          */
         function process()
         {
-            require_once( PLOG_CLASS_PATH . 'class/security/pipelinerequest.class.php' );
-            require_once( PLOG_CLASS_PATH . 'class/security/pipelineresult.class.php' );
+            lt_include( PLOG_CLASS_PATH . 'class/security/pipelinerequest.class.php' );
+            lt_include( PLOG_CLASS_PATH . 'class/security/pipelineresult.class.php' );
             global $_pLogPipelineRegisteredFilters;        
         
             // check if the pipeline is enabled

Modified: plog/trunk/class/summary/action/registeraction.class.php
===================================================================
--- plog/trunk/class/summary/action/registeraction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/summary/action/registeraction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -4,11 +4,11 @@
 lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
 lt_include( PLOG_CLASS_PATH."class/summary/view/summarycachedview.class.php" );
 lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
-include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
-include_once( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
-include_once( PLOG_CLASS_PATH."class/data/validator/passwordvalidator.class.php" );
-include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
-include_once( PLOG_CLASS_PATH."class/data/validator/emailvalidator.class.php" );
+lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+lt_include( PLOG_CLASS_PATH."class/data/validator/usernamevalidator.class.php" );
+lt_include( PLOG_CLASS_PATH."class/data/validator/passwordvalidator.class.php" );
+lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+lt_include( PLOG_CLASS_PATH."class/data/validator/emailvalidator.class.php" );
 
 /**
  * Base action that all register actions should extend

Modified: plog/trunk/class/summary/action/summarydefaultaction.class.php
===================================================================
--- plog/trunk/class/summary/action/summarydefaultaction.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/summary/action/summarydefaultaction.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -3,8 +3,7 @@
 	lt_include( PLOG_CLASS_PATH."class/summary/action/summaryaction.class.php" );
     lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
     lt_include( PLOG_CLASS_PATH."class/summary/dao/summarystatsconstants.class.php" );  
-	include_once( PLOG_CLASS_PATH."class/summary/net/summaryrequestgenerator.class.php" );      
-	include_once( PLOG_CLASS_PATH."class/summary/net/summaryrequestgenerator.class.php" );      
+	lt_include( PLOG_CLASS_PATH."class/summary/net/summaryrequestgenerator.class.php" );      
 
      /**
       * This is the one and only default action. It simply fetches all the most recent

Modified: plog/trunk/class/summary/net/summaryrequestgenerator.class.php
===================================================================
--- plog/trunk/class/summary/net/summaryrequestgenerator.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/summary/net/summaryrequestgenerator.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,6 +1,6 @@
 <?php
 
-    include_once( PLOG_CLASS_PATH."class/net/baserequestgenerator.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/net/baserequestgenerator.class.php" );
 
     /**
      * Very basic request generator for the summary. It is not meant to be used as a 

Modified: plog/trunk/class/summary/view/summarycachedview.class.php
===================================================================
--- plog/trunk/class/summary/view/summarycachedview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/summary/view/summarycachedview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -96,6 +96,7 @@
 			$this->_params->setValue( "locale", $this->_locale);
 			$this->_params->setValue( "rss", new RssParser());
 			$this->_params->setValue( "baseurl", $baseurl);
+			$this->_params->setValue( "serviceName", $config->getValue( "summary_service_name" ));
 
             lt_include( PLOG_CLASS_PATH."class/summary/net/summaryrequestgenerator.class.php" );
             $this->_params->setValue( "url", new SummaryRequestGenerator());
@@ -145,7 +146,6 @@
 			}
 			else {
 				$sendOutput = true;
-				$this->setValue( "serviceName", $config->getValue( "summary_service_name" ));
 			}
 
 			if( $sendOutput ) {

Modified: plog/trunk/class/template/smarty/plugins/function.adminpager.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/function.adminpager.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/template/smarty/plugins/function.adminpager.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -5,7 +5,7 @@
  */
 function smarty_function_adminpager($params, &$smarty)	
 {
-	include_once( PLOG_CLASS_PATH."class/template/smarty/plugins/function.pager.php" );
+	lt_include( PLOG_CLASS_PATH."class/template/smarty/plugins/function.pager.php" );
 	// fetch the parameters
 	if( isset( $params["data"]))
 		$pager = $params["data"];

Modified: plog/trunk/class/template/smarty/plugins/function.pager.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/function.pager.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/template/smarty/plugins/function.pager.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -48,7 +48,7 @@
 			$locale = $smarty->_tpl_vars["locale"];			
 		}
 		else {
-			include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" );
 			$locale =& Locales::getLocale();
 		}
 		$nextText = $locale->tr( "next_post" )."&raquo;";
@@ -64,7 +64,7 @@
 			$locale = $smarty->_tpl_vars["locale"];			
 		}
 		else {
-			include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/locale/locales.class.php" );
 			$locale =& Locales::getLocale();
 		}
 		$prevText = "&laquo;".$locale->tr( "previous_post" );

Modified: plog/trunk/class/template/smarty/plugins/modifier.utf8_truncate.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/modifier.utf8_truncate.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/template/smarty/plugins/modifier.utf8_truncate.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,5 +1,5 @@
 <?php
-include_once(PLOG_CLASS_PATH.'class/data/utf8/utf8_funcs.php');
+lt_include(PLOG_CLASS_PATH.'class/data/utf8/utf8_funcs.php');
 
 /**
  * Smarty truncate modifier plugin

Modified: plog/trunk/class/template/templateservice.class.php
===================================================================
--- plog/trunk/class/template/templateservice.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/template/templateservice.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -241,7 +241,7 @@
 		 */
 		function PluginTemplate( $pluginId, $templateName, $blogInfo = null )
 		{
-            require_once( PLOG_CLASS_PATH . 'class/template/templatesets/templatesetstorage.class.php' );
+            lt_include( PLOG_CLASS_PATH . 'class/template/templatesets/templatesetstorage.class.php' );
             lt_include( PLOG_CLASS_PATH . 'class/template/template.class.php' );
 
 			// define the template file name

Modified: plog/trunk/class/test/helpers/consolereporter.class.php
===================================================================
--- plog/trunk/class/test/helpers/consolereporter.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/helpers/consolereporter.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/test/PHPUnit/TestResult.php" );
-	include_once( PLOG_CLASS_PATH."class/test/PHPUnit/TestListener.php" );	
+	lt_include( PLOG_CLASS_PATH."class/test/PHPUnit/TestResult.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/PHPUnit/TestListener.php" );	
 
 	/**
 	 * \ingroup Test

Modified: plog/trunk/class/test/helpers/uiscriptrunner.class.php
===================================================================
--- plog/trunk/class/test/helpers/uiscriptrunner.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/helpers/uiscriptrunner.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,6 +1,6 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/net/http/httpclient.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/net/http/httpclient.class.php" );
 
 	/**
 	 * \ingroup Test

Modified: plog/trunk/class/test/tests/dao/article_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/article_test.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/tests/dao/article_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -2,6 +2,8 @@
 
 	lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/dao/article.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
 
 	/**
 	 * \ingroup Test
@@ -51,5 +53,36 @@
 				                    "but hasExtendedText did not return false!" );						
 			}
 		}
+		
+		/**
+		 * Test case for mantis issue http://bugs.lifetype.net/view.php?id=1244,
+		 * Articles::setComments() not using the same internal array used by
+		 * Articles::getComments()
+		 */
+		function testSetCommentsAndGetComments()
+		{
+			// create a dummy comment
+			$c = new UserComment( $this->article->getId(), 
+								  $this->article->getBlogId(), 
+								  0, 
+								  "topic", 
+								  "text"
+			     );
+			
+			$cSpam = new UserComment( $this->article->getId(), 
+								  $this->article->getBlogId(), 
+								  0, 
+								  "topic spam", 
+								  "text spam"
+			     );
+			$cSpam->setStatus( COMMENT_STATUS_SPAM );
+			
+			// now calling Article::getComments() after Article::setComments() with the dummy comment above
+			// should not return the same
+			$this->article->setComments( Array( $c ));
+			$this->article->setComments( Array( $cSpam ), COMMENT_STATUS_SPAM );
+			$this->assertEquals( Array( $c ), $this->article->getComments());
+			$this->assertEquals( Array( $cSpam ), $this->article->getComments( COMMENT_STATUS_SPAM ));
+		}
 	}
 ?>
\ No newline at end of file

Modified: plog/trunk/class/test/tests/dao/articlecategories_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/articlecategories_test.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/tests/dao/articlecategories_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,9 +1,9 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
-	include_once( PLOG_CLASS_PATH."class/dao/articlecategory.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/dao/articlecategory.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
 
 	/**
 	 * \ingroup Test

Modified: plog/trunk/class/test/tests/dao/commentscommon_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/commentscommon_test.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/tests/dao/commentscommon_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,19 +1,19 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
-	include_once( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/article.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/commentscommon.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/trackbacks.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/articles.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
-	include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
-	include_once( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/article.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/commentscommon.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/usercomment.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/trackbacks.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/articlecomments.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/template/cachecontrol.class.php" );
 
 	/**
 	 * \ingroup Test

Modified: plog/trunk/class/test/tests/dao/userinfo_test.class.php
===================================================================
--- plog/trunk/class/test/tests/dao/userinfo_test.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/tests/dao/userinfo_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,9 +1,9 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
-	include_once( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );	
 
 	class UserInfo_Test extends LifeTypeTestCase
 	{

Modified: plog/trunk/class/test/tests/data/textfilter_test.class.php
===================================================================
--- plog/trunk/class/test/tests/data/textfilter_test.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/tests/data/textfilter_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -56,13 +56,13 @@
 			
 			// set of input values and their expected output
 			$tests = Array(
-				"test blog" => "test{$sep}blog",
+				"TesT BlOg" => "test{$sep}blog",
 				"test-blog" => "test{$sep}blog",
 				"test_blog" => "test{$sep}blog",
 				"test.blog" => "test.blog",
-				"??test//blog" => "testblog",
+				"??test//blog" => "test{$sep}blog",
 				"==================test blog" => "test{$sep}blog",
-				"this.has.dots_and-hyphens----and   spaces		    " => "this.has.dots{$sep}and{$sep}hyphens{$sep}{$sep}{$sep}{$sep}and{$sep}spaces"
+				"this.has.dots_and-hyphens----and   spaces		    " => "this.has.dots{$sep}and{$sep}hyphens{$sep}and{$sep}spaces"
 			);
 			
 			foreach( $tests as $input => $output ) {
@@ -70,8 +70,36 @@
 				$this->assertEquals( $output, $result, "input was: $input" );
 			}
 		}
-		
+
 		/**
+		 * Verifies the urlize() method
+		 */
+		function testUrlize()
+		{
+			// load the value of the default separator
+			$config =& Config::getConfig();
+            $sep = $config->getValue( "urlize_word_separator", URLIZE_WORD_SEPARATOR_DEFAULT );			
+			
+			// set of input values and their expected output
+			$tests = Array(
+				"teSt blog" => "test{$sep}blog",
+				"test-blog" => "test-blog",
+				"test_blog" => "test_blog",
+				"test.blog" => "test.blog",
+				"??test//blog" => "test{$sep}blog",
+				"==================test blog" => "test{$sep}blog",
+				"this.has.dots_and-hyphens----and   spaces		    " => "this.has.dots_and-hyphens{$sep}and{$sep}spaces",
+				"multiple__underscores______" => "multiple__underscores______"
+			);
+			
+			foreach( $tests as $input => $output ) {
+				$result = $this->tf->urlize( $input );
+				$this->assertEquals( $output, $result, "input was: $input" );
+			}
+		}
+
+        
+		/**
 		 * tests the htmlDecode() method
 		 */
 		function testHtmlDecode()

Copied: plog/trunk/class/test/tests/file/file_test.class.php (from rev 5367, plog/branches/lifetype-1.2/class/test/tests/file/file_test.class.php)
===================================================================
--- plog/trunk/class/test/tests/file/file_test.class.php	                        (rev 0)
+++ plog/trunk/class/test/tests/file/file_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -0,0 +1,31 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/file/file.class.php" );
+
+	/**
+	 * \ingroup Test
+	 *
+	 * Test case for the File class 
+	 */
+	class File_Test extends LifeTypeTestCase
+	{
+		function testBasename()
+		{
+			// test for chinese file name
+			$this->assertEquals("中文檔名.jpg", File::basename( "./gallery/1/中文檔名.jpg"));
+			$this->assertEquals("中文檔名.jpg", File::basename( ".\\gallery\\1\\中文檔名.jpg"));
+			// test for english file name
+			$this->assertEquals("english.jpg", File::basename( "./gallery/1/english.jpg"));
+			$this->assertEquals("english.jpg", File::basename( ".\\gallery\\1\\english.jpg"));
+			$this->assertEquals("english.jpg", File::basename( ".\\gallery\1\english.jpg"));
+			// test for file name with space
+			$this->assertEquals("中文 name.jpg", File::basename("./gallery/1/中文 name.jpg"));
+			$this->assertEquals("中文 name.jpg", File::basename( ".\\gallery\\1\\中文 name.jpg"));
+			// test for multiple slashes
+			$this->assertEquals("中文 name.jpg", File::basename( "/./////gallery/////1/中文 name.jpg"));
+			$this->assertEquals("中文 name.jpg", File::basename( "\.\\\\\gallery\\\\\1\中文 name.jpg"));
+			$this->assertEquals("中文 name.jpg", File::basename( "\.\\\\\gallery\\\\\1\\中文 name.jpg"));
+		}
+	}
+?>
\ No newline at end of file

Modified: plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php
===================================================================
--- plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/tests/ui/articlecategoriesui_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,8 +1,8 @@
 <?php
 
-include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
-include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+lt_include( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
+lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 
 	/**
 	 * \ingroup Test

Modified: plog/trunk/class/test/tests/ui/login_test.class.php
===================================================================
--- plog/trunk/class/test/tests/ui/login_test.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/tests/ui/login_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
 	
 	/**
 	 * \ingroup Test

Modified: plog/trunk/class/test/tests/ui/permissionsui_test.class.php
===================================================================
--- plog/trunk/class/test/tests/ui/permissionsui_test.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/test/tests/ui/permissionsui_test.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,8 +1,8 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
-	include_once( PLOG_CLASS_PATH."class/dao/permissions.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/dao/permissions.class.php" );
 	
 	/**
 	 * \ingroup Test

Modified: plog/trunk/class/view/admin/adminblogsettingsview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminblogsettingsview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/view/admin/adminblogsettingsview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -22,7 +22,7 @@
 			$config =& Config::getConfig();			
 			
             $blogSettings = $blogInfo->getSettings();
-			$this->setValue( "blogAbout", $this->_blogInfo->getAbout());
+			$this->setValue( "blogAbout", $this->_blogInfo->getAbout( false ));
 			$this->setValue( "blogName", $this->_blogInfo->getBlog());
             $this->setValue( "blogLocale", $blogSettings->getValue( "locale" ));
 			$this->setValue( "blogMaxRecentItems", $blogSettings->getValue( "recent_posts_max" ));
@@ -44,7 +44,7 @@
 			$this->setValue( "blogShowInSummary", $this->_blogInfo->getShowInSummary());
 			$this->setValue( "blogSendNotification", $blogSettings->getValue( "default_send_notification" ));
 			$this->setValue( "blogCommentOnlyRegisteredUsers", $blogSettings->getValue( "comment_only_auth_users" ));
-			$this->setValue( "blogNumCommentsPerPage", $blogSettings->getValue( "show_comments_max" ));
+			$this->setValue( "blogNumCommentsPerPage", $blogSettings->getValue( "show_comments_max", $config->getValue( "show_comments_max" )));
 			
             // only do blog_domain stuff if subdomains are enabled
             // Don't waste time here, as well as be less confusing by

Modified: plog/trunk/class/view/admin/admineditpostview.class.php
===================================================================
--- plog/trunk/class/view/admin/admineditpostview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/view/admin/admineditpostview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -50,9 +50,10 @@
 	            
 	            // set information about the post itself into the view
 	            $this->setValue( "postTopic", $this->_article->getTopic());
-                $this->setValue( "postText", $this->_article->getText( false ));
+                $this->setValue( "postText", str_replace('&', '&amp;', $this->_article->getText( false )));
 	            $this->setValue( "postSlug", $this->_article->getPostSlug());
 	            $this->setValue( "postId", $this->_article->getId());
+				$this->setValue( "postUser", $this->_article->getUserId());
 	            if( $this->_article->getCommentsEnabled())
 					$commentsEnabled = true;
 	            else

Modified: plog/trunk/class/view/admin/adminnewpostview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminnewpostview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/view/admin/adminnewpostview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -22,7 +22,7 @@
 
         function render()
         {
-            require_once( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
+            lt_include( PLOG_CLASS_PATH."class/dao/articlestatus.class.php" );
 
             // fetch the categories
             $categories = new ArticleCategories();

Modified: plog/trunk/class/view/admin/adminuserprofileview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminuserprofileview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/view/admin/adminuserprofileview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -18,7 +18,8 @@
 			
 			$this->setValue( "userFullName", $userInfo->getFullName());
 			$this->setValue( "userEmail", $userInfo->getEmail());
-			$this->setValue( "userAbout", $userInfo->getAboutMyself());
+			// we use 'false' here because we don't want to get the formatting
+			$this->setValue( "userAbout", $userInfo->getAboutMyself( false ));
 		}
 		
 		function render()

Modified: plog/trunk/class/view/admin/chooser/adminsimpleresourceslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/chooser/adminsimpleresourceslistview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/view/admin/chooser/adminsimpleresourceslistview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -2,6 +2,7 @@
 
 	lt_include( PLOG_CLASS_PATH."class/view/admin/adminresourceslistview.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/data/stringutils.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
 	
     /**
      * \ingroup View
@@ -27,47 +28,14 @@
             $this->setValue( "baseurl", $config->getValue( "base_url" ));
 
 			// whether resources are enabled or not
-			$this->setValue( "resources_enabled", $config->getValue( "resources_enabled", true ));
-			
-            $destination = $this->getValue( "destination" );			
+			$this->setValue( "resources_enabled", $config->getValue( "resources_enabled", true ));		
+
 			// check if htmlarea is enabled
 			$blogSettings = $this->_blogInfo->getSettings();
-			
             $this->setValue( "htmlarea", $blogSettings->getValue( "htmlarea_enabled", false ));
 
-			// generate the dummy album and resource, with the placeholders
-			$dummyAlbum = new GalleryAlbum( $this->_blogInfo->getId(),   // owner id
-				                            "XXALBUMNAMEXX",  // album name
-				                            "XXALBUMDESCXX",  // description
-				                            0,  // flags
-				                            0, // parent id
-				                            new Timestamp(),  // date 
-				                            Array(),  // properties
-				                            true,   // show blog
-				                            "XXALBUMIDXX" );    // id 
-			$dummyResource = new GalleryResource( $this->_blogInfo->getId(), // owner id
-			                                      -1,  // album id
-			                                      "XXRESOURCEDESCXX",  // description
-			                                      0, // flags
-			                                      GALLERY_RESOURCE_IMAGE, // an image, but it doesn't really matter
-			                                      "XXRESOURCEPATHXX", // file path 
-			                                      "XXRESOURCENAMEXX", // file name
-			                                      Array(), // no metadata
-			                                      new Timestamp(), // date
-			                                      THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE, // it doesn't matter
-			                                      Array(),
-			                                      "XXRESOURCEIDXX" ); // id
-			$dummyResource->setAlbumId( "XXALBUMIDXX" );
-			$dummyResource->setAlbum( $dummyAlbum );
-			// generate 4 urls with the current blog settings
-			$url = $this->_blogInfo->getBlogRequestGenerator();
-			$this->setValue( "albumlink", $url->albumLink( $dummyAlbum ));
-			$this->setValue( "resourcelink", $url->resourceDownloadLink( $dummyResource ));
-			$this->setValue( "resourcepreviewlink", $url->resourcePreviewLink( $dummyResource ));
-			$this->setValue( "resourcemediumpreviewlink", $url->resourceMediumSizePreviewLink( $dummyResource ));
+			$this->_pagerUrl = "?op=resourceList&amp;page=";
 
-			$this->_pagerUrl = "?op=resourceList&amp;mode=$destination&amp;page=";
-
 			parent::render();
 		}
 	}

Modified: plog/trunk/class/view/blogview.class.php
===================================================================
--- plog/trunk/class/view/blogview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/view/blogview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -182,7 +182,7 @@
          */
         function _getArticleCategories()
         {
-            require_once( PLOG_CLASS_PATH.'class/dao/articlecategories.class.php' ); 
+            lt_include( PLOG_CLASS_PATH.'class/dao/articlecategories.class.php' ); 
 
 			$blogSettings = $this->_blogInfo->getSettings();
 			$categoryOrder = $blogSettings->getValue( 'categories_order' );

Modified: plog/trunk/class/view/redirectview.class.php
===================================================================
--- plog/trunk/class/view/redirectview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/view/redirectview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,6 +1,6 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/view/view.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/view.class.php" );
 
     /**
      * This view returns no content, it just sends a

Modified: plog/trunk/class/view/smartyview.class.php
===================================================================
--- plog/trunk/class/view/smartyview.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/view/smartyview.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -129,7 +129,7 @@
 		 */
 		function isTemplateSetExist( $templateSetName )
 		{
-			lt_include( PLOG_CLASS_PATH.'class/template/templatesets/templatesets.class.php' );
+			lt_include( PLOG_CLASS_PATH."class/template/templatesets/templatesets.class.php" );
 			$templateSets = new TemplateSets();
 			if( !$templateSets->isTemplate( $templateSetName ) && !$templateSets->isBlogTemplate( $templateSetName, $this->_blogInfo->getId() ) ) 
 				return false;

Modified: plog/trunk/class/xml/tree/Tree.php
===================================================================
--- plog/trunk/class/xml/tree/Tree.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/class/xml/tree/Tree.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -22,8 +22,8 @@
 // $Id: Tree.php,v 1.35 2004/05/26 14:58:18 davey Exp $
 //
 
-require_once PLOG_CLASS_PATH."class/xml/parser/Parser.php";
-require_once PLOG_CLASS_PATH."class/xml/tree/Node.php";
+lt_include(PLOG_CLASS_PATH."class/xml/parser/Parser.php");
+lt_include(PLOG_CLASS_PATH."class/xml/tree/Node.php");
 
 /**
  * \ingroup XML

Modified: plog/trunk/install/defaultconfig.properties.php
===================================================================
--- plog/trunk/install/defaultconfig.properties.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/install/defaultconfig.properties.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -104,7 +104,7 @@
 $Inserts['summary_show_agreement'] 							= "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('summary_show_agreement', '1', 1);";
 $Inserts['default_time_offset'] 							= "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('default_time_offset', '0', 3);";
 $Inserts['template_cache_enabled'] 							= "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('template_cache_enabled', '1', 1);";
-$Inserts['template_http_cache_enabled'] 					= "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('template_http_cache_enabled', '0', 1);";
+$Inserts['template_http_cache_enabled'] 					= "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('template_http_cache_enabled', '1', 1);";
 $Inserts['template_compile_check'] 							= "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('template_compile_check', '1', 1);";
 $Inserts['update_cached_article_reads'] 					= "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('update_cached_article_reads', '1', 1);";
 $Inserts['allow_php_code_in_templates'] 					= "INSERT INTO {dbprefix}config (config_key, config_value, value_type) VALUES ('allow_php_code_in_templates', '0', 1);";

Modified: plog/trunk/js/tinymce/tiny_mce-plog-resourcelist.js
===================================================================
--- plog/trunk/js/tinymce/tiny_mce-plog-resourcelist.js	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/js/tinymce/tiny_mce-plog-resourcelist.js	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,147 +1,76 @@
-function _generateResourceLink( dest, blogId, type, resourceName, resourceDesc, preview, mimeType, resId, albumName, albumId )
+/*
+ * Insert resource related javascript functions
+ */
+
+function _generateResourceLink( resourceId, resourceLink, targetLink, resourceName, resourceDesc, resourceType, resourceMimeType )
 {
     var htmlCode = '';
 
-	// build the templates and use the default ones if no templates available
-	if( resourceLink == '' )
-		resourceLink = plogBaseUrl+'/resserver.php?blogId='+blogId+'&amp;resource=XXRESOURCENAMEXX';
-	if( resourcePreviewLink == '' )
-		resourcePreviewLink = plogBaseUrl+'/resserver.php?blogId='+blogId+'&amp;resource=XXRESOURCENAMEXX&amp;mode=preview';		
-	if( resourceMediumPreviewLink == '' )
-		resourceMediumPreviewLink = plogBaseUrl+'/resserver.php?blogId='+blogId+'&amp;resource=XXRESOURCENAMEXX&amp;mode=medium';
-		
-	// link template
-	resLink = resourceLink.replace( /XXRESOURCENAMEXX/i, encodeURIComponent(resourceName));
-	resLink = resLink.replace( /XXRESOURCEIDXX/i, resId );
-	resLink = resLink.replace( /XXALBUMNAMEXX/i, albumName );
-	resLink = resLink.replace( /XXALBUMIDXX/i, albumId );	
-	// preview template
-	prevLink = resourcePreviewLink.replace( /XXRESOURCENAMEXX/i, encodeURIComponent(resourceName));
-	prevLink = prevLink.replace( /XXRESOURCEIDXX/i, resId );
-	prevLink = prevLink.replace( /XXALBUMNAMEXX/i, albumName );
-	prevLink = prevLink.replace( /XXALBUMIDXX/i, albumId );
-	// medium preview link
-	medPrevLink = resourceMediumPreviewLink.replace( /XXRESOURCENAMEXX/i, encodeURIComponent(resourceName));
-	medPrevLink = medPrevLink.replace( /XXRESOURCEIDXX/i, resId );
-	medPrevLink = medPrevLink.replace( /XXALBUMNAMEXX/i, albumName );
-	medPrevLink = medPrevLink.replace( /XXALBUMNAMEXX/i, albumName );	
-	medPrevLink = medPrevLink.replace( /XXALBUMIDXX/i, albumId );
-
-    if( type == 1 ) {
-	    // if the resource is an image, check the second parameter to see wether we'd like
-	    // to show the preview with a link to the real size image or the real image
-	    // inlined with the text
-	    if( preview == 1 ) {			 
-		    htmlCode = '<a id="res_' + resId+ '" href="'+resLink+'" type="'+mimeType+'">';
-		    htmlCode += '<img style="margin: 5px;" border="0" alt="'+resourceDesc+'" src="'+prevLink+'" />';
+    if( resourceType == 1 ) {
+		if( targetLink != '' ) {
+		    htmlCode = '<a id="res_'+resourceId+ '" href="'+targetLink+'" type="'+resourceMimeType+'">';
+		    htmlCode += '<img style="margin: 5px;" border="0" alt="'+resourceDesc+'" src="'+resourceLink+'" />';
 		    htmlCode += '</a>';
-	    }
-		else if ( preview == 2 ) {
-		    htmlCode = '<a id="res_' + resId+ '" href="'+resLink+'" type="'+mimeType+'">';
-		    htmlCode += '<img style="margin: 5px;" border="0" alt="'+resourceDesc+'" src="'+medPrevLink+'" />';
-		    htmlCode += '</a>';
-		}
+	    } 
 	    else {
-		    htmlCode = '<img style="margin: 5px;" alt="'+resourceDesc+'" src="'+resLink+'" />';
+		    htmlCode = '<img style="margin: 5px;" alt="'+resourceDesc+'" src="'+resourceLink+'" />';
 	    }
     }
     else {
 	    // if not an image, there is not much we can do
-	    htmlCode = '<a id="res_'+resId+'" title="'+resourceDesc+'" href="'+resLink+'" type="'+mimeType+'">'+resourceName+'</a>';
+	    htmlCode = '<a id="res_'+resourceId+'" title="'+resourceDesc+'" href="'+resourceLink+'" type="'+resourceMimeType+'">'+resourceName+'</a>';
     }
   
     return htmlCode;
 
 }
 
-function addResourceLink( dest, reqFormat, blogId, type, resourceName, resourceDesc, preview, mimeType, resId, albumName, albumId ) 
+function addHtmlareaLink( resourceId, resourceLink, targetLink, resourceName, resourceDesc, resourceType, resourceMimeType ) {
+    var htmlCode = _generateResourceLink( resourceId, resourceLink, targetLink, resourceName, resourceDesc, resourceType, resourceMimeType );
+    
+    tinyMCE.execCommand("mceInsertContent",true,htmlCode);
+	tinyMCE.selectedInstance.repaint();
+
+	// Close the dialog
+	tinyMCE.closeWindow(window);
+};
+
+function addResourceLink( resourceId, resourceLink, targetLink, resourceName, resourceDesc, resourceType, resourceMimeType ) 
 {
     // generate the link
-    var htmlCode = _generateResourceLink( dest, reqFormat, blogId, type, resourceName, resourceDesc, preview, mimeType, resId, albumName, albumId );
-  
-    // and now send the value to the text area where we are typing the post
-    if( dest == 1 ) {
-	    //parent.opener.document.newPost.postText.value += htmlCode;
-	    addText( parent.opener.document.newPost.postText, htmlCode );
-    }
-    else {
-	    //parent.opener.document.newPost.postExtendedText.value += htmlCode;
-	    addText( parent.opener.document.newPost.postExtendedText, htmlCode );
-    }	
+    var htmlCode = _generateResourceLink( resourceId, resourceLink, targetLink, resourceName, resourceDesc, resourceType, resourceMimeType );
 
-    // finally close this window since we don't need it anymore
-    //window.close();
+    addText( parent.opener.document.newPost.postText, htmlCode );
 }
 
-function _generateAlbumLink( dest, blogId, albumId, albumName, albumDesc ) 
+/*
+ * Insert album related javascript functions
+ */
+ 
+function _generateAlbumLink( albumLink, albumName, albumDesc ) 
 {
     var htmlCode = '';
-    
-    // if no other global variable called 'indexPage' is defined, use the
-    // default one
-    if( indexPage == '' )
-        indexPage = 'index.php';
-
-	defaultAlbumLink = plogBaseUrl+'/'+indexPage+'?op=ViewAlbum&amp;blogId='+blogId+'&amp;albumId=XXALBUMIDXX';
-	if( albumLink == '' )
-		albumLink = defaultAlbumLink;
-		
-	albumLink = albumLink.replace(/XXALBUMNAMEXX/i,albumName);
-	albumLink = albumLink.replace(/XXALBUMIDXX/i,albumId);
-
     htmlCode = '<a title="'+albumDesc+'" href="'+albumLink+'">'+albumName+'</a>';
 	
     return htmlCode;      
 }
 
-/**
- * generates and adds a link to an album to the textarea
- *
- * @param dest
- * @param blogId
- * @param albumId
- * @param albumName
- * @param albumDesc
- */
-function addAlbumLink( dest, blogId, albumId, albumName, albumDesc ) 
+function addHtmlareaAlbumLink( albumLink, albumName, albumDesc ) 
 {
-    albumLink = _generateAlbumLink( dest, blogId, albumId, albumName, albumDesc );
+    var htmlCode = _generateAlbumLink( albumLink, albumName, albumDesc );
 
-    // and now send the value to the text area where we are typing the post
-    if( dest == 1 ) {
-        addText( parent.opener.document.newPost.postText, albumLink );
-    }	
-    else {
-		addText( parent.opener.document.newPost.postExtendedText, albumLink );
-    }
-}
-
-// ------
-//
-// htmlarea-related code
-//
-// -------
-//
-
-function addHtmlareaLink(dest, blogId, type, resourceName, resourceDesc, preview, mimeType, resId, albumName, albumId ) {
-    var htmlCode = _generateResourceLink( dest, blogId, type, resourceName, resourceDesc, preview, mimeType, resId, albumName, albumId );
-    
     tinyMCE.execCommand("mceInsertContent",true,htmlCode);
 	tinyMCE.selectedInstance.repaint();
 
 	// Close the dialog
 	tinyMCE.closeWindow(window);
-};
+}
 
-function addHtmlareaAlbumLink( dest, blogId, albumId, albumName, albumDesc ) 
+function addAlbumLink( albumLink, albumName, albumDesc ) 
 {
-    var htmlCode = _generateAlbumLink( dest, blogId, albumId, albumName, albumDesc );
+    var htmlCode = _generateAlbumLink( albumLink, albumName, albumDesc );
 
-    tinyMCE.execCommand("mceInsertContent",true,htmlCode);
-	tinyMCE.selectedInstance.repaint();
-
-	// Close the dialog
-	tinyMCE.closeWindow(window);
+    addText( parent.opener.document.newPost.postText, htmlCode );
 }
 
 function onCancel() {

Modified: plog/trunk/js/tinymce/tiny_mce-plog.js
===================================================================
--- plog/trunk/js/tinymce/tiny_mce-plog.js	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/js/tinymce/tiny_mce-plog.js	2007-04-29 15:28:19 UTC (rev 5368)
@@ -20,7 +20,7 @@
 	theme_advanced_resizing : true,
 	theme_advanced_resize_horizontal : false,
 	convert_fonts_to_spans: true,
-	extended_valid_elements : "a[class|name|id|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
+	extended_valid_elements : "a[class|name|id|href|target|title|onclick|rel],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
 	verify_html : true,
 	valid_elements : ""
 	+"a[accesskey|charset|class|coords|dir<ltr?rtl|href|hreflang|id|lang|name"

Modified: plog/trunk/js/ui/default.js
===================================================================
--- plog/trunk/js/ui/default.js	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/js/ui/default.js	2007-04-29 15:28:19 UTC (rev 5368)
@@ -97,6 +97,52 @@
     }
 }
 
+// In LifeType 1.2 imeplemtation, we don't have the Role object.
+// So, I just defined two kind of permission group here, it can help user configure thier blog user permission easily.
+var permissionSets = new Array();
+permissionSets["basic_blog_permission"] = new Array( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 22, 23, 24, 25, 26, 36, 37 );
+permissionSets["full_blog_permission"] = new Array( 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38 );
+
+function togglePermissionSets(formName, permissionSet)
+{
+	if(permissionSet == "")
+		return;
+
+    f = document.getElementById(formName);
+	i = 0;
+    while (e = f.elements[i])
+    {
+        if (e.type == "checkbox")
+        {
+            if( inArray(permissionSets[permissionSet], e.value) )
+            	e.checked = 1;
+            else
+            	e.checked = 0;
+        }
+        i++;
+    }
+}
+
+// Returns true if the passed value is found in the
+// array. Returns false if it is not.
+function inArray(a, v, c)
+{
+	var i;
+	for (i=0; i < a.length; i++) {
+		// use === to check for Matches. ie., identical (===),
+		if(c){ //performs match even the string is case sensitive
+			if (a[i].toLowerCase() == v.toLowerCase()) {
+				return true;
+			}
+		}else{
+			if (a[i] == v) {
+				return true;
+			}
+		}
+	}
+	return false;
+}
+
 function confirmDlg(l, msg)
 {
     if (confirm(msg))

Modified: plog/trunk/js/ui/plogui.js
===================================================================
--- plog/trunk/js/ui/plogui.js	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/js/ui/plogui.js	2007-04-29 15:28:19 UTC (rev 5368)
@@ -46,6 +46,19 @@
 			document.getElementById("postsList").submit();
 		}	
 	}
+}
+
+function addArticleCategoryOption(originalRequest)
+{
+	//put returned XML in the textarea
+	var xmldoc = originalRequest.responseXML;
+	var success = xmldoc.getElementsByTagName('success')[0].firstChild.nodeValue;
+	var message = xmldoc.getElementsByTagName('message')[0].firstChild.nodeValue;
+	if (success=='0') {
+		window.alert(message);
+		$( 'newArticleCategory' ).value = '';
+		$( 'addArticleCategory' ).disabled = 0;
+	}
 	else {
 		document.getElementById("postsList").op.value = op;
 		document.getElementById("postsList").submit();

Modified: plog/trunk/locale/admin/locale_ca_ES.php
===================================================================
--- plog/trunk/locale/admin/locale_ca_ES.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_ca_ES.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -151,7 +151,6 @@
 // edit post page
 $messages['update'] = 'Actualitza';
 $messages['editPost'] = 'Edita article';
-$messages["error_fetching_post"] = "S'ha produït un error en obtenir l'article.";
 $messages['post_updated_ok'] = 'L\'article "%s" ha actualitzat correctament';
 $messages['error_updating_post'] = 'S\'ha produït un error en actualitzar l\'article';
 $messages['notification_added'] = 'Se t\'enviarà una notificació quan s\'hi afegeixin comentaris o retroenllaços';
@@ -861,7 +860,6 @@
 $messages['trackbacks_updated_ok'] = '%s retroenllaços actualitzats correctament';
 $messages['trackback_updated_ok'] = 'Retroenllaç modificat correctament';
 $messages['error_trackback_status'] = 'Selecciona un estat vàlid';
-$messages['error_incorrect_user'] = 'L\'usuari no és vàlid';
 $messages['select'] = 'Selecciona';
 $messages['remove_selected'] = 'Esborra la selecció';
 
@@ -1174,4 +1172,18 @@
 $messages['eror_updating_user2'] = 'S\'ha produït un error actualitzant l\'usuari amb identificador "%s"';
 
 $messages['error_select_status'] = 'Esculli un estat vàlid';
+$messages['error_invalid_blog_name'] = 'El nom escollit per al blog no és vàlid';
+
+$messages['help_resources_naming_rule'] = 'Nom amb el que es guardaran els fitxers afegits pels usuaris. Quan \'Nom original\' està sel·leccionat, es guardarà el fitxer amb el seu nom original. Quan \'Nom del fitxer codificat\' està sel·leccionat, es canviarà el nom del fitxer d\'acord a la regla [BlogId]-[FitxerId].[Ext]. Sel·leccioni \'Nom de fitxer codificat\' si està executant LifeType en un servidor Windows y el joc de caràcters és multi-byte. Si no està segur, possiblement no necessiti fer servir aquesta opció y hauria de deixar-ho amb el valor per defecte [Valor per defecte = Nom original]';
+$messages['original_file_name'] = 'Nom original';
+$messages['encoded_file_name'] = 'Nom del fitxer codificat';
+
+$messages['quick_permission_selection'] = 'Selecció ràpida';
+$messages['basic_blog_permission'] = 'Permet a l\'usuario afegir, actualitzar y esborrar articles, enllaços y fitxers';
+$messages['full_blog_permission'] = 'Permet a l\'usuari accedir al bloc com si fos el propietari.';
+
+$messages['error_template_exist'] = 'Hi ha hagut un error afegint la nova plantilla, ja hi ha una plantilla anomenada "%s".';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/admin/locale_de_DE.php
===================================================================
--- plog/trunk/locale/admin/locale_de_DE.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_de_DE.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -130,7 +130,7 @@
 $messages['post_added_ok'] = 'Der Artikel wurde erfolgreich hinzugef&uuml;gt.';
 $messages['send_notifications_ok'] = 'Sie werden bei jedem neuen Kommentar oder Trackback benachrichtigt.';
 $messages['bookmarklet'] = 'Bookmarklet';
-$messages['bookmarklet_help'] = 'F&uuml;gen Sie unten stehenden Link zu Ihren Lesezeichen hinzu, um Inhalte von anderen Seiten aus jederzeit in Ihrem Blog zu ver&ouml;ffentlichen.';
+$messages['bookmarklet_help'] = 'F&uuml;gen Sie unten stehenden Link zu Ihren Lesezeichen hinzu, um Inhalte von anderen Seiten jederzeit in Ihrem Blog zu ver&ouml;ffentlichen.';
 $messages['blogit_to_lifetype'] = 'Blog dar&uuml;ber in LifeType!';
 $messages['original_post'] = '(Original Post)';
 
@@ -162,7 +162,6 @@
 // edit post page
 $messages['update'] = 'aktualisieren';
 $messages['editPost'] = 'Artikel bearbeiten';
-$messages['error_fetching_post'] = 'Beim &Ouml;ffnen des Artikels ist ein Fehler aufgetreten.';
 $messages['post_updated_ok'] = 'Der Artikel "%s" wurde erfolgreich aktualisiert.';
 $messages['error_updating_post'] = 'Beim Aktualisieren des Artikels ist ein Fehler aufgetreten.';
 $messages['notification_added'] = 'Sie werden bei neuen Kommentaren oder Trackbacks benachrichtigt.';
@@ -393,8 +392,8 @@
 $messages['use_read_more_help'] = 'Wenn diese Funktion gew&auml;hlt wird, wird nur der Text, der im Text-Feld eingegeben wurde, angezeigt. Um den Text aus dem Feld Erweiteter Text anzeigen zu k&ouml;nnen, wird jedem Artikel ein "weiter..." Link hinzugef&uuml;gt.';
 $messages['enable_wysiwyg'] = 'WYSIWYG Editor aktivieren.';
 $messages['enable_wysiwyg_help'] = 'Erm&ouml;glicht das Bearbeiten der Artikel mit Hilfe eines HTML-Editors. Hierzu ist mindestens Internet Explorer 5.5 oder Mozilla 1.3 erforderlich.';
-$messages['enable_comments'] = 'Kommentare standardm&auml;&szlig;ig erlauben.';
-$messages['enable_comments_help'] = 'Erlaubt das Kommentieren von Artikeln global. Wenn diese Funktion aktiviert ist,  k&ouml;nnen Sie trotzdem f&uuml;r einzelne Artikel Kommentare verbieten.';
+$messages['enable_comments'] = 'Kommentare erlauben.';
+$messages['enable_comments_help'] = 'Erlaubt oder verbietet das Kommentieren f&uuml;r alle Artikel dieses Blogs.';
 $messages['show_future_posts'] = 'Zuk&uuml;nftige Artikel im Kalender anzeigen.';
 $messages['show_future_posts_help'] = 'W&auml;hlen Sie, ob Artikel mit in der Zukunft liegendem Ver&ouml;ffentlichungsdatum im Kalender angezeigt und so f&uuml;r jeden Besucher sichtbar sein sollen.';
 $messages['comments_order'] = 'Reihenfolge der Kommentare';
@@ -586,7 +585,7 @@
 $messages['help_default_locale'] = 'Standard Spracheinstellung f&uuml;r neue Blogs [Standard = en_UK]';
 $messages['help_default_blog_id'] = 'Standard Blog, das angezeigt wird, wenn kein anderes festgelegt ist [Standard = 1]';
 $messages['help_default_time_offset'] = 'Standard Zeitabgleich f&uuml;r neue Blogs [Standard = 0]';
-$messages['help_html_allowed_tags_in_comments'] = 'Leerzeichen-getrennte Liste der in Kommentaren erlaubten HTML-Tags [Standard = <a><i><br><br/><b>]';
+$messages['help_html_allowed_tags_in_comments'] = 'Leerzeichen-getrennte Liste der in Kommentaren erlaubten HTML-Tags [Standard = &lt;a&gt;&lt;i&gt;&lt;br&gt;&lt;br/&gt;&lt;b&gt;]';
 $messages['help_referer_tracker_enabled'] = 'Wenn diese Funktion aktiviert ist, werden die Referrer (verweisenden Seiten) in der Datenbank gespeichert. Deaktivieren Sie diese Funktion, wenn Sie die Performance der Blogs verbessern m&ouml;chten [Standard = Ja]';
 $messages['help_show_more_enabled'] = '"weiter..."-Link f&uuml;r neue Blogs freigeben [Standard = Ja]';
 $messages['help_update_article_reads'] = 'Aktivieren oder deaktivieren Sie die automatische Aktualisierung des Z&auml;hlers f&uuml;r die H&auml;ufigkeit des Zugriffs auf einzelne Artikel. Deaktivieren Sie diese Funktion, wenn Sie die Performance der Blogs verbessern m&ouml;chten. [Standard = Ja]';
@@ -616,7 +615,7 @@
 $messages['help_template_compile_check'] = 'Aktivieren Sie diese Funktion, um Dateien durch Smarty automatisch auf aktuellere Versionen pr&uuml;fen zu lassen. Deaktivieren Sie diese Funktion, um die Perfomance zu steigern [Standard = Ja]';
 $messages['help_template_cache_enabled'] = 'Aktivieren des Template-Cache. Wenn aktiviert, wird, falls m&ouml;glich,  eine zwischengespeicherte Version von Seiten benutzt. Dadurch m&uuml;ssen weniger Daten aus der Datenbank abgerufen und Templates seltener neu gerendert werden. [Standard = Ja]';
 $messages['help_template_cache_lifetime'] = 'Verfallszeit des Cache in Sekunden. Setzen Sie den Wert auf -1, um den Cache nie verfallen zu lassen. Wenn Sie den Wert auf 0 setzen, wird der Cache deaktiviert. Setzen Sie hierzu allerdings besser "Aktivieren des Template-Cache" auf "Nein". [Standard = -1]';
-$messages['help_template_http_cache_enabled'] = 'Unterst&uuml;tzung f&uuml;r HTTP-Request aktivieren. Wenn aktiviert, f&uuml;gt LifeType dem HTTP-Header "If-Modified-Since"-Informationen zu. So mu&szlig; nur unbedingt erforderlicher Inhalt gesendet werden. Benutzen Sie diese Einstellung, um Bandbreite zu sparen. [Standard = Nein]';
+$messages['help_template_http_cache_enabled'] = 'Unterst&uuml;tzung f&uuml;r HTTP-Request aktivieren. Wenn aktiviert, f&uuml;gt LifeType dem HTTP-Header "If-Modified-Since"-Informationen zu. So mu&szlig; nur unbedingt erforderlicher Inhalt gesendet werden. Benutzen Sie diese Einstellung, um Bandbreite zu sparen. [Standard = Ja]';
 $messages['help_allow_php_code_in_templates'] = 'Nativen PHP-Code in Smarty-Templates innerhalb von {php}...{/php} Bl&ouml;cken erlauben [Standard = Nein]';
 // urls
 $messages['help_request_format_mode'] = 'W&auml;hlen Sie ein URL-Format. Wenn Sie benutzerdefinierte URLs verwenden m&ouml;chten, stellen Sie sicher, dass die folgenden Einstellungen ebenfalls konfiguriert sind. [Standard = einfach]';
@@ -674,7 +673,7 @@
 $messages['throw_away_spam_comments'] = 'l&ouml;schen (nicht speichern)';
 // resources
 $messages['help_resources_enabled'] = 'Ressourcenveraltung erm&ouml;glichen [Standard = Ja]';
-$messages['help_resources_folder'] = 'Absoluter oder relativer Pfad zum Verzeichnis, in das Ressource-Dateien (Bilder, Videos etc.) gespeichert werden. [Standard = ./gallery]';
+$messages['help_resources_folder'] = 'Relativer Pfad zum Verzeichnis, in das Ressource-Dateien (Bilder, Videos etc.) gespeichert werden. [Standard = ./gallery]';
 $messages['help_thumbnail_method'] = 'Methode, um Vorschaubilder (Thumbnails) zu erstellen. Falls Sie PHP verwenden, ist GD-Support erforderlich [Standard = PHP]';
 $messages['help_path_to_convert'] = 'Pfad zum "convert"-Tool von ImageMagick. Erforderlich, falls die Vorschaubilder mit ImageMagick erstellt werden sollen [Standard = /usr/bin/convert]';
 $messages['help_thumbnail_format'] = 'Format, in dem Thumbnails gespeichert werden sollen. [Standard = wie Original]';
@@ -881,7 +880,6 @@
 $messages['trackbacks_updated_ok'] = '%s Trackbacks erfolgreich aktualisiert.';
 $messages['trackback_updated_ok'] = 'Trackback erfolgreich aktualisiert.';
 $messages['error_trackback_status'] = 'Bitte w&auml;hlen Sie einen g&uuml;ltigen Status.';
-$messages['error_incorrect_user'] = 'Benutzer ist ung&uuml;ltig';
 $messages['select'] = 'Auswahl';
 $messages['remove_selected'] = 'Entferne Auswahl';
 
@@ -900,7 +898,7 @@
 $messages['blog_categories'] = 'Blogkategorien';
 $messages['global_article_categories'] = 'Globale Artikelkategorien';
 
-$messages['help_force_posturl_unique'] = 'Nur eindeutige Artikelbezeichnungen f�r die URL erstellen (Slug). Diese Funktion ist nur notwendig, wenn Sie das Datum aus den Benutzerdefinierten URLs entfernen. Also beispielsweise "http://domain.com/blog/mein-artikel". [ Standard = nein ]';
+$messages['help_force_posturl_unique'] = 'Nur eindeutige Artikelbezeichnungen f&uuml;r die URL erstellen (Slug). Diese Funktion ist nur notwendig, wenn Sie das Datum aus den Benutzerdefinierten URLs entfernen. Also beispielsweise "http://domain.com/blog/mein-artikel". [ Standard = nein ]';
 
 $messages['default_send_notification'] = 'Benachrichtigungsfunktion Standardeinstellung';
 
@@ -1046,7 +1044,7 @@
 $messages['update_template_desc'] = 'Benutzer darf Templates &auml;ndern und l&ouml;schen';
 $messages['update_user_desc'] = 'Benutzer darf Benutzer &auml;ndern und l&ouml;schen';
 $messages['view_blog_categories'] = 'Benutzer darf Kategorien ansehen';
-$messages['view_global_article_categories_desc'] = 'Benutzer darf glboale Kategorien ansehen';
+$messages['view_global_article_categories_desc'] = 'Benutzer darf globale Kategorien ansehen';
 $messages['view_global_settings_desc'] = 'Benutzer darf globale Seiteneinstellungen ansehen';
 $messages['view_locales_desc'] = 'Benutzer darf Sprachen ansehen';
 $messages['view_permissions_desc'] = 'Benutzer darf Berechtigungen ansehen';
@@ -1149,15 +1147,30 @@
 $messages['error_resources_disabled'] = 'Sorry, das Hochladen neuer Ressourcen wurde deaktiviert.';
 $messages['help_login_admin_panel'] = 'Klicken Sie auf den Name des Blogs, um zu den Administrationsseiten zu gelangen.';
 
-$messages['blog_updated_ok'] = 'Blog "%s" was successfully updated';
-$messages['blogs_updated_ok'] = '%s blogs were successfully updated';
-$messages['error_updating_blog2'] = 'There was an error updating the blog whose identifier is "%s"';
-$messages['error_updating_blog'] = 'There was an error updating blog "%s"';
+$messages['blog_updated_ok'] = 'Blog "%s" wurde erfolgreich aktualisiert.';
+$messages['blogs_updated_ok'] = '%s Blogs wurden erfolgreich aktualisiert.';
+$messages['error_updating_blog2'] = 'Fehler beim Aktualisieren des Blogs mit der ID "%s".';
+$messages['error_updating_blog'] = 'Fehler beim Aktualisieren des Blogs "%s".';
 
-$messages['error_updating_user'] = 'There was an error updating user "%s".';
-$messages['user_updated_ok'] = 'User "%s" was successfully updated.';
-$messages['users_updated_ok'] = '%s users were successfully updated';
-$messages['eror_updating_user2'] = 'There was an error updating user with identifier "%s"';
+$messages['error_updating_user'] = 'Fehler beim Aktualisieren des Benutzers "%s".';
+$messages['user_updated_ok'] = 'Benutzer "%s" wurde erfolgreich aktualisiert.';
+$messages['users_updated_ok'] = '%s Benutzer wurden erfolgreich aktualisiert.';
+$messages['eror_updating_user2'] = 'Fehler beim Aktualisieren des Benutzers mit der ID "%s".';
 
-$messages['error_select_status'] = 'Please select a valid status';
-?>
\ No newline at end of file
+$messages['error_select_status'] = 'Bitte w&auml;hlen Sie einen g&uuml;ltigen Status.';
+$messages['error_invalid_blog_name'] = 'Sorry, der Blog Name ist ung&uuml;ltig.';
+
+$messages['help_resources_naming_rule'] = 'Benennungsregel f&uuml;r Dateien. Die Einstellung \'Original Dateiname\' beh&auml;lt den original Dateinamen, w&auml;hrend \'Codierter Dateiname\' die Datei gem&auml;ss folgendem Muster umbenennen wird: [BlogId]-[ResourceId].[Ext].<br/>Verwenden Sie \'Codierter Dateiname\' wenn Sie LifeType in einer Multy-Byte Windows Server Umgebung betreiben.<br/><strong>&Auml;ndern Sie die Einstellung nicht, nachdem Sie bereits Dateien in Ihr Blog hochgeladen haben! Alte Dateien sind sonst nicht mehr via LifeType verf&uuml;gbar.</strong> [Standard = Original Dateiname]';
+
+$messages['original_file_name'] = 'Original Dateiname';
+$messages['encoded_file_name'] = 'Codierter Dateiname';
+
+$messages['quick_permission_selection'] = 'Berechtigungsmuster w&auml;hlen';
+$messages['basic_blog_permission'] = 'Dem Benutzer das Hinzuf&uuml;gen, &Auml;ndern und L&ouml;schen von Artikeln, Links und Ressourcen erlauben.';
+$messages['full_blog_permission'] = 'Dem Benutzer die selben Berechtigungen wie dem Blog Besitzer geben.';
+
+$messages['error_template_exist'] = 'Fehler beim Hochladen des Templates. Template "%s" existiert bereits.';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
+?>

Modified: plog/trunk/locale/admin/locale_en_UK.php
===================================================================
--- plog/trunk/locale/admin/locale_en_UK.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_en_UK.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -10,7 +10,7 @@
 $messages['error_incorrect_username_or_password'] = 'Sorry, Incorrect username or password.';
 $messages['error_dont_belong_to_any_blog'] = 'Sorry, you do not belong to any blog yet.';
 $messages['logout_message'] = 'You have been successfully logged out.';
-$messages['logout_message_2'] = 'Click <a href="%1$s">here</a> to go to %2$s</a>.';
+$messages['logout_message_2'] = 'Click <a href="%1$s">here</a> to go to %2$s.';
 $messages['error_access_forbidden'] = 'Access is forbidden. You must authenticate first here.';
 $messages['username'] = 'Username';
 $messages['password'] = 'Password';
@@ -162,7 +162,6 @@
 // edit post page
 $messages['update'] = 'Update';
 $messages['editPost'] = 'Edit Post';
-$messages['error_fetching_post'] = 'There was an error fetching the article';
 $messages['post_updated_ok'] = 'Post "%s" updated successfully.';
 $messages['error_updating_post'] = 'There was an error updating the post';
 $messages['notification_added'] = 'You will receive notifications of new comments or trackbacks';
@@ -235,7 +234,6 @@
 
 // update category
 $messages['error_updating_article_category'] = 'There was an error updating the article category';
-$messages['error_fetching_category'] = 'There was an error fetching the category';
 $messages['article_category_updated_ok'] = 'Category "%s" was updated successfully';
 
 // links
@@ -394,8 +392,8 @@
 $messages['use_read_more_help'] = 'If enabled, only the text typed in the "Text" textbox will be shown in the main page. In order to display the "Extended text", a "more..." link will be added to each post.';
 $messages['enable_wysiwyg'] = 'Enable the visual editor of posts';
 $messages['enable_wysiwyg_help'] = 'Enables a more powerful, visual editor of HTML mark up. The editor only works in Internet Explorer 5.5 or higher or Mozilla 1.3 or higher.';
-$messages['enable_comments'] = 'Enable comments by default';
-$messages['enable_comments_help'] = 'Enable comments for all posts by default. Comments can still be enabled/disabled for certain posts when creating new posts or editing old ones.';
+$messages['enable_comments'] = 'Enable comments';
+$messages['enable_comments_help'] = 'Enable comments for all posts.';
 $messages['show_future_posts'] = 'Show future posts in the calendar';
 $messages['show_future_posts_help'] = 'Whether posts which have a date in the future should appear in the calendar and visible to users.';
 $messages['comments_order'] = 'Comments order';
@@ -433,7 +431,7 @@
 $messages['bio'] = 'Your bio';
 $messages['bio_help'] = 'A longer description of yourself can be provided here.';
 $messages['picture'] = 'Picture';
-$messages['user_picture_help'] = 'Please select a picture form the ones uploaded to this blog as your personal picture.';
+$messages['user_picture_help'] = 'Please select a picture from the ones uploaded to this blog as your personal picture.';
 $messages['error_invalid_password'] = 'The password is not correct. Please make sure that it is not too short';
 $messages['error_passwords_dont_match'] = 'Sorry, passwords do not match';
 $messages['error_updating_user_settings'] = 'There was an error updating your user settings. Please check the data and try again';
@@ -577,7 +575,7 @@
 $messages['help_beautify_comments_text'] = 'If enabled, comments posted by users will be formatted by adding paragraphs and auto-linking all URLs. [Default = Yes]';
 $messages['help_temp_folder'] = 'Folder that LifeType can use to write its temporary data such as compiled templates, etc. Use a folder outside the web server tree for increased security. [Default = ./tmp]';
 $messages['help_base_url'] = 'Base URL where this blog is installed.';
-$messages['help_subdomains_enabled'] = 'Enable or disable subdomains. Please see the documentation for more information regarding subdomains. [Default = No]';
+$messages['help_subdomains_enabled'] = 'Enable subdomains. Please see the documentation for more information regarding subdomains. [Default = No]';
 $messages['help_include_blog_id_in_url'] = 'Meaningful only when subdomains are enabled and "normal" URLs are enabled, forces internally-generated URLs not to have the "blogId" parameter. Do not change unless you know what you are doing. [Default = Yes]';
 $messages['help_script_name'] = 'Set this if you need to rename index.php to something else. [Default = index.php]';
 $messages['help_show_posts_max'] = 'Maximum number of posts shown in the main page. Only meaningful for new blogs. [Default = 15]';
@@ -588,16 +586,16 @@
 $messages['help_default_blog_id'] = 'Default blog that will be shown if no other is specified. [Default = 1]';
 $messages['help_default_time_offset'] = 'Default time offset for new blogs. [Default = 0]';
 $messages['help_html_allowed_tags_in_comments'] = 'Space-separated list of the HTML tags that are allowed in comments. [Default = &lt;a&gt;&lt;i&gt;&lt;br&gt;&lt;br/&gt;&lt;b&gt;]';
-$messages['help_referer_tracker_enabled'] = 'Enable or disable the feature to save referrers to the database. Set to disabled for higher performance. [Default = Yes]';
-$messages['help_show_more_enabled'] = 'Enable or disable the "more..." feature by default for new blogs. [Default = Yes]';
-$messages['help_update_article_reads'] = 'Enable or disable the update of the counter of times that an article has been read is updated or not. Set to disabled for higher performance. [Default = Yes]';
-$messages['help_update_cached_article_reads'] = 'Enable or disable the update of the counter of times that an article has been read is updated, even when caching has been turned on. [Default = Yes]';
-$messages['help_xmlrpc_ping_enabled'] = 'Enable or disable sending XMLRPC pings to sites that support this feature. [Default = Yes]';
-$messages['help_send_xmlrpc_pings_enabled_by_default'] = 'Enable or disable by default this feature when posting or updating an article. [Default = Yes]';
+$messages['help_referer_tracker_enabled'] = 'Enable the feature to save referrers to the database. Set to "No" for higher performance. [Default = Yes]';
+$messages['help_show_more_enabled'] = 'Enable the "more..." feature by default for new blogs. [Default = Yes]';
+$messages['help_update_article_reads'] = 'Enable the update of the counter of times that an article has been read is updated or not. Set to "No" for higher performance. [Default = Yes]';
+$messages['help_update_cached_article_reads'] = 'Enable the update of the counter of times that an article has been read is updated, even when caching has been turned on. [Default = Yes]';
+$messages['help_xmlrpc_ping_enabled'] = 'Enable sending XMLRPC pings to sites that support this feature. [Default = Yes]';
+$messages['help_send_xmlrpc_pings_enabled_by_default'] = 'Enable sending XMLRPC pings by default when posting or updating an article. [Default = Yes]';
 $messages['help_xmlrpc_ping_hosts'] = 'URL pointing to the XMLRPC interface of sites that support the XMLRPC ping specification. Put each URL in one new line. [Default = http://rpc.weblogs.com/RPC2]';
-$messages['help_trackback_server_enabled'] = 'Enable or disable the feature to receive incoming trackbacks. [Default = Yes]';
-$messages['help_htmlarea_enabled'] = 'Enable or disable the WYSIWYG post editor by default in new blogs. [Default = Yes]';
-$messages['help_plugin_manager_enabled'] = 'Enable or disable plugins. [Default = Yes]';
+$messages['help_trackback_server_enabled'] = 'Enable incoming trackbacks. [Default = Yes]';
+$messages['help_htmlarea_enabled'] = 'Enable the WYSIWYG post editor by default in new blogs. [Default = Yes]';
+$messages['help_plugin_manager_enabled'] = 'Enable plugins. [Default = Yes]';
 $messages['help_minimum_password_length'] = 'Minimum length for passwords. [Default = 4]';
 $messages['help_xhtml_converter_enabled'] = 'If enabled, LifeType will try to convert all HTML code into proper XHTML code. [Default = Yes]';
 $messages['help_xhtml_converter_aggressive_mode_enabled'] = 'If enabled, LifeType will try even harder to generate XHTML out of HTML code, but it will be more prone to errors. [Default = No]';
@@ -617,7 +615,7 @@
 $messages['help_template_compile_check'] = 'If enabled, Smarty will check every time if template files have changed and if so, use the new version. Set this to disabled for higher performance. [Default = Yes]';
 $messages['help_template_cache_enabled'] = 'Enable the template cache. If enabled, the cached version of a page will be used whenever possible. No data will need to be fetched from the database and templates will not need to be recompiled. [Default = Yes]';
 $messages['help_template_cache_lifetime'] = 'Lifetime in seconds of the cache. Set to -1 to force the cache to never expire. If set to 0, the cache will be disabled but it is recommended to set template_cache_enabled to "No" in order to disable the cache. [Default = -1]';
-$messages['help_template_http_cache_enabled'] = 'Enable support for HTTP conditional requests. If enabled, LifeType will take the "If-Modified-Since" HTTP header into account and send only content if strictly needed. Enable this to save bandwidth [Default = No]';
+$messages['help_template_http_cache_enabled'] = 'Enable support for HTTP conditional requests. If enabled, LifeType will take the "If-Modified-Since" HTTP header into account and send only content if strictly needed. Enable this to save bandwidth [Default = Yes]';
 $messages['help_allow_php_code_in_templates'] = 'Allows to embed native PHP code in Smarty templates inside {php}...{/php} blocks. [Default = No]';
 // urls
 $messages['help_request_format_mode'] = 'Select one of the available URL format. If using custom URLs, make sure to configure the settings below. [Default = Plain]';
@@ -638,7 +636,7 @@
 $messages['help_resource_download_link_format'] = 'Format for links to files when using custom URLs. [Default = /blog/{blogname}/resource/{albumname}/download/{resourcename}$]';
 // email
 $messages['help_check_email_address_validity'] = 'When checking email addresses, perform some basic checks to see whether an MX record exists in the given domain and if so, if the email address is actually a valid mailbox. [Default = No]';
-$messages['help_email_service_enabled'] = 'Enable or disable sending out emails [Default = Yes]';
+$messages['help_email_service_enabled'] = 'Enable outgoing emails [Default = Yes]';
 $messages['help_post_notification_source_address'] = 'Email address that will appear in the "From:" field when sending emails from LifeType. [Default = noreply at your.host.com]';
 $messages['help_email_service_type'] = 'Which system to use in order to send emails. [Default = PHP]';
 $messages['help_smtp_host'] = 'If using SMTP as the email sending system, set this to the SMTP server that will be used to send out the messages. [Default = (empty)]';
@@ -657,7 +655,7 @@
 $messages['help_maximum_file_upload_size'] = 'Maximum file size allowed in bytes. This limit will never be higher than PHP\'s own limit. [Default = 2000000]';
 $messages['help_upload_forbidden_files'] = 'Space-separated list of file types not allowed to be uploaded. Usage of \'*\' and \'?\' is allowed. [Default = *.php *.php3 *.php4 *.phtml]';
 // interfaces
-$messages['help_xmlrpc_api_enabled'] = 'Enable or disable access via XMLRPC to blogs. [Default = Yes]';
+$messages['help_xmlrpc_api_enabled'] = 'Enable XMLRPC access to blogs. [Default = Yes]';
 $messages['help_rdf_enabled'] = 'Enable the syndication of contents via Atom or RSS. [Default = Yes]';
 $messages['help_default_rss_profile'] = 'Default version of RSS or Atom used to syndicate contents unless otherwise specified. [Default = RSS 1.0]';
 // security
@@ -674,8 +672,8 @@
 $messages['keep_spam_comments'] = 'Keep in the database marked as "Spam"';
 $messages['throw_away_spam_comments'] = 'Throw them away (do not save them)';
 // resources
-$messages['help_resources_enabled'] = 'Enable or disable resources. [Default = Yes]';
-$messages['help_resources_folder'] = 'Absolute or relative path to the folder where resource files (pictures, videos etc.) will be kept. [Default = ./gallery]';
+$messages['help_resources_enabled'] = 'Enable resources. [Default = Yes]';
+$messages['help_resources_folder'] = 'Relative path to the folder where resource files (pictures, videos etc.) will be kept. [Default = ./gallery]';
 $messages['help_thumbnail_method'] = 'Method used to generate thumbnails. If using PHP, support for GD is required. [Default = PHP]';
 $messages['help_path_to_convert'] = 'Path to the "convert" tool from the ImageMagick package. Mandatory if the thumbnail method is "ImageMagick". [Default = /usr/bin/convert]';
 $messages['help_thumbnail_format'] = 'Format in which thumbnails are saved. [Default = Same as image]';
@@ -882,7 +880,6 @@
 $messages['trackbacks_updated_ok'] = '%s trackbacks updated successfully';
 $messages['trackback_updated_ok'] = 'Trackback updated successfully';
 $messages['error_trackback_status'] = 'Please select a valid status';
-$messages['error_incorrect_user'] = 'User is not valid';
 $messages['select'] = 'Select';
 $messages['remove_selected'] = 'Remove Selected';
 
@@ -904,7 +901,7 @@
 $messages['default_send_notification'] = 'Default Send Notification';
 
 $messages['enable_pull_down_menu'] = 'Pull Down Menu';
-$messages['enable_pull_down_menu_help'] = 'Enable or disable the pull down menu.';
+$messages['enable_pull_down_menu_help'] = 'Enable the pull down menu.';
 
 $messages['change_album'] = 'Change Album';
 
@@ -985,10 +982,10 @@
 $messages['permissions_deleted_ok'] = '%s permissions successfully deleted';
 $messages['error_deleting_permission2'] = 'There was an error deleting permission with identifier "%s"';
 
-$messages['help_hard_show_posts_max'] = 'Maximum upper limit for articles shown in blog pages. If users set a custom value over this limit, it will be ignored and the value speciefied here will be used. [ Default = 50 ]';
+$messages['help_hard_show_posts_max'] = 'Maximum upper limit for articles shown in blog pages. If users set a custom value over this limit, it will be ignored and the value specified here will be used. [ Default = 50 ]';
 $messages['help_hard_recent_posts_max'] = 'Maximum upper limit for recent articles shown in blog pages. If users set a custom value over this limit, it will be ignored and the value specified here will be used [ Default = 25 ]';
 
-$messages['error_permission_required'] = 'You haven\'t got enough permissions to perform the requested action';
+$messages['error_permission_required'] = 'You don\'t have enough permissions to perform the requested action';
 $messages['user_permissions_updated_ok'] = 'User permissions updated successfully';
 
 // blog permissions
@@ -1094,12 +1091,12 @@
 $messages['cleanup_temp'] = 'Purge temporary folder';
 
 $messages['comment_only_auth_users'] = 'Only authenticated users can comment';
-$messages['comment_only_auth_users_help'] = 'Only those users who have a valid user name and password and have logged in will be allowed to leave comments';
+$messages['comment_only_auth_users_help'] = 'Only those users who have logged in with a valid user name and password will be allowed to write comments';
 $messages['show_comments_max'] = 'Comments per page';
 $messages['show_comments_max_help'] = 'Maximum number of comments per page [ Default = 20 ]';
 $messages['hard_show_comments_max_help'] = 'Hard limit for the number of comments per page [ Default = 50 ]';
 
-$messages['error_resource_not_whitelisted_extension'] = 'The type of the file is not one of the allowed ones.';
+$messages['error_resource_not_whitelisted_extension'] = 'This file is not one of the allowed types.';
 $messages['help_upload_allowed_files'] = 'Space-separated list of file types that are allowed to be uploaded. Usage of \'*\' and \'?\' is allowed. If both upload_forbidden_file and this option are set, the whitelist (upload_allowed_files) takes precedence over the blacklist [Default = None]';
 
 $messages['help_template_load_order'] = 'Defines in which order template files are searched and loaded. If using \'Load default templates first\', LifeType will try to find files first in the templates/default/ folder and if not available there, then it will load the user\'s template files. If the same template file exists in both places, the default one takes precedence. If set to \'Load user templates first\', user templates are always loaded first and if unavailable, then the default one is used. If the same template file exists in both places, the user template always takes precedence.';
@@ -1110,7 +1107,7 @@
 
 $messages['help_summary_service_name'] = 'Name of your site/service that will appear in several places in the front page as well as in the RSS feeds [ Default = empty ]';
 
-$messages['register_step2_help'] = 'Please provide now the required information in order to create a blog.';
+$messages['register_step2_help'] = 'Please provide the required information in order to create a blog.';
 
 $messages['create_date'] = 'Date created';
 
@@ -1121,7 +1118,7 @@
 
 $messages['error_cannot_delete_last_blog_category'] = 'You cannot delete the last blog category.';
 
-$messages['help_logout_destination_url'] = 'URL where users will be forwarded when logging out of the service, instead of the login page of the admin interface [ Default Value = empty ]';
+$messages['help_logout_destination_url'] = 'URL where users will be forwarded when logging out of the administration interface instead of the login page. [ Default Value = empty ]';
 $messages['help_default_global_article_category_id'] = 'Identifier of the default global article category [ Default = empty ]';
 $messages['help_blog_does_not_exist_url'] = 'URL where users will be forwarded when they attempt to reach a blog that does not exist in this site, instead of being forwarded to the site\'s default blog [ Default = empty ]';
 
@@ -1133,13 +1130,13 @@
 $messages['help_forbidden_blognames'] = 'List of strings separated by a blank space that are not allowed to be used as blog names. It is possible to use regular expressions instead of plain strings. [ Default = (empty) ]';
 
 $messages['posts_updated_ok'] = '%s posts updated successfully';
-$messages['error_updating_post2'] = 'There was an error updating the article with idenfitier %s';
+$messages['error_updating_post2'] = 'There was an error updating the article with idenfitier "%s"';
 $messages['resources_updated_ok'] = '% resources updated successfully';
-$messages['error_updating_resource2'] = 'There was an error updating the resource with identifier %s';
+$messages['error_updating_resource2'] = 'There was an error updating the resource with identifier "%s"';
 $messages['albums_updated_ok'] = '%s albums updated successfully';
-$messages['error_updating_album2'] = 'There was an error updating album with identifier %s';
+$messages['error_updating_album2'] = 'There was an error updating album with identifier "%s"';
 $messages['links_updated_ok'] = '%s links updated successfully';
-$messages['error_updating_link2'] = 'There was an error updating the link with identifier %s';
+$messages['error_updating_link2'] = 'There was an error updating the link with identifier "%s"';
 
 $messages['version'] = 'Version';
 
@@ -1148,13 +1145,27 @@
 
 $messages['blog_updated_ok'] = 'Blog "%s" was successfully updated';
 $messages['blogs_updated_ok'] = '%s blogs were successfully updated';
-$messages['error_updating_blog2'] = 'There was an error updating the blog whose identifier is "%s"';
+$messages['error_updating_blog2'] = 'There was an error updating the blog with identifier "%s"';
 $messages['error_updating_blog'] = 'There was an error updating blog "%s"';
 
 $messages['error_updating_user'] = 'There was an error updating user "%s".';
 $messages['user_updated_ok'] = 'User "%s" was successfully updated.';
 $messages['users_updated_ok'] = '%s users were successfully updated';
-$messages['eror_updating_user2'] = 'There was an error updating user with identifier "%s"';
+$messages['eror_updating_user2'] = 'There was an error updating the user with identifier "%s"';
 
 $messages['error_select_status'] = 'Please select a valid status';
-?>
\ No newline at end of file
+$messages['error_invalid_blog_name'] = 'Sorry, the blog name is not valid';
+
+$messages['help_resources_naming_rule'] = 'The file naming rules for uploaded resources. \'Original File Name\' will use the original name of the file. \'Encoded File Name\' will use the encoded file name for uploaded resources, the naming rule is [BlogId]-[ResourceId].[Ext]. Please use \'Encoded File Name\' if you are running LifeType on a Multi-Byte Microsoft Windows server. <strong>NOTE: Please don\'t change this option after users have uploaded files into LifeType or older files will not be accessible anymore.</strong> [Default = Original File Name]';
+$messages['original_file_name'] = 'Original File Name';
+$messages['encoded_file_name'] = 'Encoded File Name';
+
+$messages['quick_permission_selection'] = 'Quick permission selection';
+$messages['basic_blog_permission'] = 'Allow blog user to add, update and delete posts, links and resources';
+$messages['full_blog_permission'] = 'Allow blog user to access all blog functions as blog owner';
+
+$messages['error_template_exist'] = 'There was an error uploading the template, template "%s" already exist.';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
+?>

Modified: plog/trunk/locale/admin/locale_en_US.php
===================================================================
--- plog/trunk/locale/admin/locale_en_US.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_en_US.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -8,4 +8,4 @@
 $messages['controlCenter'] = 'Control Center';
 $messages['pluginCenter'] = 'Plugin Center';
 
-?>
+?>
\ No newline at end of file

Modified: plog/trunk/locale/admin/locale_es_ES.php
===================================================================
--- plog/trunk/locale/admin/locale_es_ES.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_es_ES.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -6,7 +6,7 @@
 $messages['error_incorrect_username_or_password'] = 'El nombre de usuario o password es incorrecto.';
 $messages['error_dont_belong_to_any_blog'] = 'Su usuario no pertenece a ninguna bitácora todavía.';
 $messages['logout_message'] = 'Ha sido desconectado correctamente';
-$messages['logout_message_2'] = 'Haga clic <a href="%1$s">aquí</a> para ir a %2$s</a>.';
+$messages['logout_message_2'] = 'Haga clic <a href="%1$s">aquí</a> para ir a %2$s.';
 $messages['error_access_forbidden'] = 'Acceso no permitido. Debe primero verificar su usuario aquí';
 $messages['username'] = 'Usuario';
 $messages['password'] = 'Password';
@@ -153,7 +153,6 @@
 // edit post page
 $messages['update'] = 'Actualizar';
 $messages['editPost'] = 'Editar Artículo';
-$messages['error_fetching_post'] = 'Hubo un error cargando el artículo';
 $messages['post_updated_ok'] = 'El artículo "%s" fue actualizado corrrectamente';
 $messages['error_updating_post'] = 'Hubo un error actualizando el artículo';
 $messages['notification_added'] = 'Se enviará un mensaje cada vez que se reciba un comentario o retroenlace';
@@ -607,7 +606,7 @@
 $messages['help_template_compile_check'] = 'Si se activa, Smarty comprobará si los ficheros de las plantillas han cambiado y si es así, las recompilará [Valor por defecto = Sí]';
 $messages['help_template_cache_enabled'] = 'Activa la cache de plantillas. Si está activada, las páginas de las bitácoras solo se generarán una vez y se usarán hasta que haya algun cambio. De esta forma, no será necesario traer los datos desde la base de datos cada vez [Valor por defecto = Sí]';
 $messages['help_template_cache_lifetime'] = 'Tiempo en segundos de vida de la caché. Asigne -1 para que la caché nucna expire';
-$messages['help_template_http_cache_enabled'] = 'Activar el soporte para las peticiones condicionales vía HTTP. Si se activa, LifeType tendrá en cuenta el valor de la cabecera HTTP "If-Modified-Since" y solo enviará los datos en caso de que sea necesario para ahorrar ancho de banda [Valor por defecto = No]';
+$messages['help_template_http_cache_enabled'] = 'Activar el soporte para las peticiones condicionales vía HTTP. Si se activa, LifeType tendrá en cuenta el valor de la cabecera HTTP "If-Modified-Since" y solo enviará los datos en caso de que sea necesario para ahorrar ancho de banda [Valor por defecto = Sí]';
 $messages['help_allow_php_code_in_templates'] = 'Permite incluir código PHP en las plantillas de Smarty vía {php}...{/php} [Valor por defecto = No]';
 // urls
 $messages['help_request_format_mode'] = 'Elija uno de los siguientes formatos de URLs. Si piensa usar "URLs Personales", configure los formatos de las URLs si es necesario [Valor por defecto = Plain]';
@@ -861,7 +860,6 @@
 $messages['trackbacks_updated_ok'] = '%s retroenlaces actualizados correctamente';
 $messages['trackback_updated_ok'] = 'Retroenlace modificado correctamente';
 $messages['error_trackback_status'] = 'Elija un estado válido';
-$messages['error_incorrect_user'] = 'El usuario no es válido';
 $messages['select'] = 'Seleccionar';
 $messages['remove_selected'] = 'Eliminar selección';
 
@@ -1168,4 +1166,18 @@
 $messages['eror_updating_user2'] = 'Hubo un error modificando el usuario cuyo identificador es "%s"';
 
 $messages['error_select_status'] = 'Seleccione un estado.';
-?>
\ No newline at end of file
+$messages['error_invalid_blog_name'] = 'El nombre de la bitácora no es correcto.';
+
+$messages['help_resources_naming_rule'] = 'Nombre con el que se guardarán los ficheros. Cuando \'Nombre original\' está seleccionado, se guardará el fichero con su nombre original. Cuando \'Nombre del fichero codificado\' está seleccionado, se cambiará el nombre del fichero de acuerdo con la regla [BlogId]-[FicheroId].[Ext]. Use \'Nombre del fichero codificado\' si está ejecutando LifeType en un servidor Windows y el juego de carácteres es multi-byte. Si no está seguro, seguramente no necesite usar esta opción y debería dejarlo con el valor por defecto [Valor por defecto = Nombre original]';
+$messages['original_file_name'] = 'Nombre original';
+$messages['encoded_file_name'] = 'Nombre del fichero codificado';
+
+$messages['quick_permission_selection'] = 'Selector rápido';
+$messages['basic_blog_permission'] = 'Permite al usuario añadir, actualizar y borrar artículos, enlaces y ficheros';
+$messages['full_blog_permission'] = 'Permite al usuaio acceder al blog como si fuera el propietario';
+
+$messages['error_template_exist'] = 'Hubo un error añadiendo la nueva plantilla, ya hay una plantilla llamada "%s".';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
+?>

Modified: plog/trunk/locale/admin/locale_fr_FR.php
===================================================================
--- plog/trunk/locale/admin/locale_fr_FR.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_fr_FR.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -13,7 +13,7 @@
 $messages["error_dont_belong_to_any_blog"] = " Désolé, vous n'êtes encore membre d'aucun blog";
 $messages["logout_message"] = "Déconnexion réussie.";
 $messages["logout_message_2"] = "<a href=\"admin.php\">Cliquez ici</a>pour vous reconnecter,
-ou <a href=\"%1\$s\">ici pour aller %2\$s</a>.";
+ou <a href=\"%1\$s\">ici pour aller %2\$s.";
 $messages["error_access_forbidden"] = "Accès interdit, vous devez vous identifier <a href=\"admin.php\">ici</a> avant .";
 $messages["username"] = "Pseudo";
 $messages["password"] = "Mot de passe";
@@ -166,7 +166,6 @@
 // edit post page
 $messages["update"] = "Mettre à jour";
 $messages["editPost"] = "Editer l'article";
-$messages["error_fetching_post"] = "Erreur en récupérant l'article.";
 $messages["post_updated_ok"] = "Article \"%s\" mis à jour";
 $messages["error_updating_post"] = "Il y a eu une erreur en mettant à jour l'article";
 $messages["notification_added"] = "Une notification vous sera envoyée par mail à chaque nouveau commentaire ou trackback.";
@@ -618,7 +617,7 @@
 $messages["help_force_one_blog_per_email_account"] = "Restreindre à seulement un blog par adresse email";
 $messages["help_summary_show_agreement"] = "Afficher un message d'avertissement et demander l'acceptation aux utilisateurs qui s'inscrivent";
 $messages["help_need_email_confirm_registration"] = "Obliger les utilisateurs à confirmer leur inscription en cliquant sur un lien envoyé par email (recommandé)";
-$messages["help_summary_disable_registration"] = "Autoriser les utilisateurs à créer des blogs";
+$messages["help_summary_disable_registration"] = "Refuser aux utilisateurs de créer des blogs";
 
 // templates
 $messages["help_template_folder"] = "Dossier où sont stockés les gabarits";
@@ -903,7 +902,6 @@
 $messages['trackbacks_updated_ok'] = "%s Trackbacks misent à jour avec succès"; //'%s trackbacks updated successfully';
 $messages['trackback_updated_ok'] = "Trackback mis à jour avec succès"; //''Trackback updated successfully';
 $messages['error_trackback_status'] = "Sélectionner un statut valide"; //'Please select a valid status';
-$messages['error_incorrect_user'] = "Utilisateur invalide"; //'User is not valid';
 $messages['select'] = "Sélectionner"; //'Select';
 $messages['remove_selected'] = "Choix supprimés"; //'Remove Selected';
 
@@ -1080,7 +1078,7 @@
 
 $messages['change_album'] = "Changer d'album"; //'Change Album';
 
-$messages['warning_autosave_message'] = '<img src="imgs/admin/icon_warning-16.png" alt="Erreur" class="InfoIcon"/><p class="ErrorText">Vous avez quitté cette page sans sauvegrder votre article. Si c\'est le cas,<a href="#" onclick="restoreAutoSave();">Cliquez ici pour le récupérer</a> ou a href="#" onclick="eraseAutoSave();"> supprimez le </a></p> '; // '<img src="imgs/admin/icon_warning-16.png" alt="Error" class="InfoIcon"/><p class="ErrorText">You seem to have left here without saving your post. If so, you may <a href="#" onclick="restoreAutoSave();">click here to restore it</a> or <a href="#" onclick="eraseAutoSave();">delete it</a>.</p>';
+$messages['warning_autosave_message'] = '<img src="imgs/admin/icon_warning-16.png" alt="Erreur" class="InfoIcon"/><p class="ErrorText">Vous avez quitté cette page sans sauvegrder votre article. Si c\'est le cas,<a href="#" onclick="restoreAutoSave();">Cliquez ici pour le récupérer</a> ou <a href="#" onclick="eraseAutoSave();"> supprimez le </a></p> '; // '<img src="imgs/admin/icon_warning-16.png" alt="Error" class="InfoIcon"/><p class="ErrorText">You seem to have left here without saving your post. If so, you may <a href="#" onclick="restoreAutoSave();">click here to restore it</a> or <a href="#" onclick="eraseAutoSave();">delete it</a>.</p>';
 
 $messages['check_username'] = "Vérifier le pseudo"; //'Check User Name';
 $messages['check_username_ok'] = "Le pseudo est disponible"; //'The user name is available!';
@@ -1337,4 +1335,18 @@
 $messages['eror_updating_user2'] = 'There was an error updating user with identifier "%s"';
 
 $messages['error_select_status'] = 'Please select a valid status';
-?>
\ No newline at end of file
+$messages['error_invalid_blog_name'] = 'Sorry, the blog name is not valid';
+
+$messages['help_resources_naming_rule'] = 'The file naming rules for uploaded resources. \'Original File Name\' use original file for uploaded resources. \'Encoded File Name\' use the encoded file name for uploaded resources, the naming rule is [BlogId]-[ResourceId].[Ext]. Please use \'Encoded File Name\' if you install LifeType under Multi-Byte Microsoft Windows environment. <strong>And please don\'t change this option after users start uploading the files into LifeType. It will make uploaded files can\'t be accessed anymore.</strong> [Default = Original File Name]';
+$messages['original_file_name'] = 'Original File Name';
+$messages['encoded_file_name'] = 'Encoded File Name';
+
+$messages['quick_permission_selection'] = 'Quick permission selection';
+$messages['basic_blog_permission'] = 'Allow blog user add, update and delete posts, links and resources';
+$messages['full_blog_permission'] = 'Allow blog user access all blog functions as blog owner';
+
+$messages['error_template_exist'] = 'There was an error upload the template, template "%s" already exist.';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
+?>

Modified: plog/trunk/locale/admin/locale_it_IT.php
===================================================================
--- plog/trunk/locale/admin/locale_it_IT.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_it_IT.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -6,7 +6,7 @@
 $messages['error_incorrect_username_or_password'] = 'Nome utente o password errati.'; 
 $messages['error_dont_belong_to_any_blog'] = 'Spiacente ma non appartieni ancora a nessun blog.';
 $messages['logout_message'] = 'Logout effettuato con successo.'; 
-$messages['logout_message_2'] = 'Clicca <a href="%1$s">qui</a> per andare %2$s</a>.';
+$messages['logout_message_2'] = 'Clicca <a href="%1$s">qui</a> per andare %2$s.';
 $messages['error_access_forbidden'] = 'Accesso negato. Devi prima effettuare il login.';
 $messages['username'] = 'Utente';
 $messages['password'] = 'Password';
@@ -159,7 +159,6 @@
 // edit post page
 $messages['update'] = 'Aggiorna';
 $messages['editPost'] = 'Modifica articolo';
-$messages['error_fetching_post'] = 'Errore durante la lettura dell\'articolo';
 $messages['post_updated_ok'] = 'Articolo "%s" modificato';
 $messages['error_updating_post'] = 'Errore durante la modifica dell\'articolo';
 $messages['notification_added'] = 'Riceverai una notifica per ciascun commento o trackback';
@@ -614,7 +613,7 @@
 $messages['help_template_compile_check'] = 'Se abilitato, Smarty controllerà ogni volta se i file dello stile sono stati modificati, e, se sì, userà la nuova versione. Disabilitare per aumentare le prestazioni. [Predefinito = Sì]';
 $messages['help_template_cache_enabled'] = 'Abilita la cache degli stili. Se abilitata, la versione in cache dello stile verrà utilizzata quando possibile. Non sarà necessario estrarre dati dal database, e gli stili non dovranno venire ricompilati [Predefinito = Sì]';
 $messages['help_template_cache_lifetime'] = 'Tempo di validità in secondi della cache. Imposta a -1 per forzare la cache a non scadere mai. Se impostato a 0 la cache verrà disabilitata, per ottenere lo stesso effetto è tuttavia preferibile impostare l\'opzione template_cache_enabled a "No" [Predefinito = -1]';
-$messages['help_template_http_cache_enabled'] = 'Abilita il supporto per le richieste HTTP condizionate. Se abilitate, pLog prenderà in considerazione l\'intestazione HTTP "If-Modified-Since", e spedirà il contenuto solo se strettamente necessario. Abilita per risparmiare banda. [Predefinito = No]';
+$messages['help_template_http_cache_enabled'] = 'Abilita il supporto per le richieste HTTP condizionate. Se abilitate, pLog prenderà in considerazione l\'intestazione HTTP "If-Modified-Since", e spedirà il contenuto solo se strettamente necessario. Abilita per risparmiare banda. [Predefinito = Sì]';
 $messages['help_allow_php_code_in_templates'] = 'Permetti di incorporare codice PHP negli stili Smarty, racchiudendolo in blocchi {php}...{/php} [Predefinito = No]';
 // urls
 $messages['help_request_format_mode'] = 'Seleziona uno dei formati URL disponibili. Se utilizzi URL personalizzati, imposta le opzioni qui sotto [Predefinito = Normale]';
@@ -882,7 +881,6 @@
 $messages['trackbacks_updated_ok'] = '%s trackback aggiornati con successo';
 $messages['trackback_updated_ok'] = 'Trackback aggiornato con successo';
 $messages['error_trackback_status'] = 'Scegli uno stato valido';
-$messages['error_incorrect_user'] = 'Utente non valido';
 $messages['select'] = 'Scegli';
 $messages['remove_selected'] = 'Rimuovi selezionato';
 
@@ -1144,15 +1142,30 @@
 $messages['error_resources_disabled'] = 'Spiacenti, il supporto per il caricamento di nuove risorse è stato disabilitato in questo sito';
 $messages['help_login_admin_panel'] = 'Clicca sul nome del blog per entrare nella pagina di amministrazione.';
 
-$messages['blog_updated_ok'] = 'Blog "%s" was successfully updated';
-$messages['blogs_updated_ok'] = '%s blogs were successfully updated';
-$messages['error_updating_blog2'] = 'There was an error updating the blog whose identifier is "%s"';
-$messages['error_updating_blog'] = 'There was an error updating blog "%s"';
 
-$messages['error_updating_user'] = 'There was an error updating user "%s".';
-$messages['user_updated_ok'] = 'User "%s" was successfully updated.';
-$messages['users_updated_ok'] = '%s users were successfully updated';
-$messages['eror_updating_user2'] = 'There was an error updating user with identifier "%s"';
+$messages['blog_updated_ok'] = 'Il blog "%s" è stato aggiornato con successo';
+$messages['blogs_updated_ok'] = '%s blog sono stati aggiornato con successo';
+$messages['error_updating_blog2'] = 'Si è verificato un errore aggiornando il blog con l\'identificatore "%s"';
+$messages['error_updating_blog'] = 'Si è verificato un errore aggiornando il blog "%s"';
 
-$messages['error_select_status'] = 'Please select a valid status';
+$messages['error_updating_user'] = 'Si è verificato un errore aggiornando l\'utente "%s".';
+$messages['user_updated_ok'] = 'L\'utente "%s" è stato aggiornato con successo.';
+$messages['users_updated_ok'] = '%s utenti aggiornati con successo';
+$messages['eror_updating_user2'] = 'Si è verificato un errore aggiornando l\'utente con l\'identificatore "%s"';
+
+$messages['error_select_status'] = 'Seleziona uno stato valido';
+$messages['error_invalid_blog_name'] = 'Spiacente, il nome del blog non è valido';
+
+$messages['help_resources_naming_rule'] = 'Regole per i nomi dei file delle risorse caricate. \'Nome originale del file\' utilizza il nome originale del file per le risorse caricate. \'Nome codificato del file\' utilizza il nome codificato del file per le risorse caricate, la regola per il nome è [BlogId]-[ResourceId].[Ext]. Utilizza \'Nome codificato del file\' se installi LifeType in un ambiente Microsoft Windows Multi-Byte. <strong>Non cambiare questo opzione dopo che gli utenti hanno iniziato a caricare i file su LifeType. I file caricati non saranno più accessibili.</strong> [Predefinito = Nome originale del file]';
+$messages['original_file_name'] = 'Nome originale del file';
+$messages['encoded_file_name'] = 'Nome codificato del file';
+
+$messages['quick_permission_selection'] = 'Selezione dei permessi rapida';
+$messages['basic_blog_permission'] = 'Permetti agli utenti del blog di aggiungere, aggiornare e cancellare articoli, link e risorse';
+$messages['full_blog_permission'] = 'Permetti agli utenti del blog di accedere a tutte le funzioni del blog come se fossere i proprietari';
+
+$messages['error_template_exist'] = 'Si è verificato un errore caricando lo stile, lo stile "%s" esiste già.';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/admin/locale_nl_NL.php
===================================================================
--- plog/trunk/locale/admin/locale_nl_NL.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_nl_NL.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -10,7 +10,7 @@
 $messages['error_incorrect_username_or_password'] = 'Foutieve inlognaam of wachtwoord.';
 $messages['error_dont_belong_to_any_blog'] = 'Sorry, je bent nog niet aan een blog gekoppeld.';
 $messages['logout_message'] = 'Je bent uitgelogd..';
-$messages['logout_message_2'] = 'Klik <a href="%1$s">hier</a> om naar %2$s te gaan</a>.';
+$messages['logout_message_2'] = 'Klik <a href="%1$s">hier</a> om naar %2$s te gaan.';
 $messages['error_access_forbidden'] = 'Geen toegang. Je moet eerst hier inloggen.';
 $messages['username'] = 'Inlognaam';
 $messages['password'] = 'Wachtwoord';
@@ -187,7 +187,6 @@
 // edit post page
 $messages['update'] = 'Wijzigen';
 $messages['editPost'] = 'Wijzig document';
-$messages['error_fetching_post'] = 'Fout tijdens ophalen van het document';
 $messages['post_updated_ok'] = 'Document "%s" is gewijzigd';
 $messages['error_updating_post'] = 'Fout tijdens wijzigen van het document';
 $messages['notification_added'] = 'Er wordt een bericht verstuurd zodra er commentaar of een Trackback is geplaatst';
@@ -648,7 +647,7 @@
 $messages['help_template_compile_check'] = 'Controleer regelmatig of templates zijn aangepast, en gebruik deze wanneer dat het geval is. Schakel dit uit voor een betere performance [Standaard = Ja]';
 $messages['help_template_cache_enabled'] = 'Schakel template caching in. Dit zorgt ervoor dat er geen gegevens uit de database hoeven worden opgehaald en templates niet opnieuw vertaald te hoeven worden [Standaard = Ja]';
 $messages['help_template_cache_lifetime'] = 'Tijdsduur in seconden voor de template cache. Kies -1 om de cache zoveel mogelijk te benutten. Als de waarde op 0 staat, wordt caching uitgeschakeld. Het wordt echter aangeraden om in plaats daarvan template_cache_enabled op "Nee" te zetten [Standaard = 0]';
-$messages['help_template_http_cache_enabled'] = 'Schakel ondersteuning voor HTTP conditional requests in. Dit zorgt ervoor dat SP Communitiez de "If-Modified-Since" HTTP header gebruikt en alleen gegevens verstuurt indien dit strikt noodzakelijk is. Schakel dit aan om bandbreedte te besparen [Standaard = Nee]';
+$messages['help_template_http_cache_enabled'] = 'Schakel ondersteuning voor HTTP conditional requests in. Dit zorgt ervoor dat SP Communitiez de "If-Modified-Since" HTTP header gebruikt en alleen gegevens verstuurt indien dit strikt noodzakelijk is. Schakel dit aan om bandbreedte te besparen [Standaard = Ja]';
 $messages['help_allow_php_code_in_templates'] = 'Sta toe dat PHP code in Smarty templates wordt gebruikt binnen {php}...{/php} blokken [Standaard = Nee]';
 // urls
 $messages['help_request_format_mode'] = 'Selecteer één van onderstaande URL formaten. Als voor aangepaste URLs wordt gekozen, moeten alle onderstaande instellingen worden geconfigureerd [Standaard = Kaal]';
@@ -912,7 +911,6 @@
 $messages['trackbacks_updated_ok'] = '%s trackbacks met succes aangepast';
 $messages['trackback_updated_ok'] = 'Trackbacks met succes aangepast';
 $messages['error_trackback_status'] = 'Selecteer een correcte status';
-$messages['error_incorrect_user'] = 'Gebruiker is niet correct';
 $messages['select'] = 'Selecteer';
 $messages['remove_selected'] = 'Verwijder Selectie';
 
@@ -1224,15 +1222,29 @@
 $messages['purging_error'] = 'Het is misgelopen tijdens het purgen van de data';
 $messages['help_login_admin_panel'] = 'Klik op de blog naam om op de administratie pagina te komen.';
 
-$messages['blog_updated_ok'] = 'Blog "%s" was successfully updated';
-$messages['blogs_updated_ok'] = '%s blogs were successfully updated';
-$messages['error_updating_blog2'] = 'There was an error updating the blog whose identifier is "%s"';
-$messages['error_updating_blog'] = 'There was an error updating blog "%s"';
+$messages['blog_updated_ok'] = 'Blog "%s" werd met succes geupdate';
+$messages['blogs_updated_ok'] = '%s blogs werden met succes geupdate';
+$messages['error_updating_blog2'] = 'Er is een fout opgetreden met het updaten van de blog waarvan de eigenaar "%s" is';
+$messages['error_updating_blog'] = 'Er is een fout opgetreden met het updaten van blog "%s"';
 
-$messages['error_updating_user'] = 'There was an error updating user "%s".';
-$messages['user_updated_ok'] = 'User "%s" was successfully updated.';
-$messages['users_updated_ok'] = '%s users were successfully updated';
-$messages['eror_updating_user2'] = 'There was an error updating user with identifier "%s"';
+$messages['error_updating_user'] = 'Er is een fout opgetreden met het updaten van gebruiker "%s".';
+$messages['user_updated_ok'] = 'Gebruiker "%s" werd met succes geupdated.';
+$messages['users_updated_ok'] = '%s gebruikers werden met succes geupdate';
+$messages['eror_updating_user2'] = 'Er is een fout opgetreden met het updaten van gebruiker "%s"';
 
-$messages['error_select_status'] = 'Please select a valid status';
+$messages['error_select_status'] = 'Selecteer een geldige status';
+$messages['error_invalid_blog_name'] = 'Sorry, de blognaam is niet geldig';
+
+$messages['help_resources_naming_rule'] = 'De bestandsnamen regels voor geuploade bestanden. \'Originele naam van de map\' gebruik originele map voor geuploade bestandsnamen. \'Gecodeerde naam van de map\' gebruik de naam van de map voor geuploade bestanden, de regel van de namen is [BlogId]-[ResourceId].[Ext]. Gebruik de \'Gecodeerde naam van de map\ indie je Lifetype installeerd in een Multi-Byte Microsoft Windows omgeving. <strong>Pas deze optie niet aan nadat gebruikers al bestanden hebben geupload naar Lifetype. Geuploade bestanden zullen niet meer toegankelijk zijn.</strong> [Standaard = Originele Map Naam]';
+$messages['original_file_name'] = 'Originele Map Naam';
+$messages['encoded_file_name'] = 'Gecodeerde Map Naam';
+
+$messages['quick_permission_selection'] = 'Rechten selectie';
+$messages['basic_blog_permission'] = 'Sta de blog gebruiker toe om berichten toe te voegen, up te daten en berichten, links en bestanden te verwijderen.';
+$messages['full_blog_permission'] = 'Sta de blog gebruiker toe om toegang te krijgen tot alle blogfuncties als blogeigenaar.';
+
+$messages['error_template_exist'] = 'Er is een fout opgetreden bij het uploaden, template "%s" bestaat al.';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/admin/locale_zh_CN.php
===================================================================
--- plog/trunk/locale/admin/locale_zh_CN.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_zh_CN.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -10,7 +10,7 @@
 $messages['error_incorrect_username_or_password'] = '很抱歉,您输入的帐号或密码错误。';
 $messages['error_dont_belong_to_any_blog'] = '很抱歉,您没有使用系统中任何一个博客站台的权限。';
 $messages['logout_message'] = '您已经顺利登出系统。';
-$messages['logout_message_2'] = '请按 <a href="%1$s">这里</a> 链接到 %2$s</a>。';
+$messages['logout_message_2'] = '请按 <a href="%1$s">这里</a> 链接到 %2$s。';
 $messages['error_access_forbidden'] = '您目前没有权限进入管理介面,请到这里登入。';
 $messages['username'] = '用户名称';
 $messages['password'] = '用户密码';
@@ -162,7 +162,6 @@
 // edit post page
 $messages['update'] = 'æ›´æ–°';
 $messages['editPost'] = '编辑文章';
-$messages['error_fetching_post'] = '读取文章数据时发生错误';
 $messages['post_updated_ok'] = '文章[%s]已成功更新。';
 $messages['error_updating_post'] = '更新文章时发生错误';
 $messages['notification_added'] = '当有新的评论或是引用时,便向我发送电子邮件通知';
@@ -882,7 +881,6 @@
 $messages['trackbacks_updated_ok'] = '%s 个引用已成功的更新';
 $messages['trackback_updated_ok'] = '引用已成功的更新';
 $messages['error_trackback_status'] = '请选择一个合法的状态';
-$messages['error_incorrect_user'] = '不合法的用户';
 $messages['select'] = '选择';
 $messages['remove_selected'] = '取消选取';
 
@@ -1146,15 +1144,29 @@
 $messages['error_resources_disabled'] = '抱歉!本网站的上传功能已经被管理者关闭。';
 $messages['help_login_admin_panel'] = '点选博客名称,进入博客管理页面。';
 
-$messages['blog_updated_ok'] = 'Blog "%s" was successfully updated';
-$messages['blogs_updated_ok'] = '%s blogs were successfully updated';
-$messages['error_updating_blog2'] = 'There was an error updating the blog whose identifier is "%s"';
-$messages['error_updating_blog'] = 'There was an error updating blog "%s"';
+$messages['blog_updated_ok'] = '博客 "%s" 已经顺利更新。';
+$messages['blogs_updated_ok'] = '%s 个博客已经顺利更新。';
+$messages['error_updating_blog2'] = '更新博客 ID = "%s" 时发生错误。';
+$messages['error_updating_blog'] = '更新博客 "%s" 时发生错误';
 
-$messages['error_updating_user'] = 'There was an error updating user "%s".';
-$messages['user_updated_ok'] = 'User "%s" was successfully updated.';
-$messages['users_updated_ok'] = '%s users were successfully updated';
-$messages['eror_updating_user2'] = 'There was an error updating user with identifier "%s"';
+$messages['error_updating_user'] = '更新用户 "%s" 时发生错误。';
+$messages['user_updated_ok'] = '用户 "%s" 已经顺利更新。';
+$messages['users_updated_ok'] = '%s 个用户已经顺利更新。';
+$messages['eror_updating_user2'] = '更新用户 "%s" 时发生错误。';
 
-$messages['error_select_status'] = 'Please select a valid status';
+$messages['error_select_status'] = '请选择合法的状态。';
+$messages['error_invalid_blog_name'] = '网志博客“%s”不正确。';
+
+$messages['help_resources_naming_rule'] = '选择档案上传后在主机的储存方式。“原始档案名称”使用原来的档案名称来储存上传的档案。“编码档案名称”使用编码过的档案名称 [BlogId]-[ResourceId].[Ext] 来储存上传的档案。在 Windows 多字元下安装 LifeType 请使用“编码档案名称”。<strong>另外,当使用者开始上传档案后,请勿修改此选项,这会造成以上传的档案无法再被读取。</strong> [预设 = 原始档案名称]';
+$messages['original_file_name'] = '原始档案名称';
+$messages['encoded_file_name'] = '编码档案名称';
+
+$messages['quick_permission_selection'] = '快速权限设定选单';
+$messages['basic_blog_permission'] = '博客作者可以新增、编修与删除文章、链接与文件';
+$messages['full_blog_permission'] = '博客作者可以跟博客拥有者一样,操作所有功能';
+
+$messages['error_template_exist'] = '上传模版时发生错误,“%s”模版已经存在。';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/admin/locale_zh_TW.php
===================================================================
--- plog/trunk/locale/admin/locale_zh_TW.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/admin/locale_zh_TW.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -10,7 +10,7 @@
 $messages['error_incorrect_username_or_password'] = '很抱歉,您輸入的帳號或密碼錯誤。';
 $messages['error_dont_belong_to_any_blog'] = '很抱歉,您沒有使用系統中任何一個網誌站台的權限。';
 $messages['logout_message'] = '您已經順利登出系統。';
-$messages['logout_message_2'] = '請按 <a href="%1$s">這裡</a> 連結到 %2$s</a>。';
+$messages['logout_message_2'] = '請按 <a href="%1$s">這裡</a> 連結到 %2$s。';
 $messages['error_access_forbidden'] = '您目前沒有權限進入管理介面,請到這裡登入。';
 $messages['username'] = '使用者名稱';
 $messages['password'] = '使用者密碼';
@@ -162,7 +162,6 @@
 // edit post page
 $messages['update'] = 'æ›´æ–°';
 $messages['editPost'] = '編輯文章';
-$messages['error_fetching_post'] = '讀取文章資料時發生錯誤';
 $messages['post_updated_ok'] = '文章[%s]已成功更新。';
 $messages['error_updating_post'] = '更新文章時發生錯誤';
 $messages['notification_added'] = '當有新的迴響或是引用時,便向我發送電子郵件通知';
@@ -882,7 +881,6 @@
 $messages['trackbacks_updated_ok'] = '%s 個引用已成功的更新';
 $messages['trackback_updated_ok'] = '引用已成功的更新';
 $messages['error_trackback_status'] = '請選擇一個合法的狀態';
-$messages['error_incorrect_user'] = '不合法的使用者';
 $messages['select'] = '選擇';
 $messages['remove_selected'] = '取消選取';
 
@@ -1146,15 +1144,29 @@
 $messages['error_resources_disabled'] = '抱歉!本網站的上傳功能已經被管理者關閉。';
 $messages['help_login_admin_panel'] = '點選網誌名稱,進入網誌管理頁面。';
 
-$messages['blog_updated_ok'] = 'Blog "%s" was successfully updated';
-$messages['blogs_updated_ok'] = '%s blogs were successfully updated';
-$messages['error_updating_blog2'] = 'There was an error updating the blog whose identifier is "%s"';
-$messages['error_updating_blog'] = 'There was an error updating blog "%s"';
+$messages['blog_updated_ok'] = '網誌 "%s" 已經順利更新。';
+$messages['blogs_updated_ok'] = '%s 個網誌已經順利更新。';
+$messages['error_updating_blog2'] = '更新網誌 ID = "%s" 時發生錯誤。';
+$messages['error_updating_blog'] = '更新網誌 "%s" 時發生錯誤';
 
-$messages['error_updating_user'] = 'There was an error updating user "%s".';
-$messages['user_updated_ok'] = 'User "%s" was successfully updated.';
-$messages['users_updated_ok'] = '%s users were successfully updated';
-$messages['eror_updating_user2'] = 'There was an error updating user with identifier "%s"';
+$messages['error_updating_user'] = '更新使用者 "%s" 時發生錯誤。';
+$messages['user_updated_ok'] = '使用者 "%s" 已經順利更新。';
+$messages['users_updated_ok'] = '%s 個使用者已經順利更新。';
+$messages['eror_updating_user2'] = '更新使用者 "%s" 時發生錯誤。';
 
-$messages['error_select_status'] = 'Please select a valid status';
+$messages['error_select_status'] = '請選擇合法的狀態。';
+$messages['error_invalid_blog_name'] = '網誌名稱「%s」不正確。';
+
+$messages['help_resources_naming_rule'] = '選擇檔案上傳後在主機的儲存方式。「原始檔案名稱」使用原來的檔案名稱來儲存上傳的檔案。「編碼檔案名稱」使用編碼過的檔案名稱 [BlogId]-[ResourceId].[Ext] 來儲存上傳的檔案。在 Windows 多字元下安裝 LifeType 請使用「編碼檔案名稱」。<strong>另外,當使用者開始上傳檔案後,請勿修改此選項,這會造成以上傳的檔案無法再被讀取。</strong> [預設 = 原始檔案名稱]';
+$messages['original_file_name'] = '原始檔案名稱';
+$messages['encoded_file_name'] = '編碼檔案名稱';
+
+$messages['quick_permission_selection'] = '快速權限設定選單';
+$messages['basic_blog_permission'] = '網誌作者可以新增、編修與刪除文章、連結與檔案';
+$messages['full_blog_permission'] = '網誌作者可以跟網誌擁有者一樣,操作所有功能';
+
+$messages['error_template_exist'] = '上傳模版時發生錯誤,「%s」模版已經存在。';
+
+/// new strings in LT 1.2.2 ///
+$messages['posted_by_help'] = 'Select article owner';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/locale_ca_ES.php
===================================================================
--- plog/trunk/locale/locale_ca_ES.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_ca_ES.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -99,6 +99,7 @@
 ////// error messages /////
 $messages["error_fetching_article"] = "L'article especificat no s'ha pogut trobar.";
 $messages["error_fetching_articles"] = "Els articles no s'han pogut carregar.";
+$messages['error_fetching_category'] = 'There was an error fetching the category'; // translate
 $messages["error_trackback_no_trackback"] = "No s'han trobat retroenllaços per a l'article especificat.";
 $messages["error_incorrect_article_id"] = "L'identificador de l'article és incorrecte.";
 $messages["error_incorrect_blog_id"] = "L'identificador del bloc és incorrecte.";
@@ -111,9 +112,10 @@
 $messages["error_comments_not_enabled"] = "La funció de comentar articles ha estat desactivada en aquest bloc.";
 $messages['error_incorrect_search_terms'] = 'Els termes de la recerca no són vàlids.';
 $messages['error_no_search_results'] = 'No hi ha coincidències amb els termes de la cerca.';
-
 $messages['error_no_albums_defined'] = 'Aquest blog no té cap album definit.';
 $messages['error_incorrect_category_id'] = 'L\'identificador de la categoria no és correcte.';
+$messages['error_incorrect_user'] = 'L\'usuari no és vàlid';
+
 $messages['posted_in'] = 'Publicat a';
 $messages['form_authenticated'] = 'Autentitficat';
 $messages['previous_post'] = 'Anterior';
@@ -125,4 +127,8 @@
 $messages['admin'] = 'Administració';
 $messages['guestbook'] = 'Llibre visites';
 $messages['num_reads'] = 'Lectures';
-?>
\ No newline at end of file
+
+$messages['error_fetching_resource'] = 'El fitxer no s\'ha pogut trobar.';
+$messages['contact_me'] = 'Contacte';
+$messages['required'] = 'Obligatori';
+?>

Modified: plog/trunk/locale/locale_de_DE.php
===================================================================
--- plog/trunk/locale/locale_de_DE.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_de_DE.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -95,6 +95,7 @@
 ////// error messages /////
 $messages['error_fetching_article'] = 'Der gesuchte Artikel kann nicht gefunden werden.';
 $messages['error_fetching_articles'] = 'F&uuml;r diese Auswahl k&ouml;nnen keine Artikel angezeigt werden.';
+$messages['error_fetching_category'] = 'There was an error fetching the category'; // translate
 $messages['error_trackback_no_trackback'] = 'F&uuml;r diesen Artikel wurden keine Trackbacks gefunden.';
 $messages['error_incorrect_article_id'] = 'Die Artikel-ID ist nicht korrekt.';
 $messages['error_incorrect_blog_id'] = 'Die Weblog-ID ist nicht korrekt.';
@@ -108,9 +109,11 @@
 $messages['error_no_search_results'] = 'Es wurden keine den Suchbegriffen entsprechenden Ergebnisse gefunden.';
 $messages['error_no_albums_defined'] = 'In diesem Blog sind keine Alben verf&uuml;gbar.';
 $messages['error_incorrect_category_id'] = 'Es wurden keine Kategorien ausgew&auml;hlt oder die entsprechenden IDs sind nicht korrekt.';
+$messages['error_fetching_resource'] = 'Die gew&uuml;nschte Datei wurde nicht gefunden.';
+$messages['error_incorrect_user'] = 'Benutzer ist ung&uuml;ltig';
 
 $messages['form_authenticated'] = 'Authentifiziert';
-$messages['posted_in'] = 'Posted in';
+$messages['posted_in'] = 'Abgelegt unter';
 
 $messages['previous_post'] = 'zur&uuml;ck';
 $messages['next_post'] = 'vor';
@@ -123,4 +126,6 @@
 $messages['links'] = 'Links';
 $messages['categories'] = 'Kategorien';
 $messages['num_reads'] = 'gesehen';
+$messages['contact_me'] = 'Kontaktieren Sie mich';
+$messages['required'] = 'Notwendig';
 ?>

Modified: plog/trunk/locale/locale_en_UK.php
===================================================================
--- plog/trunk/locale/locale_en_UK.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_en_UK.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -95,6 +95,7 @@
 ////// error messages /////
 $messages['error_fetching_article'] = 'The article you specified could not be found.';
 $messages['error_fetching_articles'] = 'The articles could not be fetched.';
+$messages['error_fetching_category'] = 'There was an error fetching the category';
 $messages['error_trackback_no_trackback'] = 'No trackbacks were found for the article.';
 $messages['error_incorrect_article_id'] = 'The article identifier is not correct.';
 $messages['error_incorrect_blog_id'] = 'The blog identifier is not correct.';
@@ -108,6 +109,8 @@
 $messages['error_no_search_results'] = 'No items matching the search terms were found';
 $messages['error_no_albums_defined'] = 'There are no albums available in this blog.';
 $messages['error_incorrect_category_id'] = 'The category identifier is not correct or no items were selected';
+$messages['error_fetching_resource'] = 'The file you specified could not be found.';
+$messages['error_incorrect_user'] = 'User is not valid';
 
 $messages['form_authenticated'] = 'Authenticated';
 $messages['posted_in'] = 'Posted in';
@@ -122,6 +125,9 @@
 $messages['admin'] = 'Admin';
 $messages['links'] = 'Links';
 $messages['categories'] = 'Categories';
+$messages['articles'] = 'Articles';
 
 $messages['num_reads'] = 'Views';
+$messages['contact_me'] = 'Contact Me';
+$messages['required'] = 'Required';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/locale_en_US.php
===================================================================
--- plog/trunk/locale/locale_en_US.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_en_US.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,6 +1,11 @@
 <?php
 
 // include UK messages, and then just change the ones we don't like
+
+// NOTE: there is a problem with this method due to the way the language
+//       file is grabbed for plugins, so this method only works for
+//       English, unless you want to create a locale file for each plugin
+
 include(PLOG_CLASS_PATH . "locale/locale_en_UK.php" );  
 
 $messages['locale_description'] = 'English/American locale file for LifeType';

Modified: plog/trunk/locale/locale_es_ES.php
===================================================================
--- plog/trunk/locale/locale_es_ES.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_es_ES.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -92,6 +92,7 @@
 
 $messages['error_fetching_article'] = 'El artículo especificado no existe.';
 $messages['error_fetching_articles'] = 'No se encontraron artículos';
+$messages['error_fetching_category'] = 'There was an error fetching the category'; // translate
 $messages['error_trackback_no_trackback'] = 'El artículo no ha recibido ningun retroenlace';
 $messages['error_incorrect_article_id'] = 'El identificador del artículo no es correcto';
 $messages['error_incorrect_blog_id'] = 'El identificador de la bitácora no es correcto';
@@ -105,6 +106,8 @@
 $messages['error_no_search_results'] = 'No se encontraros artículos que se correspondan con los términos de la búsqueda.';
 $messages['error_no_albums_defined'] = 'No hay ningun álbum disponible en esta bitácora.';
 $messages['error_incorrect_category_id'] = 'El identificador de la categoría no es correcto o no se seleccionaron categorías a borrar';
+$messages['error_incorrect_user'] = 'El usuario no es válido';
+
 $messages['posted_in'] = 'Publicado en';
 $messages['form_authenticated'] = 'Autentificado';
 $messages['previous_post'] = 'Anterior';
@@ -116,4 +119,8 @@
 $messages['admin'] = 'Administración';
 $messages['guestbook'] = 'Libro de visitas';
 $messages['num_reads'] = 'Lecturas';
-?>
\ No newline at end of file
+
+$messages['error_fetching_resource'] = 'El fichero no se pudo encontrar.';
+$messages['contact_me'] = 'Contactar';
+$messages['required'] = 'Obligatorio';
+?>

Modified: plog/trunk/locale/locale_fr_FR.php
===================================================================
--- plog/trunk/locale/locale_fr_FR.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_fr_FR.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -97,6 +97,7 @@
 ////// error messages /////
 $messages["error_fetching_article"] = "Article introuvable.";
 $messages["error_fetching_articles"] = "Articles introuvables.";
+$messages['error_fetching_category'] = 'There was an error fetching the category'; // translate
 $messages["error_trackback_no_trackback"] = "Aucun TrackBack.";
 $messages["error_incorrect_article_id"] = "Identifiant d'article incorrect.";
 $messages["error_incorrect_blog_id"] = "Identifiant de blog incorrect.";
@@ -110,6 +111,7 @@
 $messages["error_incorrect_search_terms"] = "Les mots clés ne sont pas valides";
 $messages["error_no_search_results"] = "Recherche infructueuse";
 $messages["error_no_albums_defined"] = "Il n'y a pas d'album dans ce blog";
+$messages['error_incorrect_user'] = "Utilisateur invalide"; //'User is not valid';
 
 $messages['form_authenticated'] = 'Authentifié';
 $messages['posted_in'] = 'Posté dans';
@@ -127,5 +129,8 @@
 
 $messages['num_reads'] = 'Vus';
 $messages["error_incorrect_category_id"] = "L'ID de la catégorie n'est pas correct ou aucun élément sélectionné";
-$messages["error_incorrect_email_address"] = "Adresse email incorrecte";
+$messages["error_incorrect_email_address"] = "Adresse email incorrecte";
+$messages['error_fetching_resource'] = 'The file you specified could not be found.';
+$messages['contact_me'] = 'Contact Me';
+$messages['required'] = 'Required';
 ?>

Modified: plog/trunk/locale/locale_it_IT.php
===================================================================
--- plog/trunk/locale/locale_it_IT.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_it_IT.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -94,6 +94,7 @@
 ////// error messages /////
 $messages['error_fetching_article'] = 'L\'articolo richiesto non può essere trovato.';
 $messages['error_fetching_articles'] = 'Impossibile selezionare gli articoli';
+$messages['error_fetching_category'] = 'There was an error fetching the category'; // translate
 $messages['error_trackback_no_trackback'] = 'Non sono presenti trackback per l\'articolo.';
 $messages['error_incorrect_article_id'] = 'Identificativo dell\'articolo non corretto.';
 $messages['error_incorrect_blog_id'] = 'Identificativo del blog non corretto.';
@@ -106,6 +107,7 @@
 $messages['error_incorrect_search_terms'] = 'Se non sai quello che cerchi, non riuscirai a trovarlo ;-)'; 
 $messages['error_no_search_results'] = 'Non ci sono elementi che soddisfano i criteri di ricerca';
 $messages['error_no_albums_defined'] = 'Non ci sono album in questo blog.';
+$messages['error_incorrect_user'] = 'Utente non valido';
 
 $messages['comment_default_title'] = '(Senza titolo)';
 $messages['error_incorrect_category_id'] = 'L\'id della categoria non è corretto o nessun elemento selezionato';
@@ -122,5 +124,9 @@
 $messages['links'] = 'Link';
 
 // missing strings //
-$messages['num_reads'] = 'Letture';
-?>
\ No newline at end of file
+$messages['num_reads'] = 'Letture';
+
+$messages['error_fetching_resource'] = 'Il file specificato non è stato trovato.';
+$messages['contact_me'] = 'Contattami';
+$messages['required'] = 'Richiesto';
+?>

Modified: plog/trunk/locale/locale_nl_NL.php
===================================================================
--- plog/trunk/locale/locale_nl_NL.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_nl_NL.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -95,6 +95,7 @@
 ////// error messages /////
 $messages['error_fetching_article'] = 'Het opgevraagde artikel is niet gevonden.';
 $messages['error_fetching_articles'] = 'Het artikel kan niet worden opgevraagd.';
+$messages['error_fetching_category'] = 'There was an error fetching the category'; // translate
 $messages['error_trackback_no_trackback'] = 'Er zijn geen trackbacks gevonden voor dit artikel.';
 $messages['error_incorrect_article_id'] = 'Het artikel ID bestaat.';
 $messages['error_incorrect_blog_id'] = 'Het blog ID gestaat niet.';
@@ -108,6 +109,7 @@
 $messages['error_no_search_results'] = 'Er zijn geen resultaten gevonden die voldoen aan de zoekopdracht';
 $messages['error_no_albums_defined'] = 'Er zijn geen albums beschikbaar in deze blog.';
 $messages['error_incorrect_category_id'] = 'De categorie id is niet juist of er werden geen items geselecteerd';
+$messages['error_incorrect_user'] = 'Gebruiker is niet correct';
 
 $messages['form_authenticated'] = 'Geauthenticeerd';
 $messages['posted_in'] = 'Gepubliceerd in';
@@ -125,4 +127,8 @@
 
 $messages['links'] = 'Links';
 $messages['categories'] = 'Categorieen';
-?>
\ No newline at end of file
+
+$messages['error_fetching_resource'] = 'Het door u aangewezen document kan niet worden gevonden.';
+$messages['contact_me'] = 'Contacteer Mij';
+$messages['required'] = 'Verplicht';
+?>

Modified: plog/trunk/locale/locale_zh_CN.php
===================================================================
--- plog/trunk/locale/locale_zh_CN.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_zh_CN.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -30,7 +30,7 @@
 
 // months of the year
 $messages['months'] = Array( '元月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月');
-$messages['monthsshort'] = Array( '元', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二' );
+$messages['monthsshort'] = Array( '元月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月');
 // -- compatibility, do not touch -- //
 $messages['January'] = $messages['months'][0];
 $messages['February'] = $messages['months'][1];
@@ -96,6 +96,7 @@
 ////// error messages /////
 $messages['error_fetching_article'] = '找不到您所指定的文章。';
 $messages['error_fetching_articles'] = '找不到您所指定的文章。';
+$messages['error_fetching_category'] = 'There was an error fetching the category'; // translate
 $messages['error_trackback_no_trackback'] = '尚未有人向本文发送引用通告。';
 $messages['error_incorrect_article_id'] = '文章 ID 错误。';
 $messages['error_incorrect_blog_id'] = '博客站台 ID 错误。';
@@ -109,6 +110,8 @@
 $messages['error_no_search_results'] = '找不到与关键字相符的项目。';
 $messages['error_no_albums_defined'] = '这个博客站台没有任何文件夹。';
 $messages['error_incorrect_category_id'] = '文章分类 ID 错误。';
+$messages['error_fetching_resource'] = '读取文件信息时发生错误。';
+$messages['error_incorrect_user'] = '不合法的用户';
 
 $messages['form_authenticated'] = '已登入';
 $messages['posted_in'] = '发表于';
@@ -123,6 +126,9 @@
 $messages['admin'] = '管理介面';
 $messages['links'] = '网站链接';
 $messages['categories'] = '文章分类';
+$messages['articles'] = '文章数';
 
 $messages['num_reads'] = '阅读';
+$messages['contact_me'] = '联络我';
+$messages['required'] = 'å¿…å¡«';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/locale_zh_TW.php
===================================================================
--- plog/trunk/locale/locale_zh_TW.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/locale/locale_zh_TW.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -30,7 +30,7 @@
 
 // months of the year
 $messages['months'] = Array( '元月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月');
-$messages['monthsshort'] = Array( '元', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二' );
+$messages['monthsshort'] = Array( '元月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月');
 // -- compatibility, do not touch -- //
 $messages['January'] = $messages['months'][0];
 $messages['February'] = $messages['months'][1];
@@ -96,6 +96,7 @@
 ////// error messages /////
 $messages['error_fetching_article'] = '找不到您所指定的文章。';
 $messages['error_fetching_articles'] = '找不到您所指定的文章。';
+$messages['error_fetching_category'] = '找不到您所指定的分類';
 $messages['error_trackback_no_trackback'] = '尚未有人向本文發送引用通告。';
 $messages['error_incorrect_article_id'] = '文章 ID 錯誤。';
 $messages['error_incorrect_blog_id'] = '網誌站台 ID 錯誤。';
@@ -109,6 +110,8 @@
 $messages['error_no_search_results'] = '找不到與關鍵字相符的項目。';
 $messages['error_no_albums_defined'] = '這個網誌站台沒有任何資料夾。';
 $messages['error_incorrect_category_id'] = '文章分類 ID 錯誤。';
+$messages['error_fetching_resource'] = '讀取檔案資訊時發生錯誤。';
+$messages['error_incorrect_user'] = '不合法的使用者';
 
 $messages['form_authenticated'] = '已登入';
 $messages['posted_in'] = '發表於';
@@ -123,6 +126,9 @@
 $messages['admin'] = '管理介面';
 $messages['links'] = '網站連結';
 $messages['categories'] = '文章分類';
+$messages['articles'] = '文章數';
 
 $messages['num_reads'] = '閱讀';
+$messages['contact_me'] = '聯絡我';
+$messages['required'] = 'å¿…å¡«';
 ?>
\ No newline at end of file

Modified: plog/trunk/plugins/badbehavior/bad-behavior/admin.inc.php
===================================================================
--- plog/trunk/plugins/badbehavior/bad-behavior/admin.inc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/bad-behavior/admin.inc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -48,7 +48,7 @@
 	<div class="wrap">
 	<h2><?php _e("Bad Behavior"); ?></h2>
 	<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
-	<p>For more information please visit the <a href="http://www.homelandstupidity.us/software/bad-behavior/">Bad Behavior</a> homepage.</p>
+	<p>For more information please visit the <a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> homepage.</p>
 	<p>If you find Bad Behavior valuable, please consider making a <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=error%40ioerror%2eus&item_name=Bad%20Behavior%20<?php echo BB2_VERSION; ?>%20%28From%20Admin%29&no_shipping=1&cn=Comments%20about%20Bad%20Behavior&tax=0&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8">financial contribution</a> to further development of Bad Behavior.</p>
 
 	<fieldset class="options">

Modified: plog/trunk/plugins/badbehavior/bad-behavior/blacklist.inc.php
===================================================================
--- plog/trunk/plugins/badbehavior/bad-behavior/blacklist.inc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/bad-behavior/blacklist.inc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -31,9 +31,11 @@
 		"Mozilla/4.0(",		// from honeypot
 		"Mozilla/4.0+(",	// suspicious harvester
 		"MSIE",			// malicious software
+		"NutchCVS",		// unidentified robots
 		"OmniExplorer",		// spam harvester
+		"psycheclone",		// spam harvester
 		"PussyCat ",		// misc comment spam
-		"psycheclone",		// spam harvester
+		"PycURL",		// misc comment spam
 		"Shockwave Flash",	// spam harvester
 		"User Agent: ",		// spam harvester
 		"User-Agent: ",		// spam harvester
@@ -59,6 +61,7 @@
 		".NET CLR 1)",		// free poker, etc.
 		"POE-Component-Client",	// free poker, etc.
 		"Turing Machine",	// www.anonymizer.com abuse
+		"WebaltBot",		// spam harvester
 		"WISEbot",		// spam harvester
 		"WISEnutbot",		// spam harvester
 		"Windows NT 4.0;)",	// wikispam bot

Modified: plog/trunk/plugins/badbehavior/bad-behavior/common_tests.inc.php
===================================================================
--- plog/trunk/plugins/badbehavior/bad-behavior/common_tests.inc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/bad-behavior/common_tests.inc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -29,15 +29,19 @@
 	}
 
 	// Broken spambots send URLs with various invalid characters
-	if (strpos($package['request_uri'], "#") !== FALSE || strpos($package['headers_mixed']['Referer'], "#") !== FALSE) {
+	// Some broken browsers send the #vector in the referer field :(
+	// if (strpos($package['request_uri'], "#") !== FALSE || strpos($package['headers_mixed']['Referer'], "#") !== FALSE) {
+	if (strpos($package['request_uri'], "#") !== FALSE) {
 		return "dfd9b1ad";
 	}
 
 	// Range: field exists and begins with 0
 	// Real user-agents do not start ranges at 0
 	// NOTE: this blocks the whois.sc bot. No big loss.
+	// Exceptions: MT (not fixable); LJ (refuses to fix; may be
+	// blocked again in the future)
 	if (array_key_exists('Range', $package['headers_mixed']) && strpos($package['headers_mixed']['Range'], "=0-") !== FALSE) {
-		if (strncmp($ua, "MovableType", 11)) {
+		if (strncmp($ua, "MovableType", 11) && strncmp($ua, "URI::Fetch", 10)) {
 			return "7ad04a8a";
 		}
 	}
@@ -48,7 +52,10 @@
 	}
 
 	// Lowercase via is used by open proxies/referrer spammers
-	if (array_key_exists('via', $package['headers'])) {
+	// Exceptions: Clearswift uses lowercase via (refuses to fix;
+	// may be blocked again in the future)
+	if (array_key_exists('via', $package['headers']) &&
+		!strstr($package['headers']['via'],'Clearswift Web Policy Engine')) {
 		return "9c9e4979";
 	}
 

Modified: plog/trunk/plugins/badbehavior/bad-behavior/functions.inc.php
===================================================================
--- plog/trunk/plugins/badbehavior/bad-behavior/functions.inc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/bad-behavior/functions.inc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -44,12 +44,9 @@
 			}
 		}
 	} else {
-		// Oscar: FIXED A NOTICE IN PHP5
-		$hostInfo =  explode('/', $cidr);
-		isset( $hostInfo[0] ) ? $ip = $hostInfo[0] : $ip = "0.0.0.0";
-		isset( $hostInfo[1] ) ? $mask = $hostInfo[1] : $mask = "8";		
-		//list($ip, $mask) = explode('/', $cidr);
-		$mask = 0xffffffff << (32 - $mask);
+		list($ip, $mask) = explode('/', $cidr);
+		if (!$mask) $mask = 32;
+		$mask = pow(2,32) - pow(2, (32 - $mask));
 		$output = ((ip2long($addr) & $mask) == (ip2long($ip) & $mask));
 	}
 	return $output;

Modified: plog/trunk/plugins/badbehavior/bad-behavior/post.inc.php
===================================================================
--- plog/trunk/plugins/badbehavior/bad-behavior/post.inc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/bad-behavior/post.inc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -5,10 +5,10 @@
 {
     // LifeType mod by pwestbro: dns blacklist checks can be done in the 
     // dnsantispam plugin.
-//	// Check blackhole lists for known spam/malicious activity
-//	require_once(BB2_CORE . "/blackhole.inc.php");
-//	bb2_test($settings, $package, bb2_blackhole($package));
 
+	// Check blackhole lists for known spam/malicious activity
+	// require_once(BB2_CORE . "/blackhole.inc.php");
+	// bb2_test($settings, $package, bb2_blackhole($package));
 	// MovableType needs specialized screening
 	if (stripos($package['headers_mixed']['User-Agent'], "MovableType") !== FALSE) {
 		if (strcmp($package['headers_mixed']['Range'], "bytes=0-99999")) {
@@ -48,8 +48,8 @@
 		// Posting too slow? 48 hr
         // LifeType mod by jondaley: since pages can be cached, the cookie might not be updated
         // and this can get tripped incorrectly
-//		if ($screener + 172800 < time())
-//			return "b40c8ddc";
+		// if ($screener + 172800 < time())
+		//     return "b40c8ddc";
 
 		// Screen by IP address
 		$ip = ip2long($package['ip']);
@@ -60,10 +60,10 @@
 
 		// Screen for user agent changes
 		// User connected previously with blank user agent
-		$q = bb2_db_query("SELECT `ip` FROM " . $settings['log_table'] . " WHERE (`ip` = '" . $package['ip'] . "' OR `ip` = '" . $screener[1] . "') AND `user_agent` != '" . $package['user_agent'] . "' AND `date` > DATE_SUB('" . bb2_db_date() . "', INTERVAL 5 MINUTE)");
+//		$q = bb2_db_query("SELECT `ip` FROM " . $settings['log_table'] . " WHERE (`ip` = '" . $package['ip'] . "' OR `ip` = '" . $screener[1] . "') AND `user_agent` != '" . $package['user_agent'] . "' AND `date` > DATE_SUB('" . bb2_db_date() . "', INTERVAL 5 MINUTE)");
 		// Damnit, too many ways for this to fail :(
-		if ($q !== FALSE && $q != NULL && bb2_db_num_rows($q) > 0)
-			return "799165c2";
+//		if ($q !== FALSE && $q != NULL && bb2_db_num_rows($q) > 0)
+//			return "799165c2";
 	}
 
 	return false;

Modified: plog/trunk/plugins/badbehavior/bad-behavior/version.inc.php
===================================================================
--- plog/trunk/plugins/badbehavior/bad-behavior/version.inc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/bad-behavior/version.inc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,3 +1,3 @@
 <?php if (!defined('BB2_CWD')) die("I said no cheating!");
-define('BB2_VERSION', "2.0.8");
+define('BB2_VERSION', "2.0.10");
 ?>

Modified: plog/trunk/plugins/badbehavior/bad-behavior/whitelist.inc.php
===================================================================
--- plog/trunk/plugins/badbehavior/bad-behavior/whitelist.inc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/bad-behavior/whitelist.inc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -16,7 +16,6 @@
 		"172.16.0.0/12",
 		"192.168.0.0/16",
 //		"127.0.0.1",
-		"208.54.95.129",
 	);
 
 	// DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER! DANGER!

Modified: plog/trunk/plugins/badbehavior/index.inc.php
===================================================================
--- plog/trunk/plugins/badbehavior/index.inc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/index.inc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -41,7 +41,7 @@
 	
 	// Return affected rows from most recent query.
 	function bb2_db_affected_rows() {
-		include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
+		lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
 		$db =& Db::getDb();
 		
 		return $db->Affected_Rows();
@@ -49,7 +49,7 @@
 	
 	// Escape a string for database usage
 	function bb2_db_escape($string) {
-	    include_once( PLOG_CLASS_PATH."class/database/db.class.php" );    
+	    lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );    
 
 		return Db::qstr($string);
 	}
@@ -62,7 +62,7 @@
 	// Run a query and return the results, if any.
 	// Should return FALSE if an error occurred.
 	function bb2_db_query($query) {
-	    include_once( PLOG_CLASS_PATH."class/database/db.class.php" );    
+	    lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );    
 		$db =& Db::getDb();
 
 	    $result = $db->Execute( $query );
@@ -92,8 +92,8 @@
 
 	// retrieve settings from lifetype config
 	function bb2_read_settings() {
-	    include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
-	    include_once( PLOG_CLASS_PATH."class/config/config.class.php" );    
+	    lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
+	    lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );    
 		$config =& Config::getConfig();
 		$prefix = Db::getPrefix();
 		$logTable = $config->getValue( 'bb2_log_table', BB2_DEFAULT_LOG_TABLE );
@@ -111,7 +111,7 @@
 	
 	// write settings to lifetype config
 	function bb2_write_settings($settings) {
-	    include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+	    lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 		$config =& Config::getConfig();
 		$config->setValue( 'bb2_log_table', BB2_DEFAULT_LOG_TABLE );
 		$config->setValue( 'bb2_display_stats', $settings['display_stats'] );
@@ -134,7 +134,7 @@
 	
 	// Return the top-level relative path of wherever we are (for cookies)
 	function bb2_relative_path() {
-	    include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
+	    lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 		$config =& Config::getConfig();
 		
 		$url = parse_url( $config->getValue( 'base_url' ) );
@@ -149,7 +149,7 @@
 	}
 	
 	// Load Bad Behavior Core
-	require_once(BB2_CWD . "bad-behavior/core.inc.php");
+	lt_include(BB2_CWD . "bad-behavior/core.inc.php");
 	bb2_install();
 	$settings = bb2_read_settings();
 	bb2_start($settings);

Copied: plog/trunk/plugins/badbehavior/locale/locale_de_DE.php (from rev 5367, plog/branches/lifetype-1.2/plugins/badbehavior/locale/locale_de_DE.php)
===================================================================
--- plog/trunk/plugins/badbehavior/locale/locale_de_DE.php	                        (rev 0)
+++ plog/trunk/plugins/badbehavior/locale/locale_de_DE.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -0,0 +1,3 @@
+<?php
+$messages["bb2_status"] = '<p><a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> hat in den letzten 7 Tagen <strong>%s</strong> Zugriffsversuche geblockt.</p>'
+?>

Modified: plog/trunk/plugins/badbehavior/locale/locale_en_UK.php
===================================================================
--- plog/trunk/plugins/badbehavior/locale/locale_en_UK.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/locale/locale_en_UK.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,3 +1,3 @@
 <?php
-$messages["bb2_status"] = '<p><a href="http://www.homelandstupidity.us/software/bad-behavior/">Bad Behavior</a> has blocked <strong>%s</strong> access attempts in the last 7 days.</p>'
-?>
\ No newline at end of file
+$messages["bb2_status"] = '<p><a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> has blocked <strong>%s</strong> access attempts in the last 7 days.</p>'
+?>

Modified: plog/trunk/plugins/badbehavior/locale/locale_zh_TW.php
===================================================================
--- plog/trunk/plugins/badbehavior/locale/locale_zh_TW.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/locale/locale_zh_TW.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,3 +1,3 @@
 <?php
-$messages["bb2_status"] = '<p><a href="http://www.homelandstupidity.us/software/bad-behavior/">Bad Behavior</a> 已經阻擋了 <strong>%s</strong> 個過去 7 天試圖闖關的垃圾迴響與引用。</p>'
-?>
\ No newline at end of file
+$messages["bb2_status"] = '<p><a href="http://www.bad-behavior.ioerror.us/">Bad Behavior</a> 已經阻擋了 <strong>%s</strong> 個過去 7 天試圖闖關的垃圾迴響與引用。</p>'
+?>

Modified: plog/trunk/plugins/badbehavior/pluginbadbehavior.class.php
===================================================================
--- plog/trunk/plugins/badbehavior/pluginbadbehavior.class.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/pluginbadbehavior.class.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,15 +1,16 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-	include_once( PLOG_CLASS_PATH."class/database/db.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/database/db.class.php" );
 	
 	/**
-	 * makes printable versions of posts
+	 * The Bad Behaviour Plugin
+	 * TODO: some useful documentation here
 	 */
 	class PluginBadBehavior extends PluginBase
 	{
 		var $_logTable;
-		var $_diasplyStatus;
+		var $_displayStatus;
 		
 		function PluginBadBehavior()
 		{

Modified: plog/trunk/plugins/badbehavior/readme.txt
===================================================================
--- plog/trunk/plugins/badbehavior/readme.txt	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/plugins/badbehavior/readme.txt	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,25 +1,18 @@
 Plugin: Bad Behavior Integration
 Author: The LifeType Team
 Release Date: 2006/07/25
-Version: 1.0
 
-This plugin offers anti-spam protection powerd by bad behavior http://error.wordpress.com/
+This plugin offers anti-spam protection powered by Bad Behavior (http://www.bad-behavior.ioerror.us/).
 
-1. Copy the badbehavior folder to your plugins folder
-2. Add the following lines to the top of index.php (try after the
-          other include_once lines)
+Although Bad Behavior is already included with LifeType since version 1.2 you might need to configure your template to take full advantage of Bad Behavior. Follow the steps below to add Bad Behavior to your template.
 
-    // Bad Behavior Check, hope this can stop most spam comments and trackbacks
-    include_once( PLOG_CLASS_PATH."plugins/badbehavior/index.inc.php" );
+1. Refresh the plugin center until you see the badbehavior plugin appers.
+2. Add the following scripts to header.template between <head></head>
 
-3. Refresh the plugin center until you see the badbehavior plugin appers.
-4. Add the following scripts to header.template between <head></head>
-
     {if !empty($badbehavior)}
       {$badbehavior->showBB2JavaScript()}
     {/if}
 
-5. That's All
 
 You also can use the followings method to get some useful information:
 1. Use {$badbehavior->showBB2Timer()} to get the badbehavior timer

Modified: plog/trunk/resserver.php
===================================================================
--- plog/trunk/resserver.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/resserver.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -12,7 +12,7 @@
         define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
     }
 
-	include_once( PLOG_CLASS_PATH."class/object/loader.class.php" );    
+	include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
     lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
 
 	// the functionality of the old ressever.php file have been moved

Modified: plog/trunk/runtests.php
===================================================================
--- plog/trunk/runtests.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/runtests.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,11 +1,11 @@
 <?php
 
-    define("DISABLE_TESTS", true);
+    define("ENABLE_TESTS", false);
 
 	define( "INCLUDE_PLUGIN_TESTS", true );
 
-    if(defined("DISABLE_TESTS")){
-        print "You must enable tests at the top of runtests, since it could represent a security risk";
+    if(!ENABLE_TESTS){
+        print "You must change <b>define(\"ENABLE_TESTS\", <font color=\"blue\">false</font>)</b> to <b>define(\"ENABLE_TESTS\", <font color=\"red\">true</font>)</b> at the top of runtests.php to enable the test runner, since it could represent a security risk.";
         die;
     }
 
@@ -13,7 +13,7 @@
 	   define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
 	}
 
-	include_once( PLOG_CLASS_PATH."class/object/loader.class.php" );
+	include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
 	lt_include( PLOG_CLASS_PATH."class/test/testrunner.class.php" );
 	lt_include( PLOG_CLASS_PATH."class/test/helpers/htmlreporter.class.php" );	
 	lt_include( PLOG_CLASS_PATH."class/test/helpers/consolereporter.class.php" );	
@@ -22,7 +22,7 @@
 	// if plugins should also be included when testing, let's load them now
 	$folders = Array( TEST_CLASS_FOLDER ); 
 	if( INCLUDE_PLUGIN_TESTS ) {
-		include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
+		lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
 	
 		$pm =& PluginManager::getPluginManager();
 		$plugins = $pm->getPluginListFromFolder();

Modified: plog/trunk/styles/summary.css
===================================================================
--- plog/trunk/styles/summary.css	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/styles/summary.css	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,324 +1,277 @@
-body 
-{
-    margin:0;
-    padding:0;
-    font-family : Arial, Verdana, Helvetica, sans-serif;
-    font-size : small;
-    background : #fff;
-    width : 100%;
-    color : #333333;
+body {
+   margin             : 0px;
+   padding            : 0px;
+   font-family        : Arial, Verdana, Helvetica, sans-serif;
+   font-size          : small;
+   background         : #fff;
+   width              : 100%;
+   color              : #333333;
 }
 
-body.column3 
-{
-   background : #fff;
+body.column3 {
+   background         : #fff;
 }
 
-body.column1 
-{
-   background : #fff;
+body.column1 {
+   background         : #fff;
 }
 
-#maincolumn p, #onecolumn p 
-{
-   margin:0;
-   padding:0;
+#maincolumn p, #onecolumn p {
+   margin             : 0px;
+   padding            : 0px;
 }
 
-#maincolumn h3, #onecolumn h3 
-{
-   margin:0;
-   margin-top:0px;
-   padding:0;
+#maincolumn h3, #onecolumn h3 {
+   margin             : 0px;
+   margin-top         : 0px;
+   padding            : 0px;
 }
 
-.code 
-{
-   color:#777;
+.code {
+   color              : #777;
 }
 
-.subtitle 
-{
-    color: #777;
+.subtitle {
+   color              : #777;
 }
     
-.postinfo 
-{
-    color: #777;
-    margin-bottom:12px;
-    padding-bottom:6px;
+.postinfo {
+   color              : #777;
+   margin-bottom      : 12px;
+   padding-bottom     : 6px;
 }
     
     
-.footer 
-{
-    margin-bottom:12px;
-    padding-bottom:12px;
+.footer {
+   margin-bottom      : 12px;
+   padding-bottom     : 12px;
 }
     
-.postgrav 
-{
-	float:left;
-	margin-right:10px;
-	margin-bottom:3px;
+.postgrav {
+   float              : left;
+   margin-right       : 10px;
+   margin-bottom      : 3px;
 }
 
-#topmenu .invisible, a.invisible 
-{
-    display: none;
-    font-weight: bold;
+#topmenu .invisible, a.invisible {
+    display           : none;
+    font-weight       : bold;
 }
 
-#wrapper 
-{
-   margin-left : auto;
-   margin-right : auto;
-   padding-left : 10px;
-   padding-right : 10px;
-   margin-top : 10px;
+#wrapper {
+   margin-left        : auto;
+   margin-right       : auto;
+   padding-left       : 10px;
+   padding-right      : 10px;
+   margin-top         : 10px;
     
 }
 
-#header 
-{
+#header {
     background: #ce6202;
-    margin-bottom: 6px;
-    color: #fff;
-    width : 98%;
-    height : 60px;
-    margin-bottom:0px;
-	background       : #FFFFFF url("../imgs/admin_logo.png") no-repeat left;
+    margin-bottom     : 6px;
+    color             : #fff;
+    width             : 98%;
+    height            : 60px;
+    margin-bottom     : 0px;
+    background        : #FFFFFF url("../imgs/admin_logo.png") no-repeat left;
 }
 
-#header h1 
-{
-   font-family : Arial Narrow, Verdana, Helvetica, sans-serif;
-   font-size : x-large;
-   margin: 0;
-   font-weight : normal;
-   padding: 0 6px 0px 6px;
+#header h1 {
+   font-family        : Arial Narrow, Verdana, Helvetica, sans-serif;
+   font-size          : x-large;
+   margin             : 0px;
+   font-weight        : normal;
+   padding            : 0px 6px 0px 6px;
 }
 
-.typo 
-{
-   font-family : Arial black, Arial, Verdana, Helvetica, sans-serif;
+.typo {
+   font-family        : Arial black, Arial, Verdana, Helvetica, sans-serif;
 }
 
-#footer a:hover, a:active 
-{ 
-	text-decoration : underline; 
-	color : #fff;
-	background-color: #006666; 
+#footer a:hover, a:active { 
+   text-decoration    : underline; 
+   color              : #fff;
+   background-color   : #006666; 
 }
 
-#onecolumn 
-{
-    float:left;
-    width:98%;
-    margin-bottom:12px;
+#onecolumn {
+    float             : left;
+    width             : 98%;
+    margin-bottom     : 12px;
 }
 
-#maincolumn 
-{
-    float:left;
-    width:49%;
+#maincolumn {
+    float             : left;
+    width             : 49%;
 }
 
-#intro 
-{
-   background-color:#efefef;
-   margin:0 0 12px 0;
-   padding:12px;
-   border:1px solid #cccccc
+#intro {
+   background-color   : #efefef;
+   margin             : 0px 0px 12px 0px;
+   padding            : 12px;
+   border             : 1px solid #cccccc;
 }
 
-#intro p 
-{
-   margin:0;
+#intro p {
+   margin            : 0px;
 }
 
-#intro h2 
-{
-    margin:12px 0 0px 0;
-    font-size : medium;
-    border-bottom: 0;
+#intro h2 {
+   margin            : 12px 0px 0px 0px;
+   font-size         : medium;
+   border-bottom     : 0px;
 }
 
-#intro li 
-{
-    font-weight : bold;
-    margin-top:5px;
+#intro li {
+   font-weight       : bold;
+   margin-top        : 5px;
 }
 
-#intro ol 
-{
-    margin-top:5px;
-    margin-bottom:5px;
+#intro ol {
+   margin-top        : 5px;
+   margin-bottom     : 5px;
 }
 
-#column 
-{
-    float:left;
-    width:49%;
+#column {
+   float             : left;
+   width             : 49%;
 }
 
-h2 
-{
-    margin:12px 0 12px 0;
-    border-bottom: 2px solid #cccccc;
-    font-size : small;
-    clear:both;
+h2 {
+   margin            : 12px 0px 12px 0px;
+   border-bottom     : 2px solid #cccccc;
+   font-size         : small;
+   clear             : both;
 }
 
-#boxes 
-{
-	width:300px;
-	float:right;
-	border-left:solid #fff 20px;
-	background-color:#fff
+#boxes {
+   width             : 300px;
+   float             : right;
+   border-left       : solid #fff 20px;
+   background-color  : #fff;
 }
 
-#searchbox, #categories 
-{
-	border:solid #cccccc 1px; 
-	padding:20px;
-	margin-bottom:10px
+#searchbox, #categories {
+   border            : solid #cccccc 1px; 
+   padding           : 20px;
+   margin-bottom     : 10px;
 }
 
-#categories p 
-{
-	color:#777;
+#categories p {
+   color             : #777;
 }
 
-#categories ul 
-{
-	list-style:none; 
-	margin:0;
-	padding:0;
-	line-height:25px;
+#categories ul {
+   list-style        : none; 
+   margin            : 0px;
+   padding           : 0px;
+   line-height       : 25px;
 }
 
-#categories li 
-{
-	display:inline;
-	margin-right:0.5em;
+#categories li {
+   display           : inline;
+   margin-right      : 0.5em;
 }
 
-#searchbox form 
-{
-	padding:0;
-	margin:0;
+#searchbox form {
+   padding           : 0px;
+   margin            : 0px;
 }
 
-#bloglist 
-{
-	clear:left;
+#bloglist {
+   clear             : left;
 }
 
-.subtitle
-{
-	color:#777;
+.subtitle{
+   color             : #777;
 }
 
-.pager 
-{
-	clear:left;
-	margin-top:2em;
+.pager {
+   clear             : left;
+   margin-top        : 2em;
 }
 
-#columncontainer 
-{ 
-   margin-bottom:12px;
-   margin-left:12px;
-   padding:0 12px 12px 12px; 
-   border : 1px solid #cccccc;
+#columncontainer { 
+   margin-bottom     : 12px;
+   margin-left       : 12px;
+   padding           : 0px 12px 12px 12px; 
+   border            : 1px solid #cccccc;
 }
 
-#columncontainer ul 
-{
-          margin-top:10px;
-          margin-bottom:30px;
+#columncontainer ul {
+    margin-top       : 10px;
+    margin-bottom    : 30px;
 }
 
-#columncontainer li 
-{
-          margin-bottom:8px;
+#columncontainer li {
+   margin-bottom     : 8px;
 }
 
 
-#columncontainer fieldset 
-{
-	border:1px solid #cccccc; 
-	padding-top:10px; 
-	margin-top:10px; 
-	padding-left:10px; 
-	padding-bottom:10px;
-	background-color:#efefef;
+#columncontainer fieldset {
+   border            : 1px solid #cccccc; 
+   padding-top       : 10px; 
+   margin-top        : 10px; 
+   padding-left      : 10px; 
+   padding-bottom    : 10px;
+   background-color  : #efefef;
 }
 
-h3 
-{
-   margin:0;
-   padding:0px;
-   font-size : small;
+h3 {
+   margin            : 0px;
+   padding           : 0px;
+   font-size         : small;
 }
 
-h3.faq 
-{
-   border-top:solid 1px #cccccc;
-   padding-top:10px !important;
+h3.faq {
+   border-top        : solid 1px #cccccc;
+   padding-top       : 10px !important;
 }
 
 h4 {
-   margin:0;
-   padding:0px;
-   font-size : small;
-   text-decoration:underline;
-   font-weight:normal;
+   margin            : 0px;
+   padding           : 0px;
+   font-size         : small;
+   text-decoration   : underline;
+   font-weight       : normal;
 }
 
-#footer 
-{
+#footer {
     text-align:center;
-    width:98%;
-    border-top: 2px solid #cccccc;
-    padding-top:6px;
-    padding-bottom:10px;
+    width            : 98%;
+    border-top       : 2px solid #cccccc;
+    padding-top      : 6px;
+    padding-bottom   : 10px;
 }
 
-a:link 
-{ 
-	color: #32609B; 
+a:link { 
+   color             : #32609B; 
 }
 
-a:visited 
-{
-	color: #223344; 
+a:visited {
+   color             : #223344; 
 }
 
-a:hover 
-{ 
-	text-decoration : none; 
-	background-color : #818181; 
-	color : #fff; 
+a:hover { 
+   text-decoration   : none; 
+   background-color  : #818181; 
+   color             : #fff; 
 }
 
-a img 
-{
-    border: 0;
+a img {
+    border           : 0px;
 }
 
-div.spacer 
-{
-   clear : both;
-   height : 2px;
-   font-size : 2px;
+div.spacer {
+   clear             : both;
+   height            : 2px;
+   font-size         : 2px;
 }
 
 
 
-textarea
-{
+textarea {
     background       : #FFFFFF;
     border           : 1px solid #cccccc;
     color            : #000000;
@@ -330,196 +283,168 @@
     padding	     : 2px;
 }
 
-fieldset 
-{
-	border:1px solid #cccccc; 
-	padding-top:10px; 
-	margin-top:10px; 
-	padding-left:10px; 
-	padding-bottom:10px;
+fieldset {
+   border             :1px solid #cccccc; 
+   padding-top        :10px; 
+   margin-top         :10px; 
+   padding-left       :10px; 
+   padding-bottom     :10px;
 }
 
-fieldset 
-{
-	border:1px solid #cccccc; 
-	padding-top:10px; 
-	margin-top:10px; 
-	padding-left:10px; 
-	padding-bottom:10px;
+fieldset {
+   border             :1px solid #cccccc; 
+   padding-top        :10px; 
+   margin-top         :10px; 
+   padding-left       :10px; 
+   padding-bottom     :10px;
 }
 
-legend 
-{
-	padding:2px 4px 2px 4px;
-	background-color: #ffffff;
-	font-weight : bold;
+legend {
+   padding            :2px 4px 2px 4px;
+   background-color   : #ffffff;
+   font-weight        : bold;
 }
 
-#registrationform label 
-{
-	display:block;
+#registrationform label {
+   display            :block;
 }
 
-#registrationform .formHelp 
-{
-	color:#777777
+#registrationform .formHelp {
+   color              :#777777;
 }
 
-#registrationform fieldset 
-{
-	padding:1em 2em 1em 2em
+#registrationform fieldset {
+   padding            :1em 2em 1em 2em;
 }
 
-#checkUserName
-{
-	width:150px;
+#checkUserName{
+   width              :150px;
 }
 
-#FormError 
-{
-	padding-bottom: 1em;
+#FormError {
+   padding-bottom     : 1em;
 }
 
-.field
-{
-    top              : 0;
-    left             : 0;
-    margin           : 0 1em 1em 0;
+.field {
+    top               : 0px;
+    left              : 0px;
+    margin            : 0px 1em 1em 0px;
 }
 
-.field .field
-{
-    margin           : 1em 0 0 0;
+.field .field {
+    margin            : 1em 0px 0px 0px;
 }
 
-.field label
-{
-    font-weight      : bold;
+.field label {
+    font-weight       : bold;
 }
 
-.field_checkbox
-{
-    top              : 0;
-    left             : 0;
+.field_checkbox {
+    top               : 0px;
+    left              : 0px;
 }
 
-.buttons 
-{
-	padding-top: 1em; 
-	float:right;
+.buttons {
+   padding-top        : 1em; 
+   float              : right;
 }
 	
-div.buttons input 
-{
-	width:150px;
+div.buttons input {
+   width              :150px;
 }
 
-.templateScreen 
-{
-	float:left; 
-	margin:1em 1em 1em 0;
+.templateScreen {
+   float              : left; 
+   margin             : 1em 1em 1em 0px;
 }
 
-div.templateScreen label 
-{
-	display:inline!important;
+div.templateScreen label {
+   display            :inline!important;
 }
 
-div.InfoText p 
-{
-	margin-bottom:1em !important;
+div.InfoText p {
+   margin-bottom      : 1em !important;
 }
 
-input.input 
-{
-	margin-top:8px;
-	margin-bottom:8px;
-	margin-left:10em;
-	width:6em;
+input.input {
+   margin-top         : 8px;
+   margin-bottom      : 8px;
+   margin-left        : 10em;
+   width              : 6em;
 }
 
-div.clearleft 
-{
-   clear : left;
-   height : 0;
-   font-size : 0;
-   line-height : 0px;
+div.clearleft {
+   clear              : left;
+   height             : 0px;
+   font-size          : 0px;
+   line-height        : 0px;
 }
 
-div.clear 
-{
-   clear : both;
-   height : 0;
-   font-size : 0;
-   line-height : 0px;
+div.clear {
+   clear              : both;
+   height             : 0px;
+   font-size          : 0px;
+   line-height        : 0px;
 }
 
 /* -------------------------------------------------------------- */
 /* Navigation/menu bar                                            */
 /* -------------------------------------------------------------- */
 
-#menubar
-{
-    margin-bottom    : 10px;
-    background       : #FFFFFF url("../imgs/bg_menu.jpg") repeat-x;
-    height           : 24px;
+#menubar {
+    margin-bottom     : 10px;
+    background        : #FFFFFF url("../imgs/bg_menu.jpg") repeat-x;
+    height            : 24px;
 }
 
-#menu
-{
-    padding-top      : 1px;
-    padding-bottom   : 1px;
-/* 	border-bottom    : 1px solid #DEDEDE; */
+#menu {
+    padding-top       : 1px;
+    padding-bottom    : 1px;
+/*  border-bottom     : 1px solid #DEDEDE; */
 }
 
-#menu ul
-{
-    padding         : .2em 0;
-    margin          : 0;
-    list-style-type : none;
-    color           : #FFF;
-    width           : 100%;
-    text-align      : center;
+#menu ul {
+    padding           : .2em 0px;
+    margin            : 0px;
+    list-style-type   : none;
+    color             : #FFF;
+    width             : 100%;
+    text-align        : center;
 }
 
-#menu li
-{
+#menu li {
 
-    position         : relative;
-    padding          : 0;
-    border-left      : 0px solid #B4B4B4;
-    display          : inline;
-    font-weight      : bold;
-    font-family      : arial, verdana, tahoma, sans-serif;
-    font-size        : 1em;
-    letter-spacing   : 0.20em;
-    text-transform   : uppercase;
+    position          : relative;
+    padding           : 0px;
+    border-left       : 0px solid #B4B4B4;
+    display           : inline;
+    font-weight       : bold;
+    font-family       : arial, verdana, tahoma, sans-serif;
+    font-size         : 1em;
+    letter-spacing    : 0.20em;
+    text-transform    : uppercase;
 }
 
-#menu a, #menu a:link, #menu a:visited
-{
-    padding          : .2em 1em;
-    color            : #0E3862;
-    text-decoration  : none;
+#menu a, #menu a:link, #menu a:visited {
+    padding           : .2em 1em;
+    color             : #0E3862;
+    text-decoration   : none;
 }
 
-#menu a:hover
-{
-    background       : #818181;
-    color            : #FFFFFF;
+#menu a:hover {
+    background        : #818181;
+    color             : #FFFFFF;
 }
 
-#menu li.selected
-{
-    display          : block;
-    width            : auto;
-    padding          : 2px 7px;
-    background       : #FFFFFF;
-    color            : #000000;
-    border-bottom    : 1px solid #FFFFFF;
+#menu li.selected {
+    display           : block;
+    width             : auto;
+    padding           : 2px 7px;
+    background        : #FFFFFF;
+    color             : #000000;
+    border-bottom     : 1px solid #FFFFFF;
 }
 
-#menu br
-{
-    clear: both;
+#menu br {
+    clear             : both;
 }

Modified: plog/trunk/summary.php
===================================================================
--- plog/trunk/summary.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/summary.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -41,7 +41,4 @@
     //// main part ////
     $controller = new SummaryController();
     $controller->process( HttpVars::getRequest());
-    
-    // log statistics, only for debugging purposes
-    Info::logMetrics();
 ?>

Modified: plog/trunk/templates/LifeType/en_UK/strings.txt
===================================================================
--- plog/trunk/templates/LifeType/en_UK/strings.txt	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/LifeType/en_UK/strings.txt	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 ltTagline = """LifeType is an open-source blogging platform with support for multiple blogs and users
 in a single installation."""
 
-frontPageLeft = """The latest stable version of LifeType is <b>1.2</b>. Click the link below to download.<br/>
+frontPageLeft = """The latest stable version of LifeType is <b>1.2.1</b>. Click the link below to download.<br/>
 Take a look at the <a href="http://www.lifetype.net/blog.php/lifetype-development-journal/page/downloads">Downloads</a> section for more download packages,
 additional template sets and plugins."""
 
@@ -253,7 +253,7 @@
 
 <p>If you wish to check out a certain branch or tag, replace /trunk with /branch/branch-name or /tags/tag-name:</p>
 <pre>
-svn checkout http://devel.lifetype.net/svn/plog/plog/tags/lifetype-1.2
+svn checkout http://devel.lifetype.net/svn/plog/plog/tags/lifetype-1.2.1
 </pre>
 
 
@@ -299,9 +299,9 @@
 These are the official downloadable packages containing the most recent stable version. Packages
 are available compressed in either .tar.gz or .zip, and are provided via SourceForge.net.
 <br/><br/>
-<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.2.tar.gz?download">LifeType 1.2 (tar.gz format)</a><br/>
-<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.2.tar.bz2?download">LifeType 1.2 (tar.bz2 format)</a><br/>
-<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.2.zip?download">LifeType 1.2 (zip format)</a><br/>
+<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.2.1.tar.gz?download">LifeType 1.2.1 (tar.gz format)</a><br/>
+<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.2.1.tar.bz2?download">LifeType 1.2.1 (tar.bz2 format)</a><br/>
+<a href="http://prdownloads.sourceforge.net/lifetype/lifetype-1.2.1.zip?download">LifeType 1.2.1 (zip format)</a><br/>
 </p>
 
 <h2>Plugins</h2>
@@ -317,7 +317,7 @@
 <h2>Development Versions</h2>
 <a name="development_versions"></a>
 <p>
-The current development version is <b>LifeType 1.2</b>. To take the current development version for a spin you may get one of the <a href="http://lifetype.net/snapshots/">daily snapshots</a> or check out the code via our <a href="http://www.lifetype.net/blog.php/lifetype-development-journal/page/development#subversion_repository">Subversion repository</a>. Keep in mind, that the development version is not ment for use in production and any snapshot may or may not work out of the box.
+The current development version is <b>LifeType 1.3</b>. To take the current development version for a spin you may get one of the <a href="http://lifetype.net/snapshots/">daily snapshots</a> or check out the code via our <a href="http://www.lifetype.net/blog.php/lifetype-development-journal/page/development#subversion_repository">Subversion repository</a>. Keep in mind, that the development version is not ment for use in production and any snapshot may or may not work out of the box.
 </p>
 
 
@@ -472,7 +472,11 @@
 <p>
 LifeType 1.0 was released in April 2005, with LifeType 1.0.6 being the last maintenance release of the 1.0.x
 branch in June 2006. LifeType 1.0 marked the beginning of a new era for LifeType, with a modernized user interface and plenty of
-exciting features for bloggers. Lifetype 1.2 was released on the 20th of March 2007 and brought a new fine-grained permission framework, performance improvements when serving files and plenty of other performance improvements.
+exciting features for bloggers. Lifetype 1.2 was released on the 20th
+of March 2007 and brought a new fine-grained permission framework,
+performance improvements when serving files and plenty of other
+performance improvements. The current bugfix release of the 1.2 branch
+is LifeType 1.2.1, released in April 2007.
 </p>
 
 <h4>Relationship between LifeType and pLog</h4>

Modified: plog/trunk/templates/admin/addbloguser.template
===================================================================
--- plog/trunk/templates/admin/addbloguser.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/addbloguser.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=newBlogUser title=$locale->tr("newBlogUser")}
 
- <form name="addBlogUser" action="admin.php" method="post">
+ <form name="addBlogUser" id="addBlogUser" action="admin.php" method="post">
    <fieldset class="inputField">
   
      <legend>{$locale->tr("newBlogUser")}</legend>
@@ -13,7 +13,8 @@
       <div class="formHelp">{$locale->tr("new_blog_username_help")}</div>
       <input type="text" id="userName" name="newBlogUserName" value="{$newBlogUserName}" style="width:50%" />
 	  {check_perms adminperm=view_users}
-	   <a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
+	   {* <a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');"> *}
+	   <a href="?op=siteUsersChooser" rel="gb_page[600, 450]">
 		{$locale->tr("select")}
 	   </a>
 	   <input type="hidden" id="userId" name="userId" value="" />		
@@ -32,6 +33,13 @@
      <div class="field">
       <label for="perm">{$locale->tr("permissions")}</label>
       <div class="formHelp">{$locale->tr("blog_user_permissions_help")}</div>     
+        {$locale->tr("quick_permission_selection")}
+        </br>
+        <select name="preselection" onChange="togglePermissionSets('addBlogUser', this.value);">
+          <option value=""/>{$locale->tr("select")}</option>
+          <option value="basic_blog_permission"/>{$locale->tr("basic_blog_permission")}</option>
+          <option value="full_blog_permission"/>{$locale->tr("full_blog_permission")}</option>
+        </select><br/>
      	{foreach from=$perms item=permission}
      	 {if !$permission->isAdminOnlyPermission()}
   		   {assign var=permId value=$permission->getId()}

Modified: plog/trunk/templates/admin/chooser/resourcelist.template
===================================================================
--- plog/trunk/templates/admin/chooser/resourcelist.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/chooser/resourcelist.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,12 +1,14 @@
 {include file="$admintemplatepath/chooser/header.template"}
 <script type="text/javascript" src="js/tinymce/tiny_mce-plog-resourcelist.js"></script>
 <script type="text/javascript" src="js/ui/plogui.js"></script>
+
 {if $htmlarea}
   <script type="text/javascript" src="js/tinymce/tiny_mce_popup.js"></script>
   <script type="text/javascript">
    tinyMCE.setWindowArg('mce_windowresize', false);
   </script>
 {/if}
+
 {literal}
 <style>
 #resource_list_upload
@@ -16,22 +18,16 @@
 	text-align: left;
 }
 </style>
-{/literal}
+
 <script type="text/javascript">
-	var albumLink = '{$albumlink}';
-	var resourceLink = '{$resourcelink}';
-	var resourcePreviewLink = '{$resourcepreviewlink}';
-	var resourceMediumPreviewLink = '{$resourcemediumpreviewlink}';		
-</script>
-<script type="text/javascript">
-{literal}
 YAHOO.util.Event.addListener( window, "load", function() {
 		var t = new Lifetype.UI.TableEffects( "list" );
 		t.stripe();
 		t.highlightRows();
 	});
-{/literal}
 </script>
+{/literal}
+
 <div id="list_nav_bar">
 <div id="list_nav_select"> 
 <form id="resourceListAlbum" action="admin.php" method="post">
@@ -42,18 +38,17 @@
 	<br />
     <select name="albumId" id="albumId">
       <option value="0">{$locale->tr("root_album")}</option>
-   {foreach from=$albumsList item=albumItem}
-     {assign var=indentLevel value=$albumItem->getValue("level")}
-	 <option value="{$albumItem->getId()}" {if $album}{if $album->getName()==$albumItem->getName()}selected="selected"{/if}{/if}>
-	   {textformat indent=$indentLevel indent_char="&nbsp;&nbsp;&nbsp;"}{$albumItem->getName()}{/textformat}   
-	 </option>
-   {/foreach}
-   </select>
+	  {foreach from=$albumsList item=albumItem}
+	    {assign var=indentLevel value=$albumItem->getValue("level")}
+		<option value="{$albumItem->getId()}" {if $album}{if $album->getName()==$albumItem->getName()}selected="selected"{/if}{/if}>
+		  {textformat indent=$indentLevel indent_char="&nbsp;&nbsp;&nbsp;"}{$albumItem->getName()}{/textformat}   
+		</option>
+	  {/foreach}
+    </select>
    </div>
    <div class="list_nav_option">
     <br />
     <input type="hidden" name="op" value="resourceList" />
-    <input type="hidden" name="mode" value="{$destination}" />
     <input type="submit" name="Show" value="{$locale->tr("show")}" />
    </div>
   </fieldset> 
@@ -76,7 +71,7 @@
   {if $album && $pager->getCurrentPage()==1}
    <tr>
     <td>
-     <a href="admin.php?op=resourceList&amp;albumId={$album->getParentId()}&amp;mode={$destination}&amp;page=1">
+     <a href="admin.php?op=resourceList&amp;albumId={$album->getParentId()}&amp;page=1">
      <img src="imgs/admin/icon_folder-72.png" border="0" alt="Parent" />&nbsp;<br/>..</a>
     </td>
     <td>
@@ -90,20 +85,18 @@
   {foreach from=$albums item=resalbum}
    <tr>
     <td>
-     <a href="admin.php?op=resourceList&amp;albumId={$resalbum->getId()}&amp;mode={$destination}&amp;page=1">
+     <a href="admin.php?op=resourceList&amp;albumId={$resalbum->getId()}&amp;page=1">
      <img src="imgs/admin/icon_folder-72.png" border="0" alt="folder" /><br/>{$resalbum->getName()}</a><br/>
     </td>
     <td>
-      <script type="text/javascript">
-       var albumName_{$resalbum->getId()} = '{$resalbum->getMangledName()|escape:"javascript"}';
-       var albumDesc_{$resalbum->getId()} = '{$resalbum->getDescription()|escape:"javascript"}';
-      </script>    
-     {if $htmlarea}
-      <a href="javascript:addHtmlareaAlbumLink({$destination},{$blog->getId()},{$resalbum->getId()},albumName_{$resalbum->getId()},albumDesc_{$resalbum->getId()},false);">{$locale->tr("add_album")}</a><br/>
+    {assign var=albumLink value=$url->albumLink($resalbum)}
+    {assign var=albumName value=$resalbum->getName()}
+    {assign var=albumDesc value=$resalbum->getDescription()}
+    {if $htmlarea}
+      <a href="javascript:addHtmlareaAlbumLink('{$albumLink}','{$albumName|escape:"javascript"}','{$albumDesc|escape:"javascript"}');">{$locale->tr("add_album")}</a><br/>
     {else}
-
-      <a href="javascript:addAlbumLink({$destination},{$blog->getId()},{$resalbum->getId()},albumName_{$resalbum->getId()},albumDesc_{$resalbum->getId()},false);">{$locale->tr("add_album")}</a><br/>
-  {/if}
+      <a href="javascript:addAlbumLink('{$albumLink}','{$albumName|escape:"javascript"}','{$albumDesc|escape:"javascript"}');">{$locale->tr("add_album")}</a><br/>
+    {/if}
    </td>
    </tr>
 {/foreach}
@@ -126,28 +119,28 @@
   <a target="_blank" href="{$url->resourceLink($resource)}"><br/>{$resource->getFileName()}</a>
   </td>
   <td>
-  <script type="text/javascript">
-    var resName_{$resource->getId()} = '{$resource->getFileName()|escape:"javascript"}';
-    var resDesc_{$resource->getId()} = '{$resource->getDescription()|escape:"javascript"}';
-    var resPreviewName_{$resource->getId()} = '{$resource->getPreviewFileName()|escape:"javascript"}';
-    var resMediunPreviewName_{$resource->getId()} = '{$resource->getMediumSizePreviewFileName()|escape:"javascript"}';
-    {assign var=resourceAlbum value=$resource->getAlbum()}
-	var resAlbumName_{$resource->getId()} = '{$resourceAlbum->getMangledName()|escape:"javascript"}';
-	var resAlbumId_{$resource->getId()} = '{$resourceAlbum->getId()}';
-  </script>
+  {assign var=resourceId value=$resource->getId()}
+  {assign var=resourceLink value=$url->resourceLink($resource)}
+  {assign var=resourceDownloadLink value=$url->rawResourceDownloadLink($resource)}
+  {assign var=resourceMediumSizePreviewLink value=$url->rawResourceMediumSizePreviewLink($resource)}
+  {assign var=resourcePreviewLink value=$url->rawResourcePreviewLink($resource)}
+  {assign var=resourceName value=$resource->getFileName()}
+  {assign var=resourceDesc value=$resource->getDescription()}
+  {assign var=resourceType value=$resource->getResourceType()}
+  {assign var=resourceMimeType value=$resource->getMimeType()}
   {if $htmlarea}
-  <a href="javascript:addHtmlareaLink({$destination},{$blog->getId()},{$resource->getResourceType()},resName_{$resource->getId()},resDesc_{$resource->getId()},false,'{$resource->getMimeType()}','{$resource->getId()}',resAlbumName_{$resource->getId()},resAlbumId_{$resource->getId()});">{$locale->tr("add_resource")}</a><br/> 
+    <a href="javascript:addHtmlareaLink('{$resourceId}','{$resourceDownloadLink}','','{$resourceName|escape:"javascript"}','{$resourceDesc|escape:"javascript"}','{$resourceType}','{$resourceMimeType}');">{$locale->tr("add_resource")}</a><br/> 
   {else}
- <a href="javascript:addResourceLink({$destination},{$blog->getId()},{$resource->getResourceType()},resName_{$resource->getId()},resDesc_{$resource->getId()},false,'{$resource->getMimeType()}','{$resource->getId()}',resAlbumName_{$resource->getId()},resAlbumId_{$resource->getId()});">{$locale->tr("add_resource")}</a><br/> 
+    <a href="javascript:addResourceLink('{$resourceId}','{$resourceDownloadLink}','','{$resourceName|escape:"javascript"}','{$resourceDesc|escape:"javascript"}','{$resourceType}','{$resourceMimeType}');">{$locale->tr("add_resource")}</a><br/>
   {/if}
   {if $resource->hasPreview()}
-   {if $htmlarea}
-    <a href="javascript:addHtmlareaLink({$destination},{$blog->getId()},{$resource->getResourceType()},resMediunPreviewName_{$resource->getId()},resDesc_{$resource->getId()},1,'{$resource->getMimeType()}','{$resource->getId()}',resAlbumName_{$resource->getId()},resAlbumId_{$resource->getId()});">{$locale->tr("add_resource_preview")}</a><br/>
-    <a href="javascript:addHtmlareaLink({$destination},{$blog->getId()},{$resource->getResourceType()},resMediunPreviewName_{$resource->getId()},resDesc_{$resource->getId()},2,'{$resource->getMimeType()}','{$resource->getId()}',resAlbumName_{$resource->getId()},resAlbumId_{$resource->getId()});">{$locale->tr("add_resource_medium")}</a><br/>
-   {else}
-   <a href="javascript:addResourceLink({$destination},{$blog->getId()},{$resource->getResourceType()},resPreviewName_{$resource->getId()},resDesc_{$resource->getId()},1,'{$resource->getMimeType()}','{$resource->getId()}',resAlbumName_{$resource->getId()},resAlbumId_{$resource->getId()});">{$locale->tr("add_resource_preview")}</a><br/>
-   <a href="javascript:addResourceLink({$destination},{$blog->getId()},{$resource->getResourceType()},resPreviewName_{$resource->getId()},resDesc_{$resource->getId()},2,'{$resource->getMimeType()}','{$resource->getId()}',resAlbumName_{$resource->getId()},resAlbumId_{$resource->getId()});">{$locale->tr("add_resource_medium")}</a><br/>
-   {/if}
+    {if $htmlarea}
+      <a href="javascript:addHtmlareaLink('{$resourceId}','{$resourcePreviewLink}','{$resourceDownloadLink}','{$resourceName|escape:"javascript"}','{$resourceDesc|escape:"javascript"}','{$resourceType}','{$resourceMimeType}');">{$locale->tr("add_resource_preview")}</a><br/>
+      <a href="javascript:addHtmlareaLink('{$resourceId}','{$resourceMediumSizePreviewLink}','{$resourceDownloadLink}','{$resourceName|escape:"javascript"}','{$resourceDesc|escape:"javascript"}','{$resourceType}','{$resourceMimeType}');">{$locale->tr("add_resource_medium")}</a><br/>
+    {else}
+      <a href="javascript:addResourceLink('{$resourceId}','{$resourcePreviewLink}','{$resourceDownloadLink}','{$resourceName|escape:"javascript"}','{$resourceDesc|escape:"javascript"}','{$resourceType}','{$resourceMimeType}');">{$locale->tr("add_resource_preview")}</a><br/>
+      <a href="javascript:addResourceLink('{$resourceId}','{$resourceMediumSizePreviewLink}','{$resourceDownloadLink}','{$resourceName|escape:"javascript"}','{$resourceDesc|escape:"javascript"}','{$resourceType}','{$resourceMimeType}');">{$locale->tr("add_resource_medium")}</a><br/>
+    {/if}
   {/if}
  </td>
 {/foreach}
@@ -177,7 +170,6 @@
   <input type="hidden" name="albumId" value="{$album->getId()}" />
   <input type="hidden" name="op" value="addResource" /><br/>
   <input type="hidden" name="destView" value="resourceList" />
-  <input type="hidden" name="destination" value="{$destination}" />
   </div>
   <div class="status_bar" id="status_bar" style="display: none;">
     {$locale->tr("upload_in_progress")}&nbsp;
@@ -195,4 +187,4 @@
   {/if}
 </div>
 </div>
-{include file="$admintemplatepath/chooser/footer.template"}
+{include file="$admintemplatepath/chooser/footer.template"}
\ No newline at end of file

Modified: plog/trunk/templates/admin/chooser/siteuserschooser.template
===================================================================
--- plog/trunk/templates/admin/chooser/siteuserschooser.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/chooser/siteuserschooser.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -64,9 +64,9 @@
                         </td>
                         <td class="col_highlighted">
 						    {if $mode=="1"}
-                              <a href="javascript:setDocumentField(parent.opener.document, 'userName','{$siteuser->getUsername()}');setDocumentField(parent.opener.document,'userId','{$siteuser->getId()}');window.close()">
+                              <a href="javascript:setDocumentField(top.document, 'userName','{$siteuser->getUsername()}');setDocumentField(top.document,'userId','{$siteuser->getId()}');window.close()">
 							{else}
-							  <a href="javascript:appendDocumentList(parent.opener.document, 'userList','{$siteuser->getId()}','{$siteuser->getUsername()}');window.close()">
+							  <a href="javascript:appendDocumentList(top.document, 'userList','{$siteuser->getId()}','{$siteuser->getUsername()}');window.close()">
 							{/if}
 							  {$siteuser->getUsername()}
 							</a>
@@ -90,9 +90,9 @@
 						<td>
                           <div class="list_action_button">
 						    {if $mode=="1"}
-                              <a href="javascript:setDocumentField(parent.opener.document, 'userName','{$siteuser->getUsername()}');setDocumentField(parent.opener.document,'userId','{$siteuser->getId()}');window.close()">
+                              <a href="javascript:setDocumentField(top.document, 'userName','{$siteuser->getUsername()}');setDocumentField(top.document,'userId','{$siteuser->getId()}');window.close()">
 							{else}
-							  <a href="javascript:appendDocumentList(parent.opener.document, 'userList','{$siteuser->getId()}','{$siteuser->getUsername()}');window.close()">
+							  <a href="javascript:appendDocumentList(top.document, 'userList','{$siteuser->getId()}','{$siteuser->getUsername()}');window.close()">
 							{/if}
 							  <img src="imgs/admin/icon_arrow-16.png" alt="{$locale->tr("select_user")}" />
 							</a>
@@ -105,6 +105,6 @@
         </div>        
         <div id="list_action_bar">
             {adminpager style=list}
-			<a href="javascript:window.close()">{$locale->tr("close")}</a>
+			<a href="javascript:top.window.close()">{$locale->tr("close")}</a>
         </div>
 {include file="$admintemplatepath/chooser/footer.template"}

Modified: plog/trunk/templates/admin/chooser/userpictureselect.template
===================================================================
--- plog/trunk/templates/admin/chooser/userpictureselect.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/chooser/userpictureselect.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -86,7 +86,7 @@
  <a target="_blank" href="{$url->resourceLink($resource)}"><br/>{$resource->getFileName()}</a>
  </td>
  <td>
- <a href="javascript:returnResourceInformation('{$resource->getId()}','{$url->resourcePreviewLink($resource)}');window.close();">{$locale->tr("select")}</a>
+ <a href="javascript:returnResourceInformation('{$resource->getId()}','{$url->rawResourcePreviewLink($resource)}');window.close();">{$locale->tr("select")}</a>
  </td> 
 </tr>
 {/foreach}

Modified: plog/trunk/templates/admin/createblog.template
===================================================================
--- plog/trunk/templates/admin/createblog.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/createblog.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -45,7 +45,8 @@
        <div class="formHelp">{$locale->tr("blog_owner_help")}</div>
        <input type="text" name="userName" id="userName" style="width:40%" value="{$userName}" readonly="readonly" />
 	   <input type="hidden" name="userId" id="userId" value="{$userId}" />
-	   <a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
+	   {*<a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">*}
+	   <a href="?op=siteUsersChooser" rel="gb_page[600, 450]">
 	    {$locale->tr("select")}
 	   </a>	
        {include file="$admintemplatepath/validate.template" field=userId message=$locale->tr("error_incorrect_user")}	   

Modified: plog/trunk/templates/admin/default.template
===================================================================
--- plog/trunk/templates/admin/default.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/default.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -18,6 +18,7 @@
 		   <label for="userPassword">{$locale->tr("password")}</label>
 		   <input type="password" tabindex="2" name="userPassword" />
 		 </div>
+         <a href="summary.php?op=resetPasswordForm">{$locale->tr("password_forgotten")}</a>
 		</fieldset>
 		<div class="buttons">
          <input type="submit" class="button" name="Login" value="{$locale->tr("login")}" tabindex="3" />

Modified: plog/trunk/templates/admin/editblog.template
===================================================================
--- plog/trunk/templates/admin/editblog.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/editblog.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -61,9 +61,13 @@
       <div class="formHelp">{$locale->tr("blog_owner_help")}</div>
 	  <input type="hidden" id="userId" name="userId" value="{if $userId==""}{$blogOwnerInfo->getId()}{else}{$userId}{/if}" />
 	  <input type="text" id="userName" name="userName" value="{if $userName==""}{$blogOwnerInfo->getUsername()}{else}{$userName}{/if}" style="width:50%"/>
-	  <a href="#" onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');">
+	  <a href="{$url->getAdminUrl()}?op=siteUsersChooser" title="UserChooser" rel="gb_page[600, 450]">
 	   {$locale->tr("select")}
-	  </a> 
+	   </a>
+	   
+	   {* onclick="window.open('?op=siteUsersChooser','UserChooser','scrollbars=yes,resizable=yes,toolbar=no,height=450,width=600');" *}
+	   
+ 
     </div>
 
     <div class="field">

Modified: plog/trunk/templates/admin/editbloguser.template
===================================================================
--- plog/trunk/templates/admin/editbloguser.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/editbloguser.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,7 +1,7 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=showBlogUsers title=$locale->tr("editBlogUser")}
 
- <form name="editBlogUser" action="admin.php" method="post">
+ <form name="editBlogUser" id="editBlogUser" action="admin.php" method="post">
    <fieldset class="inputField">
   
      <legend>{$locale->tr("newBlogUser")}</legend>
@@ -16,7 +16,14 @@
      <div class="field">
       <label for="perm">{$locale->tr("permissions")}</label>
       <span class="required"></span>
-      <div class="formHelp">{$locale->tr("blog_user_permissions_help")}</div>     
+      <div class="formHelp">{$locale->tr("blog_user_permissions_help")}</div>
+        {$locale->tr("quick_permission_selection")}
+        </br>
+        <select name="preselection" onChange="togglePermissionSets('editBlogUser', this.value);">
+          <option value=""/>{$locale->tr("select")}</option>
+          <option value="basic_blog_permission"/>{$locale->tr("basic_blog_permission")}</option>
+          <option value="full_blog_permission"/>{$locale->tr("full_blog_permission")}</option>
+        </select><br/>     
      	{foreach from=$perms item=perm}
      	 {if !$perm->isAdminOnlyPermission()}
      	 <input type="checkbox" class="checkbox" name="perm[]" value="{$perm->getId()}" {if $edituser->hasPermissionByName($perm->getName(),$blog->getId())}checked="checked"{/if}/>

Modified: plog/trunk/templates/admin/editpost.template
===================================================================
--- plog/trunk/templates/admin/editpost.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/editpost.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -113,6 +113,21 @@
 	    {location_chooser blogId=$blog->getId() addNewString=$locale->tr("add_new") showDisplayLink=1 default=$location}
       </div>
       {/if}	
+	
+	  <!-- user field -->
+	  {check_perms perm=update_all_user_articles}
+	   <div class="field">
+        <label for="postUser">{$locale->tr("posted_by")}</label>
+		 <span class="required">*</span>		 
+		 <div class="formHelp">{$locale->tr("posted_by_help")}</div>
+		 <select name="postUser" id="postUser">
+		   {foreach from=$blog->getUsersInfo() item=bloguser}
+			<option value="{$bloguser->getId()}" {if $postUser==$bloguser->getId()}selected="selected"{/if}>{$bloguser->getUserName()}</option>
+		   {/foreach}
+        </select>	   
+	   </div>
+	   {/check_perms}	
+>>>>>>> .merge-right.r5367
 	   
 	   <div class="field">
          <label for="postCategories[]">{$locale->tr("categories")}</label>

Modified: plog/trunk/templates/admin/globalsettings_resources.template
===================================================================
--- plog/trunk/templates/admin/globalsettings_resources.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/globalsettings_resources.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -11,7 +11,16 @@
     <label for="config[resources_folder]">resources_folder</label>
     <div class="formHelp">{$locale->tr("help_resources_folder")}</div>	
     <input style="width:100%" type="text" name="config[resources_folder]" value="{$resources_folder}"/>
-   </div>   
+   </div>
+   <!-- resources naming rule -->
+   <div class="field">
+    <label for="config[resources_naming_rule]">resources_naming_rule</label>
+    <div class="formHelp">{$locale->tr("help_resources_naming_rule")}</div>	
+     <select name="config[resources_naming_rule]">
+      <option value="original_file_name" {if $resources_naming_rule == "original_file_name"} selected="selected" {/if} />{$locale->tr("original_file_name")}</option>
+      <option value="encoded_file_name" {if $resources_naming_rule == "encoded_file_name"} selected="selected" {/if} />{$locale->tr("encoded_file_name")}</option>
+     </select>
+   </div>
    <!-- thumbnail_method -->
    <div class="field">
     <label for="config[thumbnail_method]">thumbnail_method</label>

Modified: plog/trunk/templates/admin/globalsettings_summary.template
===================================================================
--- plog/trunk/templates/admin/globalsettings_summary.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/globalsettings_summary.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -49,7 +49,6 @@
     <div class="formHelp">{$locale->tr("help_summary_show_agreement")}</div>
     <input class="radio" type="radio" id="config[summary_show_agreement]" name="config[summary_show_agreement]" value="1" {if $summary_show_agreement == 1 } checked="checked" {/if} />{$locale->tr("yes")}
     <input class="radio" type="radio" id="config[summary_show_agreement]" name="config[summary_show_agreement]" value="0" {if $summary_show_agreement == 0 } checked="checked" {/if} />{$locale->tr("no")}
-    </td>
    </div>	
    <!-- need_email_confirm_registration -->
    <div class="field">

Modified: plog/trunk/templates/admin/globalsettings_uploads.template
===================================================================
--- plog/trunk/templates/admin/globalsettings_uploads.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/globalsettings_uploads.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -11,7 +11,6 @@
     <label for="config[maximum_file_upload_size]">maximum_file_upload_size</label>
     <div class="formHelp">{$locale->tr("help_maximum_file_upload_size")}</div>
      <input style="width:100%" type="text" name="config[maximum_file_upload_size]" value="{$maximum_file_upload_size}"/>
-    </td>
    </div>
    <!-- upload_forbidden_extensions -->
    <div class="field">

Modified: plog/trunk/templates/admin/header.template
===================================================================
--- plog/trunk/templates/admin/header.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/header.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -24,6 +24,7 @@
 	var scriptName = "{$config->getValue("script_name")}";
 	var plogAdminBaseUrl = "{$url->getBaseUrl(false)}/admin.php";
 	var plogBlogId = "{$blog->getId()}";
+	var GB_ROOT_DIR = "{$url->getBaseUrl(false)}/js/greybox/";
 </script>
 <script type="text/javascript" src="js/cookie/cookie.js"></script>
 <script type="text/javascript" src="js/prototype/prototype.js"></script>
@@ -50,6 +51,12 @@
   <link rel="stylesheet" href="js/JSCookMenu/ThemeOffice/theme.css" type="text/css" />
   <script type="text/javascript" src="js/JSCookMenu/ThemeOffice/theme.js"></script>
 {/if}
+<!-- Greybox -->
+<script type="text/javascript" src="js/greybox/AJS.js"></script>
+<script type="text/javascript" src="js/greybox/AJS_fx.js"></script>
+<script type="text/javascript" src="js/greybox/gb_scripts.js"></script>
+<link href="js/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
+
 </head>
 <body>
 

Modified: plog/trunk/templates/admin/menus.xml
===================================================================
--- plog/trunk/templates/admin/menus.xml	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/menus.xml	2007-04-29 15:28:19 UTC (rev 5368)
@@ -2,7 +2,7 @@
 	<Manage url="?op=Manage">
 	    <managePosts ignoreBreadCrumbs="1" orPerms="add_post,view_posts,add_category,view_categories,view_comments,view_trackbacks">
 	       <newPost url="?op=newPost" andPerms="add_post" />	
-	       <editPosts url="?op=editPosts" andPerms="videw_posts" />
+	       <editPosts url="?op=editPosts" andPerms="view_posts" />
 	       <newArticleCategory url="?op=newArticleCategory" andPerms="add_category" />	
 	       <editArticleCategories url="?op=editArticleCategories" andPerms="view_categories" />
 	       <editComments url="?op=editComments" andPerms="view_comments" />

Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/admin/newpost.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,8 +1,5 @@
 {include file="$admintemplatepath/header.template"}
 {include file="$admintemplatepath/navigation.template" showOpt=newPost title=$locale->tr("newPost")}
-{if $smarty.request.postText}
-	{assign var=postText value=$smarty.request.postText}
-{/if}
 {assign var=htmlarea value=$blogsettings->getValue("htmlarea_enabled")}
  <script type="text/javascript" src="js/ui/plogui.js"></script>
  <script type="text/javascript" src="js/calendar/datetimepicker.js"></script>
@@ -128,7 +125,7 @@
 		   {/foreach}
          </select>	   
 	   </div>
-	
+
     {if $location_data_enabled}
     <!-- location selector, this should only appear if location data is enabled -->
     <div class="field">
@@ -138,6 +135,21 @@
 	  {location_chooser blogId=$blog->getId() addNewString=$locale->tr("add_new") showDisplayLink=1}
      </div>
      {/if}	
+	
+	  <!-- user field -->
+	  {check_perms perm=update_all_user_articles}
+	   <div class="field">
+        <label for="postUser">{$locale->tr("posted_by")}</label>
+		 <span class="required">*</span>		 
+		 <div class="formHelp">{$locale->tr("posted_by_help")}</div>
+		 <select name="postUser" id="postUser">
+		   {foreach from=$blog->getUsersInfo() item=bloguser}
+			<option value="{$bloguser->getId()}" {if $postUser==$bloguser->getId()}selected="selected"{/if}>{$bloguser->getUserName()}</option>
+		   {/foreach}
+        </select>	   
+	   </div>
+	   {/check_perms}
+>>>>>>> .merge-right.r5367
 	   
 	   <div class="field">
          <label for="postCategories[]">{$locale->tr("categories")}</label>

Modified: plog/trunk/templates/default/commentform.template
===================================================================
--- plog/trunk/templates/default/commentform.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/default/commentform.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -5,10 +5,10 @@
 <legend>{$locale->tr("add_comment")}</legend>
 {dynamic}
 <div><label for="commentTopic">{$locale->pr("comment_topic")}</label><input type="text" name="commentTopic" id="commentTopic" value="{$topic}" /></div>
-<div><label for="commentText">{$locale->pr("comment_text")}</label><textarea rows="10" cols="30" name="commentText" id="commentText"></textarea></div>
-<div><label for="userName">{$locale->pr("comment_username")}</label>
+<div><label for="commentText">{$locale->pr("comment_text")}&nbsp;({$locale->tr("required")})</label><textarea rows="10" cols="30" name="commentText" id="commentText"></textarea></div>
+<div><label for="userName">{$locale->pr("comment_username")}&nbsp;({$locale->tr("required")})</label>
 	{if $authuser}
-	{$authuser->getUsername()} (<b>{$locale->tr("form_authenticated")}</b>)<br />
+	<span id="AuthUser">{$authuser->getUsername()} ({$locale->tr("form_authenticated")})</span>
 	<input type="hidden" name="userName" id="userNameHidden" value="{if $authuser}{$authuser->getUsername()}{/if}" /></div>
 	{else}
 	<input type="text" name="userName" id="userName" value="" /></div>

Modified: plog/trunk/templates/standard/header.template
===================================================================
--- plog/trunk/templates/standard/header.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/standard/header.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -16,6 +16,10 @@
  <link rel="shortcut icon" type="image/x-icon" href="{$url->getTemplateFile("favicon.ico")}" />
  <script type="text/javascript" src="{$url->getBaseUrl(false)}/js/ui/core.js"></script>
  <script type="text/javascript" src="{$url->getBaseUrl(false)}/js/ui/overlay.js"></script>
+
+  {if $badbehavior}
+     {$badbehavior->showBB2JavaScript()}
+  {/if}
  </head>
   <body> 
 <!-- Cached content created: {"0"|date_format:"%D %H:%M:%S"} -->

Modified: plog/trunk/templates/summary/blog.template
===================================================================
--- plog/trunk/templates/summary/blog.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/summary/blog.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -6,10 +6,9 @@
    
                       {if $owner->hasPicture()}
 	{assign var=picture value=$owner->getPicture()}
-	<div style="border:solid #cccccc 1px;width:58px;height:58px;background:url({$picture->getPreviewLink()}) no-repeat center" class="postgrav">&nbsp;</div>
+	     <img src="{$picture->getPreviewLink()}"  width="60" height="60" class="postgrav" />
     {else}
-        <img src="templates/summary/nouser.gif" class="postgrav" width="60" height="60" alt="{$owner->getUsername()|strip_tags}" />
-	
+        <img src="templates/summary/nouser.gif" class="postgrav" width="60" height="60" alt="{$owner->getUsername()|strip_tags}" />	
     {/if} 
     <h3>
 	 <a href="{$request->blogLink()}">{$blog->getBlog()|strip_tags}</a>

Modified: plog/trunk/templates/summary/post.template
===================================================================
--- plog/trunk/templates/summary/post.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/summary/post.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -7,10 +7,9 @@
 	
     {if $postOwner->hasPicture()}
 	{assign var=picture value=$postOwner->getPicture()}
-	<div style="border:solid #cccccc 1px;width:58px;height:58px;background:url({$request->resourcePreviewLink($picture)}) no-repeat center" class="postgrav">&nbsp;</div>
+	<img src="{$picture->getPreviewLink()}"  width="60" height="60" class="postgrav" />
     {else}
-        <img src="templates/summary/nouser.gif" class="postgrav" width="60" height="60" alt="{$postOwner->getUsername()|strip_tags}" />
-	
+    <img src="templates/summary/nouser.gif" class="postgrav" width="60" height="60" alt="{$postOwner->getUsername()|strip_tags}" />	
     {/if}    
     <h3>
     	<a href="{$request->postPermalink($post)}">{$post->getTopic()|strip_tags|truncate:60}</a>

Modified: plog/trunk/templates/summary/user.template
===================================================================
--- plog/trunk/templates/summary/user.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/summary/user.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,9 +1,8 @@
        {if $user->hasPicture()}
 	{assign var=picture value=$user->getPicture()}
-	<div style="border:solid #cccccc 1px;width:58px;height:58px;background:url({$picture->getPreviewLink()}) no-repeat center" class="postgrav">&nbsp;</div>
+	     <img src="{$picture->getPreviewLink()}"  width="60" height="60" class="postgrav" />
     {else}
-        <img src="templates/summary/nouser.gif" class="postgrav" width="60" height="60" alt="{$user->getUsername()|strip_tags}" />
-	
+        <img src="templates/summary/nouser.gif" class="postgrav" width="60" height="60" alt="{$user->getUsername()|strip_tags}" />	
     {/if} 
 
         <h3><a href="?op=UserProfile&amp;userId={$user->getId()}">{$user->getUsername()}</a></h3>

Modified: plog/trunk/templates/wizard/checks.template
===================================================================
--- plog/trunk/templates/wizard/checks.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/wizard/checks.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,4 +1,4 @@
-{include file="wizard/header.template" title="1 Preinstallation Checks" step=1 mode=$mode}
+{include file="wizard/header.template" title="Preinstallation Checks" step=1 mode=$mode}
  <form name="databaseInfo" action="wizard.php" method="post">
   <fieldset class="inputField">
    <legend>Requirements Checking</legend>  
@@ -17,7 +17,9 @@
       <p class="wizardInfoText">Welcome to the configuration wizard of LifeType. These are some basic checks of your current
       system in order to ensure that LifeType can run properly.
       <br/><br/>
-      </p>
+	  <b>IMPORTANT NOTE:</b>If you upgraded from LifeType 1.1.x to 1.2.0, there are some changes that need to be done to some of your resources. 
+	  This is a known issue in the upgrade process of LifeType 1.1.x to 1.2.0 that did not convert the name of some preview files correctly. 
+	   In order to have this issue fixed, click <a href="?nextStep=Fix120">here</a> and let the browser window reload.</p>
      </div>
    {/if}
    

Copied: plog/trunk/templates/wizard/fix120.template (from rev 5367, plog/branches/lifetype-1.2/templates/wizard/fix120.template)
===================================================================
--- plog/trunk/templates/wizard/fix120.template	                        (rev 0)
+++ plog/trunk/templates/wizard/fix120.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -0,0 +1,45 @@
+{include file="wizard/header.template" step=4 mode=update title="Changes in Resources"}
+<form name="fix120" method="post" id="update3">
+<fieldset class="inputField">
+<legend>Data Changes</legend>
+{if $viewIsError}
+    <div class="wizardError">
+     <img src="imgs/admin/icon_error-16.png" alt="Error" class="wizardInfoIcon" />
+     <p style="color:red;margin-left:20px;">{$viewErrorMessage}</p>
+     <p>You may choose to ignore this error and continue with the data update process by
+     clicking the "Continue" button below.
+    </div>
+{else}
+   <div class="wizardInfo">
+    <img src="imgs/admin/icon_info-16.png" alt="Info" class="wizardInfoIcon" />
+    <p class="wizardInfoText">
+    {$message}
+    </p>
+   </div> 
+{/if}
+</fieldset>
+<div class="buttons">
+   {if !$complete}
+   <input type="hidden" name="nextStep" value="Fix120"/>
+   {else}
+   {if !$viewIsError}
+   <input type="hidden" name="nextStep" value="Update4"/>   
+   <input type="submit" name="Prev" value="&laquo; Previous"/>   
+   <input type="submit" name="Next" value="Next &raquo;"/>   
+   {/if}
+   {/if}
+   {if $viewIsError}
+     <input type="hidden" name="nextStep" value="Fix120"/>   
+     <input type="submit" name="continue" value="Continue" />
+   {/if}   
+   <input type="hidden" name="page" value="{$nextStep}" />
+   <input type="hidden" name="transformerId" value="{$transformerId}" />
+</div>
+</form>
+{if !$complete  && !$viewIsError}
+ <!-- let's make the document submit itself -->
+ <script type="text/javascript">
+  setTimeout( "document.fix120.submit()", 1000 );
+ </script>
+{/if}
+{include file="wizard/footer.template"}
\ No newline at end of file

Modified: plog/trunk/templates/wizard/header.template
===================================================================
--- plog/trunk/templates/wizard/header.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/wizard/header.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -39,9 +39,10 @@
           {else}
           <ul>
 	       <li {if $step==1}class="currentStep"{/if}>1 Checks</li>
-           <li {if $step==2}class="currentStep"{/if}>&raquo; 2 Update</li>
-           <li {if $step==3}class="currentStep"{/if}>&raquo; 3 Database Changes</li>
-           <li {if $step==5}class="currentStep"{/if}>&raquo; 4 Done!</li>
+           <li {if $step==2}class="currentStep"{/if}>&raquo; 2 Configuration</li>
+           <li {if $step==3}class="currentStep"{/if}>&raquo; 3 Options</li>
+           <li {if $step==4}class="currentStep"{/if}>&raquo; 4 Database Changes</li>
+           <li {if $step==5}class="currentStep"{/if}>&raquo; 5 Done!</li>
           </ul>
           {/if}
           <br style="clear:both;"/>

Modified: plog/trunk/templates/wizard/update1.template
===================================================================
--- plog/trunk/templates/wizard/update1.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/wizard/update1.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,4 +1,4 @@
-{include file="wizard/header.template" title="Update" step=2 mode=update}
+{include file="wizard/header.template" title="Configuration" step=2 mode=update}
 <form name="databaseInfo" method="post">
 <fieldset class="inputField">
 <legend>Database Info</legend>

Deleted: plog/trunk/templates/wizard/update111.template
===================================================================
--- plog/trunk/templates/wizard/update111.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/wizard/update111.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,45 +0,0 @@
-{include file="wizard/header.template" step=4 mode=update title="Changes in Resources"}
-<form name="update3" method="post" id="update3">
-<fieldset class="inputField">
-<legend>Data Changes</legend>
-{if $viewIsError}
-    <div class="wizardError">
-     <img src="imgs/admin/icon_error-16.png" alt="Error" class="wizardInfoIcon" />
-     <p style="color:red;margin-left:20px;">{$viewErrorMessage}</p>
-     <p>You may choose to ignore this error and continue with the data update process by
-     clicking the "Continue" button below.
-    </div>
-{else}
-   <div class="wizardInfo">
-    <img src="imgs/admin/icon_info-16.png" alt="Info" class="wizardInfoIcon" />
-    <p class="wizardInfoText">
-    {$message}
-    </p>
-   </div> 
-{/if}
-</fieldset>
-<div class="buttons">
-   {if !$complete}
-   <input type="hidden" name="nextStep" value="Fix111"/>
-   {else}
-   {if !$viewIsError}
-   <input type="hidden" name="nextStep" value="Update4"/>   
-   <input type="submit" name="Prev" value="&laquo; Previous"/>   
-   <input type="submit" name="Next" value="Next &raquo;"/>   
-   {/if}
-   {/if}
-   {if $viewIsError}
-     <input type="hidden" name="nextStep" value="Fix111"/>   
-     <input type="submit" name="continue" value="Continue" />
-   {/if}   
-   <input type="hidden" name="page" value="{$nextStep}" />
-   <input type="hidden" name="transformerId" value="{$transformerId}" />
-</div>
-</form>
-{if !$complete  && !$viewIsError}
- <!-- let's make the document submit itself -->
- <script type="text/javascript">
-  document.update3.submit();
- </script>
-{/if}
-{include file="wizard/footer.template"}
\ No newline at end of file

Modified: plog/trunk/templates/wizard/update2.template
===================================================================
--- plog/trunk/templates/wizard/update2.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/wizard/update2.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,26 +1,35 @@
-{include file="wizard/header.template" step=3 title="Database Changes"}
-<form name="update2" id="update2" method="post">
+{include file="wizard/header.template" title="Options" step=3 mode=update}
+<form name="options" method="post">
 <fieldset class="inputField">
-<legend>Database Changes</legend>
+<legend>Options</legend>
 {if $viewIsError}
-    <div class="wizardError">
+     <div class="wizardError">
      <img src="imgs/admin/icon_error-16.png" alt="Error" class="wizardInfoIcon" />
      <p style="color:red;margin-left:20px;">{$viewErrorMessage}</p>
-    </div>
+    </div> 
 {else}
-   <div class="wizardInfo">
-    <img src="imgs/admin/icon_info-16.png" alt="Info" class="wizardInfoIcon" />
-    <p class="wizardInfoText">
-       All the necessary changes have been made to the database:<br/><br/>
-       {$message}
-     </p> 
-   </div>      
+ <div class="wizardInfo">
+  <img src="imgs/admin/icon_info-16.png" alt="Info" class="wizardInfoIcon" />
+   <p class="wizardInfoText">
+  The following options will control the behaviour of the database changing process. Please make sure
+  the options are correct and press "Next" to move to the next step. The database changing process
+  is irreversible, please backup your database and files if you have any concerns about this process.</p>
+  </div>
 {/if}
-</fieldset>
-<div class="buttons">
-	<input type="button" name="Prev" value="&laquo; Previous" onClick="javascript:history.go(-1);" />
-   <input type="hidden" name="nextStep" value="Update3"/>
-       <input type="submit" name="Next" value="Next &raquo;"/>
-</div>
-</form>
-{include file="wizard/footer.template"}
\ No newline at end of file
+   <div class="field">
+    <label for="resourcesNamingRule">Resource Naming Rules</label>
+    <div class="formHelp">
+	<p>Due to performance reasons, LifeType 1.2 uses the web server to serve resources (images, videos, etc) rather than using resserver.php. Because of this new implementation, all resource files need to be renamed to their original name but this will cause some problems when using Windows and multi-byte encodings.</p>
+	<p>Please select one of these two options: <i>'Original File Name'</i> will rename files to their original name, <strong>please use this option if your server is not running Windows or if you are not using a double-byte character encoding</strong>. <i>'Encoded File Name'</i> will use the encoded file name for uploaded resources, the naming rule is [BlogId]-[ResourceId].[Ext] as implemented in LifeType 1.1. <strong>Please use 'Encoded File Name' if you are installing LifeType under a Multi-Byte Microsoft Windows environment.</strong></p></div>
+     <select name="resourcesNamingRule">
+      <option value="original_file_name" {if $resourcesNamingRule == "original_file_name"} selected="selected" {/if} />Original File Name</option>
+      <option value="encoded_file_name" {if $resourcesNamingRule == "encoded_file_name"} selected="selected" {/if} />Encoded File Name</option>
+     </select>
+   </div>
+   </fieldset>
+   <div class="buttons"> 
+    <input type="hidden" name="nextStep" value="Update3"/>
+    <input type="submit" name="Next" value="Next &raquo;"/>
+   </div>
+ </form>
+{include file="wizard/footer.template"}

Modified: plog/trunk/templates/wizard/update3.template
===================================================================
--- plog/trunk/templates/wizard/update3.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/wizard/update3.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -1,4 +1,4 @@
-{include file="wizard/header.template" step=4 mode=update title="Data Changes"}
+{include file="wizard/header.template" step=4 mode=update title="Database Changes"}
 <form name="update3" method="post" id="update3">
 <fieldset class="inputField">
 <legend>Data Changes</legend>
@@ -20,7 +20,7 @@
 </fieldset>
 <div class="buttons">
    {if !$complete}
-   <input type="hidden" name="nextStep" value="Update2"/>
+   <input type="hidden" name="nextStep" value="Update3"/>
    {else}
    {if !$viewIsError}
    <input type="hidden" name="nextStep" value="Update4"/>   
@@ -29,15 +29,16 @@
    {/if}
    {/if}
    {if $viewIsError}
-     <input type="hidden" name="nextStep" value="Update2"/>   
+     <input type="hidden" name="nextStep" value="Update3"/>   
      <input type="submit" name="continue" value="Continue" />
    {/if}   
    <input type="hidden" name="page" value="{$nextStep}" />
    <input type="hidden" name="transformerId" value="{$transformerId}" />
+   <input type="hidden" name="resourcesNamingRule" value="{$resourcesNamingRule}" />
 </div>
 
 <!-- for debugging purposes only
-  <input type="hidden" name="nextStep" value="Update3"/>   
+  <input type="hidden" name="nextStep" value="Update4"/>
   <input type="submit" name="continue" value="Continue" />
   <input type="hidden" name="page" value="{$nextStep}" />
   <input type="hidden" name="transformerId" value="{$transformerId}" />

Modified: plog/trunk/templates/wizard/update4.template
===================================================================
--- plog/trunk/templates/wizard/update4.template	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/templates/wizard/update4.template	2007-04-29 15:28:19 UTC (rev 5368)
@@ -12,7 +12,7 @@
     <img src="imgs/admin/icon_info-16.png" alt="Info" class="wizardInfoIcon" />
     <p class="wizardInfoText">
   Installation is complete. Congratulations, Your 1.1 installation has been successfully upgraded to 
-  LifeType 1.2.
+  LifeType 1.2.2.
     </p> 
    </div>
 {/if}

Modified: plog/trunk/xmlrpc.php
===================================================================
--- plog/trunk/xmlrpc.php	2007-04-29 14:44:24 UTC (rev 5367)
+++ plog/trunk/xmlrpc.php	2007-04-29 15:28:19 UTC (rev 5368)
@@ -4,7 +4,7 @@
     	define( "PLOG_CLASS_PATH", dirname(__FILE__)."/");
     }
 
-	include_once( PLOG_CLASS_PATH."class/object/loader.class.php" );
+	include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
 	lt_include( PLOG_CLASS_PATH."class/net/xmlrpc/xmlrpcserver.class.php" );
 	
 	$server = new XmlRpcServer();



More information about the pLog-svn mailing list