[pLog-svn] r1559 - in plog/trunk: class/action class/action/admin
class/bayesian class/controller class/dao class/data/forms
class/data/validator class/data/validator/rules class/file
class/file/finder class/file/unpacker class/gallery/dao
class/gallery/resizers class/locale class/net
class/net/http/session class/object class/plugin
class/security class/summary/action class/summary/dao
class/summary/view class/template class/template/menu
class/template/smarty/plugins class/template/templatesets
class/view config
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sun Mar 20 17:22:01 GMT 2005
Author: oscar
Date: 2005-03-20 17:22:01 +0000 (Sun, 20 Mar 2005)
New Revision: 1559
Modified:
plog/trunk/class/action/admin/adminaddblogtemplateaction.class.php
plog/trunk/class/action/admin/adminaddbloguseraction.class.php
plog/trunk/class/action/admin/adminaddlocaleaction.class.php
plog/trunk/class/action/admin/adminaddpostaction.class.php
plog/trunk/class/action/admin/adminaddresourceaction.class.php
plog/trunk/class/action/admin/adminaddtemplateaction.class.php
plog/trunk/class/action/admin/adminmarkcommentaction.class.php
plog/trunk/class/action/admin/adminupdateeditblogaction.class.php
plog/trunk/class/action/admin/adminupdatepostaction.class.php
plog/trunk/class/action/blogaction.class.php
plog/trunk/class/action/resourceserveraction.class.php
plog/trunk/class/bayesian/bayesianfiltercore.class.php
plog/trunk/class/controller/controller.class.php
plog/trunk/class/controller/resourceclassloader.class.php
plog/trunk/class/dao/articlecomments.class.php
plog/trunk/class/dao/articles.class.php
plog/trunk/class/dao/blogs.class.php
plog/trunk/class/dao/model.class.php
plog/trunk/class/dao/searchengine.class.php
plog/trunk/class/dao/trackbacks.class.php
plog/trunk/class/dao/userpermissions.class.php
plog/trunk/class/data/forms/formvalidator.class.php
plog/trunk/class/data/validator/emailvalidator.class.php
plog/trunk/class/data/validator/ipmatchvalidator.class.php
plog/trunk/class/data/validator/rules/urlformatrule.class.php
plog/trunk/class/data/validator/templatevalidator.class.php
plog/trunk/class/data/validator/uploadvalidator.class.php
plog/trunk/class/file/file.class.php
plog/trunk/class/file/finder/filefinder.class.php
plog/trunk/class/file/unpacker/unpacker.class.php
plog/trunk/class/file/unpacker/zipunpacker.class.php
plog/trunk/class/gallery/dao/galleryalbums.class.php
plog/trunk/class/gallery/dao/galleryresourcequotas.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/galleryimagemagickresizer.class.php
plog/trunk/class/gallery/resizers/galleryresizer.class.php
plog/trunk/class/locale/locale.class.php
plog/trunk/class/net/customurlhandler.class.php
plog/trunk/class/net/http/session/sessionmanager.class.php
plog/trunk/class/net/linkparser.class.php
plog/trunk/class/object/object.class.php
plog/trunk/class/plugin/pluginbase.class.php
plog/trunk/class/plugin/pluginmanager.class.php
plog/trunk/class/security/bayesianfilter.class.php
plog/trunk/class/summary/action/activeaccountaction.class.php
plog/trunk/class/summary/action/chooseblogtemplateaction.class.php
plog/trunk/class/summary/action/doblogregistration.class.php
plog/trunk/class/summary/action/dofinishregister.class.php
plog/trunk/class/summary/action/dousercreation.class.php
plog/trunk/class/summary/action/summarydefaultaction.class.php
plog/trunk/class/summary/action/summarysetnewpassword.class.php
plog/trunk/class/summary/dao/summarystats.class.php
plog/trunk/class/summary/view/summarycachedview.class.php
plog/trunk/class/template/cachedtemplate.class.php
plog/trunk/class/template/menu/menurenderer.class.php
plog/trunk/class/template/smarty/plugins/function.debug.php
plog/trunk/class/template/templateservice.class.php
plog/trunk/class/template/templatesets/templatesetstorage.class.php
plog/trunk/class/view/blogview.class.php
plog/trunk/class/view/resourceserverview.class.php
plog/trunk/class/view/smartyview.class.php
plog/trunk/config/logging.properties.php
Log:
removed all logging information from the code. The only logging code left is an additional logger called "sqlerr" thtat will be used to log erroneous sql queries to the file tmp/sql_error.log, for debuggin purposes (since those errors matter quite a bit anyway)
Modified: plog/trunk/class/action/admin/adminaddblogtemplateaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddblogtemplateaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminaddblogtemplateaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -194,7 +194,6 @@
else {
// now add each one of the new ones
foreach( $newTemplates as $newTemplate ) {
- $this->log->debug( "Adding new template $newTemplate" );
$this->_addTemplateCode( $newTemplate );
}
}
Modified: plog/trunk/class/action/admin/adminaddbloguseraction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddbloguseraction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminaddbloguseraction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -67,7 +67,6 @@
$users = new Users();
$userInfo = $users->getUserInfoFromUsername( $this->_newUsername );
if( !$userInfo ) {
- $this->log->debug( "error could not find user ".$this->_newUsername );
$this->_view = new AdminTemplatedView( $this->_blogInfo, "addbloguser" );
$this->_view->setErrorMessage( $this->_locale->pr("error_invalid_user"), $this->_newUsername );
$this->_form->setFieldValidationStatus( "newBlogUserName", false );
Modified: plog/trunk/class/action/admin/adminaddlocaleaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddlocaleaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminaddlocaleaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -65,8 +65,6 @@
// success message
$successMessage = "";
- $this->log->debug("performScanLocales:after scan locales");
-
// set up the view
$this->_view = new AdminSiteLocalesListView( $this->_blogInfo );
@@ -86,8 +84,6 @@
if( $successMessage != "" ) $this->_view->setSuccessMessage( $successMessage );
- $this->log->debug("performScanLocale: successMesage is $successMessage");
-
return true;
}
Modified: plog/trunk/class/action/admin/adminaddpostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddpostaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminaddpostaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -70,7 +70,6 @@
// in case the post is already in the db
if( $this->_postId != "" ) {
- $this->log->debug("there was already a draft!!! -- POST ID = ".$this->_postId );
$article->setId( $this->_postId );
$artId = $this->_postId;
$postSavedOk = $articles->updateArticle( $article );
@@ -81,12 +80,9 @@
$artId = false;
}
else {
- $this->log->debug("the post is totally new!");
$artId = $articles->addArticle( $article );
}
- $this->log->debug("returning artId = $artId");
-
return $artId;
}
@@ -96,8 +92,6 @@
function perform()
{
$this->_fetchCommonData();
-
- $this->log->debug($_REQUEST);
$this->_postId = $this->_request->getValue( "postId" );
Modified: plog/trunk/class/action/admin/adminaddresourceaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddresourceaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminaddresourceaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -53,11 +53,9 @@
// check if there is any file uploaded
$files = HttpVars::getFiles();
- $this->log->debug($files);
// we probably need to rearrange the $files array a bit better...
$this->_files = Array();
foreach( $files as $file ) {
- $this->log->debug("processing ".$file["name"]);
if( $file["error"] == 0 && $file["size"] > 0 && $file["name"] != "" ) {
$this->_files[] = $file;
}
Modified: plog/trunk/class/action/admin/adminaddtemplateaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddtemplateaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminaddtemplateaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -94,7 +94,6 @@
$valid = $templateSandbox->checkTemplateSet( $upload->getFileName(), $tmpFolder.'/');
if( $valid < 0 ) {
- $this->log->debug( "error adding uploaded template, error code = $valid" );
$this->_view = new AdminSiteTemplatesListView( $this->_blogInfo );
$this->_view->setErrorMessage( $this->_checkTemplateSandboxResult( $valid ));
$this->setCommonData();
@@ -185,7 +184,6 @@
else {
// now add each one of the new ones
foreach( $newTemplates as $newTemplate ) {
- $this->log->debug( "Adding new template $newTemplate" );
$this->_addTemplateCode( $newTemplate );
}
}
Modified: plog/trunk/class/action/admin/adminmarkcommentaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminmarkcommentaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminmarkcommentaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -91,11 +91,9 @@
// before exiting, we should get the comment and train the filter
// to recognize this as spam...
- //$this->log->debug("retraining filter...<br/>");
$comment = $comments->getPostComment( $this->_articleId, $this->_commentId );
$bayesian = new BayesianFilterCore();
-
- //$this->log->debug("UNTRAINING!!<br/>");
+
$bayesian->untrain( $this->_blogInfo->getId(),
$comment->getTopic(),
$comment->getText(),
@@ -104,7 +102,6 @@
$comment->getUserUrl(),
false );
- //$this->log->debug("training!!!!!<br/>");
$bayesian->train( $this->_blogInfo->getId(),
$comment->getTopic(),
$comment->getText(),
@@ -145,7 +142,6 @@
// before exiting, we should get the comment and train the filter
// to recognize this as spam...
- //$this->log->debug("retraining filter...<br/>");
$comment = $comments->getPostComment( $this->_articleId, $this->_commentId );
$bayesian = new BayesianFilterCore();
Modified: plog/trunk/class/action/admin/adminupdateeditblogaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdateeditblogaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminupdateeditblogaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -41,7 +41,6 @@
$this->SiteAdminAction( $actionInfo, $request );
// data validation
- $this->log->debug($_REQUEST);
$this->registerFieldValidator( "blogUsers", new ArrayValidator(), true );
$this->registerFieldValidator( "blogId", new IntegerValidator());
$this->registerFieldValidator( "blogStatus", new IntegerValidator());
Modified: plog/trunk/class/action/admin/adminupdatepostaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdatepostaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/admin/adminupdatepostaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -146,7 +146,6 @@
$links = StringUtils::getLinks( stripslashes($post->getText()));
if( $this->_sendPings ) {
- $this->log->debug("Sending XMLRPC pings!");
$message .= "<br/><br/>".$this->sendXmlRpcPings();
}
// and now check what to do with the trackbacks
Modified: plog/trunk/class/action/blogaction.class.php
===================================================================
--- plog/trunk/class/action/blogaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/blogaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -133,10 +133,7 @@
if( $subdomainInfo["username"] != "" && $this->_request->getValue( 'blogUserName' ) == "" )
$this->_request->setValue( 'blogUserName', $subdomainInfo["username"] );
if( $subdomainInfo["blogname"] != "" && $this->_request->getValue( 'blogName' ) == "" )
- $this->_request->setValue( 'blogName', $subdomainInfo["blogname"] );
-
- $this->log->debug("subdomain info username = ".$subdomainInfo["username"]);
- $this->log->debug("subdomain info blogname = ".$subdomainInfo["blogname"]);
+ $this->_request->setValue( 'blogName', $subdomainInfo["blogname"] );
}
$blogId = $this->_request->getValue( 'blogId' );
Modified: plog/trunk/class/action/resourceserveraction.class.php
===================================================================
--- plog/trunk/class/action/resourceserveraction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/action/resourceserveraction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -57,8 +57,6 @@
$this->_request->setValue( 'user', $result["username"] );
if( $result["blogname"] != "" && $this->_request->getValue( 'blogId' ) == "" )
$this->_request->setValue( 'blogId', $result["blogname"] );
-
- $this->log->debug($result);
}
$blogId = $this->_request->getValue( 'blogId' );
Modified: plog/trunk/class/bayesian/bayesianfiltercore.class.php
===================================================================
--- plog/trunk/class/bayesian/bayesianfiltercore.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/bayesian/bayesianfiltercore.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -124,13 +124,11 @@
if ($spam)
{
- //$this->log->debug("untraining previous spam!");
$bayesianTokens->decSpamOccurrencesFromTokensArray($blogId, $tokens, $totalSpam, $totalNonSpam);
$bayesianFilterInfos->decTotalSpam($bayesianFilterInfo->getId());
}
else
{
- //$this->log->debug("untraining previous non-spam!!!");
$bayesianTokens->decNonSpamOccurrencesFromTokensArray($blogId, $tokens, $totalSpam, $totalNonSpam);
$bayesianFilterInfos->decTotalNonSpam($bayesianFilterInfo->getId());
}
Modified: plog/trunk/class/controller/controller.class.php
===================================================================
--- plog/trunk/class/controller/controller.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/controller/controller.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -108,7 +108,6 @@
*/
function setActionFolderPath( $newActionFolderPath )
{
- $this->log->debug("new folder path = $newActionFolderPath" );
$this->_loader->addSearchFolder( $newActionFolderPath );
}
Modified: plog/trunk/class/controller/resourceclassloader.class.php
===================================================================
--- plog/trunk/class/controller/resourceclassloader.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/controller/resourceclassloader.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -58,9 +58,7 @@
* @return always true
*/
function addSearchFolder( $folder )
- {
- $this->log->debug( "Adding new search folder: $folder" );
-
+ {
$this->_paths[] = $folder;
return true;
@@ -99,7 +97,6 @@
// build up the file name
$fileName = $path.strtolower($actionClassName).$this->_classFileSuffix;
// and see if it exists and can be loaded
- $this->log->debug("trying to load file: $fileName");
if( File::exists( $fileName ) && File::isReadable( $fileName )) {
include_once( $fileName );
$loaded = true;
Modified: plog/trunk/class/dao/articlecomments.class.php
===================================================================
--- plog/trunk/class/dao/articlecomments.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/dao/articlecomments.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -96,7 +96,6 @@
// find out the blogInfo object (after all, all these comments belong to the same
// blog so there is no risk of finding different blog_ids anywhere!
if( $this->blogSettings == null ) {
- $this->log->debug("CALCULATING time_diff FOR COMMENT!!");
$prefix = $this->getPrefix();
$articleId = $row["article_id"];
@@ -159,7 +158,6 @@
// find out the blogInfo object (after all, all these comments belong to the same
// blog so there is no risk of finding different blog_ids anywhere!
if( $this->blogSettings == null ) {
- $this->log->debug("CALCULATING time_diff FOR COMMENT!!");
$prefix = $this->getPrefix();
$articleId = $row["article_id"];
Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/dao/articles.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -1087,7 +1087,6 @@
$date = Timestamp::getDateWithOffset( $query_result['date'], $timeDiff );
$articleCategories = $this->getArticleCategories( $query_result['id'], $query_result['blog_id'] );
- //$this->log->debug($articleCategories);
$categoryIds = Array();
foreach( $articleCategories as $category )
array_push( $categoryIds, $category->getId());
Modified: plog/trunk/class/dao/blogs.class.php
===================================================================
--- plog/trunk/class/dao/blogs.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/dao/blogs.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -365,9 +365,6 @@
TextFilter::urlize($blog->getBlog())."', '".
Db::qstr($blog->getStatus())."')";
- $this->log->debug($query);
-
-
$result = $this->Execute( $query );
if( !$result ){
Modified: plog/trunk/class/dao/model.class.php
===================================================================
--- plog/trunk/class/dao/model.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/dao/model.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -99,9 +99,13 @@
}
$result = $this->_db->Execute( $query );
-
- if( !$result )
- $this->log->debug( "** Error SQL query **: $query" );
+
+ // if the query generated an error, write a message to the sql error log file
+ if( !$result ) {
+ $log =& LoggerManager::getLogger( "sqlerr" );
+ $error = $this->DbError();
+ $log->error( "The following query = \n{$query}\ngenerated the following error message = \n{$error}" );
+ }
return( $result );
}
@@ -118,16 +122,12 @@
// we should only cache 'SELECT' queries
if( substr($query, 0, 6) == "SELECT" ) {
if( empty($queryCache[$query])) {
- //$this->log->debug("Not cached! query = $query<hr/>");
$queryCache[$query] = $this->_db->Execute( $query );
}
- else
- //$this->log->debug("CACHED! query = <b>$query</b><hr/>");
$result = $queryCache[$query];
}
else {
- //$this->log->debug("NOT CACHING");
$result = $this->_db->Execute( $query );
}
Modified: plog/trunk/class/dao/searchengine.class.php
===================================================================
--- plog/trunk/class/dao/searchengine.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/dao/searchengine.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -177,8 +177,6 @@
$searchQuery .= " AND a.date+0 LIKE '$date%' ";
$searchQuery .=" ORDER BY relevance DESC";
-
- $this->log->debug("search article query is:".$searchQuery);
return $searchQuery;
}
Modified: plog/trunk/class/dao/trackbacks.class.php
===================================================================
--- plog/trunk/class/dao/trackbacks.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/dao/trackbacks.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -90,7 +90,6 @@
// find out the blogInfo object (after all, all these comments belong to the same
// blog so there is no risk of finding different blog_ids anywhere!
if( $this->blogSettings == null ) {
- $this->log->debug("CALCULATING time_diff FOR TRACKBACK!!");
$prefix = $this->getPrefix();
$articleId = $row["article_id"];
@@ -185,7 +184,6 @@
// find out the blogInfo object (after all, all these comments belong to the same
// blog so there is no risk of finding different blog_ids anywhere!
if( $this->blogSettings == null ) {
- $this->log->debug("CALCULATING time_diff FOR TRACKBACK!!");
$prefix = $this->getPrefix();
$articleId = $row["article_id"];
Modified: plog/trunk/class/dao/userpermissions.class.php
===================================================================
--- plog/trunk/class/dao/userpermissions.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/dao/userpermissions.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -281,7 +281,6 @@
// make sure that we're dealing with an array
if( !is_array( $userList )) {
- $this->log->debug("userList is not an array!!");
return false;
}
@@ -289,7 +288,6 @@
foreach( $userList as $userId ) {
if( $userId > 0 ) {
$this->grantPermission( $userId, $blogId, PERMISSION_BLOG_USER );
- $this->log->debug("recreating permission for user $userId in blog $blogId" );
}
}
Modified: plog/trunk/class/data/forms/formvalidator.class.php
===================================================================
--- plog/trunk/class/data/forms/formvalidator.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/data/forms/formvalidator.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -101,9 +101,6 @@
$validationResult = $fieldValidatorClass->validate( $fieldValue );
}
- if( !$validationResult )
- $this->log->debug("field $fieldName validation ERROR!" );
-
$this->_validationResults["$fieldName"] = $validationResult;
$this->_fieldValues["$fieldName"] = $fieldValue;
@@ -111,8 +108,6 @@
$finalValidationResult = $finalValidationResult && $validationResult;
}
- //$this->log->debug($this->_fieldValues);
-
// the form has already run
$this->_formHasRun = true;
Modified: plog/trunk/class/data/validator/emailvalidator.class.php
===================================================================
--- plog/trunk/class/data/validator/emailvalidator.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/data/validator/emailvalidator.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -24,7 +24,6 @@
$config =& Config::getConfig();
if ( $config->getValue( "check_email_address_validity" )) {
- $this->log->debug("checking email address validity...");
$this->addRule(new EmailDnsRule());
}
}
Modified: plog/trunk/class/data/validator/ipmatchvalidator.class.php
===================================================================
--- plog/trunk/class/data/validator/ipmatchvalidator.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/data/validator/ipmatchvalidator.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -25,7 +25,6 @@
function checkip($ip , $csiext)
{
- //$this->log->debug( "validating ip = $ip - csiext = $csiext<br/>" );
$counter = 0;
$range = explode("/",$csiext);
Modified: plog/trunk/class/data/validator/rules/urlformatrule.class.php
===================================================================
--- plog/trunk/class/data/validator/rules/urlformatrule.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/data/validator/rules/urlformatrule.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -32,8 +32,6 @@
{
$result = $this->_valURL( $value, $this->_options );
- $this->log->debug($result);
-
return( $result['Result'] == EW_OK );
}
Modified: plog/trunk/class/data/validator/templatevalidator.class.php
===================================================================
--- plog/trunk/class/data/validator/templatevalidator.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/data/validator/templatevalidator.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -63,7 +63,6 @@
// now check that all the basic files are available
foreach( $this->_basicFiles as $basicFile ) {
if( !File::isReadable( $this->_fullName.$basicFile )) {
- $this->log->debug( "file $basicFile is missing from template set!!" );
return ERROR_MISSING_BASE_FILES;
}
}
Modified: plog/trunk/class/data/validator/uploadvalidator.class.php
===================================================================
--- plog/trunk/class/data/validator/uploadvalidator.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/data/validator/uploadvalidator.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -45,7 +45,6 @@
// check if we received an object of the right type, or else just quit
if( $upload == null ) {
- $this->log->debug( "the FileUpload object is not correct" );
return false;
}
Modified: plog/trunk/class/file/file.class.php
===================================================================
--- plog/trunk/class/file/file.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/file/file.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -232,18 +232,14 @@
*/
function deleteDir( $dirName, $recursive = false )
{
- $log =& LoggerManager::getLogger();
-
// if the directory can't be read, then quit with an error
if( !File::isReadable( $dirName ) || !File::exists( $dirName )) {
- $log->debug("file not readable, exiting...");
return false;
}
// if it's not a file, let's get out of here and transfer flow
// to the right place...
if( !File::isDir( $dirName )) {
- $log->debug("transferring execution to File::delete()");
return File::delete( $dirName );
}
@@ -253,22 +249,17 @@
$files = Glob::myGlob( $dirName, "*" );
foreach( $files as $file ) {
if( File::isDir( $file )) {
- $log->debug( "processing folder $file" );
// perform a recursive call if we were allowed to do so
if( $recursive )
File::deleteDir( $file, $recursive );
}
- else
- $log->debug( "processing file $file" );
// File::delete can remove empty folders as well as files
- $log->debug( "deleting file $file" );
if( File::isReadable( $file ))
File::delete( $file );
}
// finally, remove the top-level folder
- $log->debug( "removing top level folder $file" );
File::delete( $dirName );
return true;
Modified: plog/trunk/class/file/finder/filefinder.class.php
===================================================================
--- plog/trunk/class/file/finder/filefinder.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/file/finder/filefinder.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -65,13 +65,10 @@
// loop through the files...
foreach( $files as $file ) {
- // some debug stuff
- $this->log->debug( "processing file = $file" );
// get the key for the given file
$key = $this->getKeyForFile( $file );
if( $key != null && !in_array( $key, $currentList )) {
// the file is new!
- $this->log->debug("$key is new!!");
$this->_new[] = $key;
}
}
Modified: plog/trunk/class/file/unpacker/unpacker.class.php
===================================================================
--- plog/trunk/class/file/unpacker/unpacker.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/file/unpacker/unpacker.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -128,8 +128,6 @@
{
// find the most suitable unpacker mechanism
$this->_file = $file;
-
- $this->log->debug( "unpacking: $file - to: $destFolder" );
if( !$this->_findUnpacker())
return UNPACKER_UNSUPPORTED;
Modified: plog/trunk/class/file/unpacker/zipunpacker.class.php
===================================================================
--- plog/trunk/class/file/unpacker/zipunpacker.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/file/unpacker/zipunpacker.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -58,14 +58,9 @@
$unzipPath = DEFAULT_UNZIP_PATH;
$cmd = "$unzipPath -o $file -d $destFolder";
-
- $this->log->debug( "unpacking command: $cmd" );
$result = exec( $cmd, $output, $retval );
- $this->log->debug( "output from command: ");
- $this->log->debug( $output );
-
//
// :KLUDGE:
// apparently, we should get something in $retval but there's nothing
Modified: plog/trunk/class/gallery/dao/galleryalbums.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryalbums.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/gallery/dao/galleryalbums.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -453,15 +453,6 @@
$album->setNumResources( $this->_getNumResources( $id ));
- // fetch the resources that belong to this album
- /*if( $fetchResources ) {
- $this->log->debug("fetching resources for album id = $id<br/>");
- if( $this->resources == "" )
- $this->resources = new GalleryResources();
- $albumResources = $this->resources->getUserResources( $row["owner_id"], $id );
- $album->setResources( $albumResources );
- }*/
-
return $album;
}
}
Modified: plog/trunk/class/gallery/dao/galleryresourcequotas.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresourcequotas.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/gallery/dao/galleryresourcequotas.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -69,8 +69,6 @@
// current allocated quota
$blogQuota = GalleryResourceQuotas::getBlogResourceQuota( $blogId );
- $this->log->debug( "quota for blog $blogId is $blogQuota");
-
// but if the quota is 0, then for sure we won't be over the quota :)
if( $blogQuota == 0 )
return false;
Modified: plog/trunk/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresources.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/gallery/dao/galleryresources.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -274,7 +274,6 @@
$resourceType = $this->_extensionToType[ $fileExt ];
else
$resourceType = GALLERY_RESOURCE_UNKNOWN;
- $this->log->debug( "getResourceType: Resource type = $resourceType" );
return $resourceType;
}
@@ -323,7 +322,6 @@
// get the id that was given to the record
$resourceId = $this->_db->Insert_ID();
- $this->log->debug( "Resource added to db successfully! Resource ID = $resourceId" );
// check if we have two resources with the same filename now
// check if there already exists a file with the same name
@@ -369,13 +367,6 @@
GalleryResourceStorage::checkPreviewsStorageFolder( $ownerId );
$outFile = GalleryResourceStorage::getPreviewsFolder( $ownerId ).$fileName;
- $this->log->debug( "** generateResourceThumbnail" );
- $this->log->debug( " outFile = $outFile" );
- $this->log->debug( " resFile = $resFile" );
- $this->log->debug( " fileExt = $fileExt" );
- $this->log->debug( " ownerId = $ownerId" );
- $this->log->debug( " resourceId = $resourceId" );
-
// and finally, we can generate the preview!
$result = $resizer->generate( $outFile, $previewHeight, $previewWidth, $previewKeepAspectRatio );
@@ -408,13 +399,6 @@
GalleryResourceStorage::checkMediumSizePreviewsStorageFolder( $ownerId );
$outFile = GalleryResourceStorage::getMediumSizePreviewsFolder( $ownerId ).$fileName;
- $this->log->debug( "** generateResourceMediumSizeThumbnail" );
- $this->log->debug( " outFile = $outFile" );
- $this->log->debug( " resFile = $resFile" );
- $this->log->debug( " fileExt = $fileExt" );
- $this->log->debug( " ownerId = $ownerId" );
- $this->log->debug( " resourceId = $resourceId" );
-
// and finally, we can generate the preview!
$result = $resizer->generate( $outFile, $previewWidth, $previewHeight, $previewKeepAspectRatio );
@@ -460,13 +444,10 @@
$error = $uploadValidator->validate( $upload );
if( $error < 0 )
return $error;
-
- $this->log->debug( "New resource validated ok!" );
// get the metadata
$getId3 = new GetID3();
$metadata = $getId3->analyze( $upload->getTmpName());
- $this->log->debug( "Resource metadata fetched!" );
// find out the right resource type based on the extension
$resourceType = $this->getResourceType( $upload->getFileName());
@@ -486,7 +467,6 @@
// move the file to disk
$storage = new GalleryResourceStorage();
$resFile = $storage->storeUpload( $resourceId, $ownerId, $upload );
- $this->log->debug("res file = $resFile");
// if the file cannot be read, we will also remove the record from the
// database so that we don't screw up
@@ -538,13 +518,10 @@
$fileName = basename( $fullFilePath );
$filePath = dirname( $fullFilePath );
-
- $this->log->debug( "fileName = $fileName - filePath = $filePath - fullFilePath = $fullFilePath" );
// get the metadata
$getId3 = new GetID3();
$metadata = $getId3->analyze( $fullFilePath );
- $this->log->debug( "Resource metadata fetched!" );
// find out the right resource type based on the extension
$resourceType = $this->getResourceType( $fileName );
@@ -559,21 +536,17 @@
$filePath, $fileName, $metadata );
if( !$resourceId )
return false;
-
- $this->log->debug( "Resource added to the database with id $resourceId" );
// and finally move the file to the right place in disk
// move the file to disk
$storage = new GalleryResourceStorage();
$resFile = $storage->storeFile( $resourceId, $ownerId, $fullFilePath );
- $this->log->debug("res file = $resFile");
// if the file cannot be read, we will also remove the record from the
// database so that we don't screw up
$fileReadable = File::isReadable( $resFile );
if( !$resFile || $resFile < 0 || !$fileReadable ) {
// if something went wrong, we should not keep the record in the db
- $this->log->debug( "Error storing the file!" );
$query = "DELETE FROM ".$this->getPrefix()."gallery_resources
WHERE id = $resourceId";
@@ -584,7 +557,6 @@
// and finally, we can generate the thumbnail only if the file is an image, of course :)
if( $resourceType == GALLERY_RESOURCE_IMAGE ) {
- $this->log->debug( "Generating thumbnail..." );
$this->generateResourceThumbnail( $resFile, $resourceId, $ownerId );
}
Modified: plog/trunk/class/gallery/dao/galleryresourcestorage.class.php
===================================================================
--- plog/trunk/class/gallery/dao/galleryresourcestorage.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/gallery/dao/galleryresourcestorage.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -56,30 +56,22 @@
$baseFolder = GalleryResourceStorage::getResourcesStorageFolder();
if( $baseFolder[strlen($baseFolder)-1] == "/") {
$baseFolder = substr($baseFolder,0,strlen($baseFolder)-1);
- $this->log->debug("base folder = $baseFolder");
}
- $this->log->debug( "Checking if base gallery folder exists = $baseFolder" );
if( !File::isDir( $baseFolder )) {
// folder does not exist, so we should try to create it
if( !File::createDir( $baseFolder, 0755 )) {
- $this->log->debug( "There was an error creating the folder!" );
throw( new Exception( "Could not create storage folder for resources: ".$baseFolder));
return false;
//die();
- }
-
- $this->log->debug( "Folder created ok!" );
+ }
}
if( !File::isReadable( $baseFolder )) {
- $this->log->debug( "Folder exists but it is not readable!" );
throw( new Exception( $baseFolder." storage folder exists but it is not readable!" ));
return false;
//die();
}
-
- $this->log->debug( "Base folder exists and it is readable." );
return true;
}
@@ -129,7 +121,6 @@
$baseFolder = GalleryResourceStorage::getResourcesStorageFolder();
if( $baseFolder[strlen($baseFolder)-1] == "/") {
$baseFolder = substr($baseFolder,0,strlen($baseFolder)-1);
- $this->log->debug("base folder = $baseFolder");
}
$userFolder = GalleryResourceStorage::getUserFolder( $ownerId );
@@ -137,11 +128,9 @@
$userFolder = substr($userFolder,0,strlen($userFolder)-1);
}
- $this->log->debug("user folder = $userFolder");
if( !File::isDir( $userFolder )) {
// folder does not exist, so we should try to create it
if( !File::createDir( $userFolder, 0755 )) {
- $this->log->debug("could not create folder!");
throw( new Exception( "Could not create user storage folder for resources: ".$userFolder ));
return false;
//die();
@@ -149,7 +138,6 @@
}
if( !File::isReadable( $userFolder )) {
- $this->log->debug( "User storage folder exists but it is not readable!" );
//throw( new Exception( $userFolder." user storage folder exists but it is not readable!" ));
return false;
//die();
@@ -171,20 +159,15 @@
$previewsFolder = GalleryResourceStorage::getPreviewsFolder( $ownerId );
if( $previewsFolder[strlen($previewsFolder)-1] == "/") {
$previewsFolder = substr($previewsFolder,0,strlen($previewsFolder)-1);
- $this->log->debug("previews folder = $previewsFolder");
}
- $this->log->debug( "Checking if previews folder exists = $previewsFolder" );
if( !File::isDir( $previewsFolder )) {
// folder does not exist, so we should try to create it
if( !File::createDir( $previewsFolder, 0755 )) {
- $this->log->debug("Error creating $previewsFolder!");
throw( new Exception( "Could not create user storage folder for previews: ".$previewsFolder ));
//die();
return false;
- }
-
- $this->log->debug( "Previews folder created ok!" );
+ }
}
if( !File::isReadable( $previewsFolder )) {
@@ -193,7 +176,6 @@
return false;
}
- $this->log->debug( "Previews folder checked ok!" );
return true;
}
@@ -205,20 +187,16 @@
$previewsFolder = GalleryResourceStorage::getMediumSizePreviewsFolder( $ownerId );
if( $previewsFolder[strlen($previewsFolder)-1] == "/") {
$previewsFolder = substr($previewsFolder,0,strlen($previewsFolder)-1);
- $this->log->debug("medium size previews folder = $previewsFolder");
}
- $this->log->debug( "Checking if medium size previews folder exists = $previewsFolder" );
if( !File::isDir( $previewsFolder )) {
// folder does not exist, so we should try to create it
if( !File::createDir( $previewsFolder, 0755 )) {
- $this->log->debug("Error creating medium size folder $previewsFolder!");
throw( new Exception( "Could not create user storage folder for medium size previews: ".$previewsFolder ));
//die();
return false;
}
- $this->log->debug( "Previews folder created ok!" );
}
if( !File::isReadable( $previewsFolder )) {
@@ -227,7 +205,6 @@
return false;
}
- $this->log->debug( "Previews folder checked ok!" );
return true;
}
@@ -253,8 +230,6 @@
$fileName = "$ownerId-$resourceId.$fileExt";
$filePath = $this->getUserFolder( $ownerId );
- $this->log->debug( "storeUpload: fileExt = $fileExt - fileName = $fileName - filePath = $filePath" );
-
// move the file to the temporaray folder first
$config =& Config::getConfig();
$tmpFolder = $config->getValue( "temp_folder" );
@@ -269,7 +244,6 @@
}
// rename it while it's there
- $this->log->debug("moving ".$tmpFolder."/".$upload->getTmpName()." to $destFile");
$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 );
@@ -279,19 +253,15 @@
//codes below are copy and modify from method storeFile
// first of all, check if the file is readable and if not, quit
if( !File::isReadable($origFile)) {
- $this->log->debug( "storeFile: file $origFile is not readable!" );
return false;
}
- $this->log->debug(" copying $origFile to $destFile" );
$res = File::rename( $origFile, $destFile );
if( !$res ) {
- $this->log->debug( "There was an error copying the file!" );
return false;
}
// check that the permissions are correct
- $this->log->debug( "chmodding file to 0777" );
File::chMod( $destFile, 0755 );
//=========================================
@@ -322,27 +292,21 @@
$destFile = "$ownerId-$resourceId.$fileExt";
$destPath = $this->getUserFolder( $ownerId );
- $this->log->debug( "storeFile: fileExt = $fileExt - fileName = $fileName - destFile = $destFile - destPath = $destPath" );
-
// first of all, check if the file is readable and if not, quit
if( !File::isReadable($fileName)) {
- $this->log->debug( "storeFile: file $fileName is not readable!" );
return false;
}
$destFile = $destPath.$destFile;
- $this->log->debug(" copying $fileName to $destFile" );
if( $mode == RESOURCE_STORAGE_STORE_COPY )
$res = File::copy( $fileName, $destFile );
else
$res = File::rename( $fileName, $destFile );
if( !$res ) {
- $this->log->debug( "There was an error copying the file!" );
return false;
}
// check that the permissions are correct
- $this->log->debug( "chmodding file to 0777" );
File::chMod( $destFile, 0755 );
return $destFile;
@@ -365,7 +329,6 @@
$filePath = $this->getUserFolder( $resource->getOwnerId());
$fullName = $filePath.$fileName;
- $this->log->debug( "removing resource ".$fullName );
if( File::isReadable( $fullName)) {
$result = File::delete( $fullName );
}
@@ -373,13 +336,11 @@
// and now if preview images are available, remove them too!
if( $resource->hasPreview()) {
// delete the small thumbnail
- $this->log->debug( "Removing preview!" );
$previewFile = $resource->getPreviewFileName();
if( File::isReadable( $previewFile ))
File::delete( $previewFile );
// and the medium-sized thumbnail
- $this->log->debug( "Removing medium-size preview!");
$medPreviewFile = $resource->getMediumSizePreviewFileName();
if( File::isReadable( $medPreviewFile ))
File::delete( $medPreviewFile );
Modified: plog/trunk/class/gallery/resizers/gallerygdresizer.class.php
===================================================================
--- plog/trunk/class/gallery/resizers/gallerygdresizer.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/gallery/resizers/gallerygdresizer.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -183,22 +183,18 @@
// say that gd2 is not available
$config =& Config::getConfig();
if( $config->getValue( "thumbnail_generator_force_use_gd1" )) {
- $this->log->debug("Forcing GD1");
return false;
}
// if not, we still check in case the user made a mistake...
$testGD = get_extension_funcs("gd"); // Grab function list
if ( !$testGD ) {
- $this->log->debug("There is no GD installed!");
return false;
}
if (in_array ("imagegd2",$testGD)) {
- $this->log->debug("Using GD2");
return true;
}
else {
- $this->log->debug("Using GD1");
return false;
}
}
@@ -217,11 +213,9 @@
$resample = GD_RESIZER_NO_SMOOTHING_MODE ) {
$pxls = intval($src_w / $dst_w)-1;
if( $resample == GD_RESIZER_PHP_IMAGECOPYRESAMPLED ) {
- $this->log->debug("Using ImageCopyResapmled!");
imagecopyresampled($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
}
elseif( $resample == GD_RESIZER_BILINEAR_MODE ) { //slow but better quality
- $this->log->debug( "Using Bi-linear filter!" );
ImageTrueColorToPalette( $src_img, false, 256 );
ImagePaletteCopy ($dst_img, $src_img);
$rX = $src_w / $dst_w;
@@ -245,7 +239,6 @@
}
}
elseif ( $resample == GD_RESIZER_BICUBIC_MODE ) { // veeeeeery slow but better quality
- $this->log->debug( "Using Bi-cubic filter!" );
ImagePaletteCopy ($dst_img, $src_img);
$rX = $src_w / $dst_w;
$rY = $src_h / $dst_h;
@@ -272,7 +265,6 @@
}
}
else {
- $this->log->debug("Using no filter!");
$dst_w++; $dst_h++; //->no black border
imagecopyresized($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
}
@@ -289,11 +281,9 @@
//if( function_exists("imagecreatetruecolor")) {
if( $this->isGD2Available()) {
- $this->log->debug("using GD2");
$this->img["des"] = @ImageCreateTrueColor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);
}
else {
- $this->log->debug("Using GD1");
$this->img["des"] = @ImageCreate($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);
}
@@ -326,8 +316,6 @@
$result = false;
}
}
-
- $this->log->debug("image saved?");
return $result;
}
Modified: plog/trunk/class/gallery/resizers/galleryimagemagickresizer.class.php
===================================================================
--- plog/trunk/class/gallery/resizers/galleryimagemagickresizer.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/gallery/resizers/galleryimagemagickresizer.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -36,7 +36,6 @@
// run the command
$command = $convertPath." -geometry ".$width."x".$height." ".$this->_image." ".$outFile;
- //$this->log->debug( "ImageMagick resizer: ".$command );
$cmdOuput = system($command, $retval);
// check if there was an error creating the thubmnail
Modified: plog/trunk/class/gallery/resizers/galleryresizer.class.php
===================================================================
--- plog/trunk/class/gallery/resizers/galleryresizer.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/gallery/resizers/galleryresizer.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -133,8 +133,6 @@
if( $height == "" || $height < 0 )
$height = DEFAULT_THUMB_HEIGHT;
- //$this->log->debug("input file = ".$this->_image."<br/>");
-
// we can get into this 'else' if the image was not stored *or* we do not
// wish to use the cached version
@@ -149,9 +147,7 @@
$fileNoExt = implode( ".", $fileParts );
$outFile = $fileNoExt.".".$this->_defaultOutputFormat;
}
- //$this->log->debug("outfile = $outFile");
- //$this->log->debug("<br/>thumbnail::generate: width:".$width." - height: ".$height."<br/>");
$imgThumb = $generatorClassObject->generate( $outFile, $width, $height );
return $imgThumb;
Modified: plog/trunk/class/locale/locale.class.php
===================================================================
--- plog/trunk/class/locale/locale.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/locale/locale.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -117,8 +117,8 @@
unset($messages);
- if( function_exists('memory_get_usage'))
- $this->log->debug('Memory used after loading locale ' . $this->_code . ': ' . memory_get_usage());
+ /*if( function_exists('memory_get_usage'))
+ $this->log->debug('Memory used after loading locale ' . $this->_code . ': ' . memory_get_usage());*/
}
/**
@@ -139,8 +139,8 @@
unset( $this->_messages );
$this->_messages = NULL;
- if( function_exists('memory_get_usage'))
- $this->log->debug('Freeing memory for locate ' . $this->_code . ': ' . memory_get_usage());
+ /*if( function_exists('memory_get_usage'))
+ $this->log->debug('Freeing memory for locate ' . $this->_code . ': ' . memory_get_usage());*/
return( true );
}
Modified: plog/trunk/class/net/customurlhandler.class.php
===================================================================
--- plog/trunk/class/net/customurlhandler.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/net/customurlhandler.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -67,7 +67,6 @@
// if it didn't work out the first time, let's try with an additional url format
if( !$this->_fillRequestParameters()) {
- $this->log->debug( "The url \"$requestUri\" was not a valid custom url, falling back to search engine url..." );
$m = new LinkFormatMatcher( $requestUri, $this->_fallback );
$this->_format = $m->identify();
$this->_params = $m->getParameters();
Modified: plog/trunk/class/net/http/session/sessionmanager.class.php
===================================================================
--- plog/trunk/class/net/http/session/sessionmanager.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/net/http/session/sessionmanager.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -61,9 +61,6 @@
$path = dirname($url->getPath());
if( $path == "" || $path == "\\" )
$path = "/";
-
- $log =& LoggerManager::getLogger();
- $log->debug("cookie path = $path");
ini_set( "session.cookie_path", $path );
}
@@ -84,9 +81,6 @@
// 'localhost' or internal domains for obvious security reasons...
// See comments in http://fi.php.net/manual/en/function.session-set-cookie-params.php
if( count(explode('.', $domain)) > 1 ) {
- $log =& LoggerManager::getLogger();
- $log->debug("cookie domain = $domain");
-
ini_set( "session.cookie_domain", $domain );
}
}
Modified: plog/trunk/class/net/linkparser.class.php
===================================================================
--- plog/trunk/class/net/linkparser.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/net/linkparser.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -48,9 +48,7 @@
function parseLink( $url )
{
- $uri = $url;
-
- $this->log->debug( "URL = $uri - Format = ".$this->_linkFormat );
+ $uri = $url;
global $urlRewriteTags;
$rewritecode = array_keys( $urlRewriteTags );
@@ -60,7 +58,6 @@
$matchre = str_replace( "/", "/", $this->_linkFormat );
$matchre = str_replace( "$", "\$", $matchre );
$matchre = str_replace( $rewritecode, $rewritereplace, $matchre );
- $this->log->debug("<b>matchre = $matchre</b>");
// Extract the key values from the uri:
$count = preg_match("#$matchre#",$uri,$values);
Modified: plog/trunk/class/object/object.class.php
===================================================================
--- plog/trunk/class/object/object.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/object/object.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -24,8 +24,7 @@
if(PHP_VERSION < 5)
include_once( PLOG_CLASS_PATH."class/object/exception.class.php" );
- include_once( PLOG_CLASS_PATH."class/logger/loggermanager.class.php" );
- include_once( PLOG_CLASS_PATH."class/logger/LogUtil.php" );
+ include_once( PLOG_CLASS_PATH."class/logger/loggermanager.class.php" );
include_once( PLOG_CLASS_PATH."debug.php" );
/**
@@ -57,8 +56,8 @@
*/
function Object()
{
- // initialize logging
- $this->log =& LoggerManager::getLogger( "default" );
+ // initialize logging -- enable this only for debugging purposes
+ //$this->log =& LoggerManager::getLogger( "default" );
}
function __getObjectId()
Modified: plog/trunk/class/plugin/pluginbase.class.php
===================================================================
--- plog/trunk/class/plugin/pluginbase.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/plugin/pluginbase.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -126,7 +126,6 @@
function PluginBase()
{
$this->Object();
- //$this->log->debug( "PluginBase::constructor being called!" );
}
/**
@@ -321,8 +320,6 @@
*/
function notifyEvent( $eventType, $params = Array())
{
- $this->log->debug( "plugin ".$this->id." - throwing event ".$eventType );
-
// get a handle to the plugin manager and throw the event with its parameters
$pm =& PluginManager::getPluginManager();
return( $pm->notifyEvent( $eventType, $params ));
Modified: plog/trunk/class/plugin/pluginmanager.class.php
===================================================================
--- plog/trunk/class/plugin/pluginmanager.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/plugin/pluginmanager.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -78,7 +78,6 @@
*/
function setBlogInfo( &$blogInfo )
{
- //$this->log->debug( "Setting blog info!" );
$this->_blogInfo = $blogInfo;
}
@@ -89,7 +88,6 @@
*/
function setUserInfo( &$userInfo )
{
- //$this->log->debug( "Setting user info!" );
$this->_userInfo = $userInfo;
}
@@ -226,7 +224,6 @@
function _loadPluginLocale( $pluginId, $locale )
{
- $this->log->debug("loading locale $locale for plugin $pluginId");
return( Locales::getPluginLocale( $pluginId, $locale ));
}
Modified: plog/trunk/class/security/bayesianfilter.class.php
===================================================================
--- plog/trunk/class/security/bayesianfilter.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/security/bayesianfilter.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -48,21 +48,17 @@
if (!$config->getValue("bayesian_filter_enabled"))
{
- //$this->log->debug( "bayesian filter is disabled<br/>");
return new PipelineResult(true);
}
// get some info
$blogInfo = $this->_pipelineRequest->getBlogInfo();
$request = $this->_pipelineRequest->getHttpRequest();
-
- //$this->log->debug( "processing bayesian filter...<br/>");
// we only have to filter the contents if the user is posting a comment
// so there's no point in doing anything else if that's not the case
if( $request->getValue( "op" ) != "AddComment" ) {
$result = new PipelineResult();
- //$this->log->debug( "nothing to filter!<br/>");
return $result;
}
@@ -95,11 +91,9 @@
null, $userName, $userEmail, $userUrl, $clientIp,
0, COMMENT_STATUS_SPAM );
$comments->addComment( $comment );
- //$this->log->debug("comment has been kept in the database marked as spam!<br/>");
}
else {
// nothing to do here, simply throw the comment away
- //$this->log->debug("comment has been thrown away!<br/>");
}
$spam = true;
}
@@ -110,7 +104,6 @@
}
// train the filter with the message, be it spam or not...
- //$this->log->debug("training the filter with spam = $spam<br/>");
BayesianFilterCore::train( $blogInfo->getId(), $commentTopic, $commentText, $userName, $userEmail,
$userUrl, $spam );
@@ -155,7 +148,6 @@
foreach ($tokens as $token)
{
- //$this->log->debug("updating occurrences for token $token<br/>");
$bayesianTokens->updateOccurrences($blogId, $token, 0, 0, $totalSpam, $totalNonSpam, false);
}
Modified: plog/trunk/class/summary/action/activeaccountaction.class.php
===================================================================
--- plog/trunk/class/summary/action/activeaccountaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/action/activeaccountaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -36,13 +36,9 @@
$this->_view->setErrorMessage( $this->_locale->tr("error_invalid_user"));
return false;
}
-
- //$this->log->debug("user info is ".LogUtil::format($userInfo));
-
+
$activeCode = $userInfo->getValue("activeCode");
if($activeCode != $this->activeCode){
- $this->log->debug("active code in db is:".$activeCode);
- $this->log->debug("active code from user is:".$this->activeCode);
$this->_view = new SummaryView( "summaryerror", $this->_locale->tr("error_invalid_activation_code"));
return false;
}
@@ -50,7 +46,6 @@
// active user
$userInfo->setStatus(USER_STATUS_ACTIVE);
$users->updateUser($userInfo);
- $this->log->debug("active user successfully!");
// also active the blog that user owned
// FIXME: how about other blogs that this user take part in?
$blogId = $users->getUserBlogId( $this->username);
Modified: plog/trunk/class/summary/action/chooseblogtemplateaction.class.php
===================================================================
--- plog/trunk/class/summary/action/chooseblogtemplateaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/action/chooseblogtemplateaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -36,9 +36,6 @@
$this->userPassword = $this->_request->getValue( "userPassword" );
$this->userEmail = $this->_request->getValue( "userEmail" );
$this->userFullName = $this->_request->getValue( "userFullName" );
-
- $this->log->debug("blog name is ".$this->blogName);
-
// show some info, and we're all happy!
//$this->_view = new SummaryView( "registerstep4" );
Modified: plog/trunk/class/summary/action/doblogregistration.class.php
===================================================================
--- plog/trunk/class/summary/action/doblogregistration.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/action/doblogregistration.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -31,12 +31,7 @@
{
// validated values
$tf = new Textfilter();
-
- //$this->log->debug("blog name is ".$this->blogName);
- $this->log->debug("blog name is ".$this->_request->getValue(blogName));
-
-
// create the new view and clean the cache
$this->_view = new BlogTemplateChooserView();
$this->setValues();
Modified: plog/trunk/class/summary/action/dofinishregister.class.php
===================================================================
--- plog/trunk/class/summary/action/dofinishregister.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/action/dofinishregister.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -70,10 +70,8 @@
// if user registration need email confirm, that is
// user must active his account
if($this->need_confirm == true){
- $this->log->debug("set user status to unconfirmed");
$user->setStatus(USER_STATUS_UNCONFIRMED);
} else {
- $this->log->debug("set user status to active");
$user->setStatus(USER_STATUS_ACTIVE);
}
@@ -98,21 +96,14 @@
$this->blogLocale = $this->_request->getValue("blogLocale");
$this->templateId = $this->_request->getValue("templateId");
-
- $this->log->debug("blogName is ".$this->blogName);
- $this->log->debug("blogLocale is ".$this->blogLocale);
- $this->log->debug("userId is ".$userId);
-
// get the default locale configured for the site
$blogs = new Blogs();
$blogInfo = new BlogInfo( $this->blogName, $userId, "", "" );
if($this->need_confirm == 1){
$blogInfo->setStatus( BLOG_STATUS_UNCONFIRMED );
- $this->log->debug("set blog status to disabled.");
} else {
$blogInfo->setStatus( BLOG_STATUS_ACTIVE );
- $this->log->debug("set blog status to active.");
}
$locale = Locales::getLocale( $this->blogLocale );
@@ -121,14 +112,11 @@
$newblogId = $blogs->addBlog( $blogInfo );
if( !$newblogId ) {
- $this->log->debug("add blog failed,blog name is ".$this->blogName);
$this->_view = new SummaryView( "registererror" );
$this->_view->setErrorMessage( $this->_locale->tr("error_creating_blog"));
return false;
}
- $this->log->debug("create blog:".$this->blogName);
-
// get info about the blog
$blogInfo = $blogs->getBlogInfo( $newblogId );
@@ -149,8 +137,6 @@
$articles = new Articles();
$articles->addArticle( $article );
- $this->log->debug("create blog successfully, add default artice done");
-
return true;
}
//}}}
@@ -163,7 +149,6 @@
$this->_view = new SummaryView("registerstep5");
if($this->need_confirm == 1){
- $this->log->debug("registration need email confirm. ");
$this->_view->setValue("need_email_confirm",1);
$this->sendConfirmEmail();
}
@@ -185,8 +170,6 @@
function sendConfirmEmail(){
$activeCode = $this->generateActiveCode();
- $this->log->debug("active code is ".$activeCode);
-
// store the active code to the backend db in the properties field of user table
$users = new Users();
$userInfo = $users->getUserInfoFromUsername($this->userName);
@@ -207,8 +190,6 @@
.$this->userName."&activeCode=".$activeCode);
$message->createBody();
- //$this->log->debug("message is :".LogUtil::format($message));
-
$service = new EmailService();
$service->sendMessage( $message );
@@ -224,7 +205,6 @@
function generateActiveCode(){
srand((double)microtime() * 10000000);
$activeCode = md5(time() . rand(1, 10000000));
- $this->log->debug("in generateActivecode, active code is ".$activeCode);
return $activeCode;
}
//}}}
Modified: plog/trunk/class/summary/action/dousercreation.class.php
===================================================================
--- plog/trunk/class/summary/action/dousercreation.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/action/dousercreation.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -54,7 +54,6 @@
$config =& Config::getConfig();
if( $config->getValue( "force_one_blog_per_email_account" )) {
if( $users->emailExists($this->userEmail)) {
- $this->log->debug("email address ".$this->userEmail." has used by someone.");
$this->_view = new SummaryView( "registerstep1" );
//$this->_form->hasRun( true );
$this->_form->setFieldValidationStatus( "userEmail", false );
Modified: plog/trunk/class/summary/action/summarydefaultaction.class.php
===================================================================
--- plog/trunk/class/summary/action/summarydefaultaction.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/action/summarydefaultaction.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -36,7 +36,6 @@
$blogs = new Blogs();
$stats = new SummaryStats();
- $this->log->debug("stats is ".$stats);
// load the posts, filtering out all those registration messages...
$registerTopic = $this->_locale->tr( "register_default_article_topic" );
Modified: plog/trunk/class/summary/action/summarysetnewpassword.class.php
===================================================================
--- plog/trunk/class/summary/action/summarysetnewpassword.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/action/summarysetnewpassword.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -28,7 +28,6 @@
// check that the parameters are there...
$val = new StringValidator();
if( !$val->validate( $this->_userNameHash ) || !$val->validate( $this->_requestHash )) {
- $this->log->debug("1");
$this->_view = new SummaryView( "summaryerror" );
$this->_view->setErrorMessage( $this->_locale->tr("error_incorrect_request" ));
return false;
Modified: plog/trunk/class/summary/dao/summarystats.class.php
===================================================================
--- plog/trunk/class/summary/dao/summarystats.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/dao/summarystats.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -59,7 +59,6 @@
$result = $this->_db->Execute( $query );
if( !$result ){
- $this->log->debug("no most commented articles was found!");
return Array();
}
@@ -83,7 +82,6 @@
*/
function getMostReadArticles( $maxPosts = 0, $ignoreTopic = "", $ignoreText = "", $date = 0 )
{
- $this->log->debug("getMostReadArticles, ignoreTopic is ".$ignoreTopic);
$query = " SELECT
a.id as id,
a.properties as properties,
@@ -113,8 +111,6 @@
$query .= " ORDER BY a.num_reads DESC ";
- $this->log->debug("getMostReadArticles, query is ".$query);
-
if( $maxPosts > 0 )
$query .= " LIMIT 0,".$maxPosts;
@@ -127,7 +123,6 @@
$articles = new Articles();
while( $row = $result->FetchRow()) {
$post = $articles->_fillArticleInformation($row);
- //$this->log->debug($post);
array_push( $posts, $post );
}
@@ -152,7 +147,6 @@
$result = $this->_db->Execute( $query );
if( !$result ){
- $this->log->debug("no recent created blogs found!");
return Array();
}
@@ -189,7 +183,6 @@
$result = $this->_db->Execute( $query );
if( !$result ){
- $this->log->debug("no most active blogs found!");
return Array();
}
@@ -263,9 +256,7 @@
WHERE t.article_id = a.id AND TO_DAYS(NOW()) - TO_DAYS(a.date) < 7 AND l.article_id = a.id AND l.category_id = c.id AND
c.in_main_page = 1 AND a.status = ".POST_STATUS_PUBLISHED;
- $this->log->debug($query);
-
// in case we'd like to ignore certain posts based on a topic (like the registration message!)
if( $ignoreTopic != "" ) {
$query .= " AND t.topic NOT LIKE '".Db::qstr( $ignoreTopic )."' ";
Modified: plog/trunk/class/summary/view/summarycachedview.class.php
===================================================================
--- plog/trunk/class/summary/view/summarycachedview.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/summary/view/summarycachedview.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -44,11 +44,8 @@
{
foreach( $this->_data as $key => $value )
$cacheId .= "$key=$value";
- $this->log->debug("cacheId pre-md5 = ".$cacheId);
$cacheId = md5($cacheId);
- $this->log->debug("MD5(cacheId) = $cacheId" );
-
return $cacheId;
}
@@ -59,11 +56,8 @@
function isCached()
{
- $this->log->debug("checking if ".$this->_templateName." is cached -- cacheId = ".$this->_viewId );
$isCached = $this->_template->isCached( $this->_viewId );
- $this->log->debug("isCached = $isCached");
-
return $isCached;
}
@@ -91,7 +85,6 @@
if( $config->getValue( "template_http_cache_enabled" )) {
// some debug information
$timestamp = $this->_template->getCreationTimestamp();
- $this->log->debug("cache creation timestamp: ".$timestamp);
// and now send the correct headers
if( HttpCache::httpConditional( $timestamp ))
$sendOutput = false;
Modified: plog/trunk/class/template/cachedtemplate.class.php
===================================================================
--- plog/trunk/class/template/cachedtemplate.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/template/cachedtemplate.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -52,7 +52,6 @@
*/
function isCached( $cacheId )
{
- $this->log->debug("checking if ".$this->_templateFile." is cached! (2) -- cacheId = $cacheId" );
$isCached = $this->is_cached( $this->_templateFile, $cacheId );
return $isCached;
Modified: plog/trunk/class/template/menu/menurenderer.class.php
===================================================================
--- plog/trunk/class/template/menu/menurenderer.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/template/menu/menurenderer.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -103,8 +103,6 @@
if( $depth > 0 )
$result .= $this->_render( $child, $depth, $activeOpt );
}
- else
- $this->log->debug( "user ".$this->_userInfo->getUsername()." cannot see option ".$child->name );
}
}
$result .= "</ul>";
@@ -147,7 +145,6 @@
$count=0;
foreach( $parts as $part ) {
$path .= $part;
- $this->log->debug("path = $path");
$menuEntry = $this->_menu->getEntryAt( $path );
if( $menuEntry->getAttribute("ignoreBreadCrumbs") != "1" ) {
$localeId = $this->getLocaleId( $menuEntry );
Modified: plog/trunk/class/template/smarty/plugins/function.debug.php
===================================================================
--- plog/trunk/class/template/smarty/plugins/function.debug.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/template/smarty/plugins/function.debug.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -21,7 +21,7 @@
* @param Smarty
* @return string output from {@link Smarty::_generate_debug_output()}
*/
-function smarty_function$this->log->debug($params, &$smarty)
+function smarty_function_debug($params, &$smarty)
{
if($params['output']) {
$smarty->assign('_smarty_debug_output',$params['output']);
Modified: plog/trunk/class/template/templateservice.class.php
===================================================================
--- plog/trunk/class/template/templateservice.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/template/templateservice.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -103,12 +103,9 @@
$t->cache_dir = $templateTmpFolder;
$t->compile_dir = $templateTmpFolder;
- $this->log->debug("checking if $templateTmpFolder exists!");
-
// and now make sure that there is a folder where we can save
// our rendered templates
if( !File::exists( $templateTmpFolder )) {
- $this->log->debug( "creating temporary folder $templateTmpFolder" );
File::createDir( $templateTmpFolder, DEFAULT_TEMPLATE_TEMP_FOLDER_PERMISSIONS );
}
@@ -261,14 +258,11 @@
else {
$blogTmpFolder = $tmpFolder.'/'.$blogInfo->getId();
if( !File::exists( $blogTmpFolder )) {
- $this->log->debug( "creating temporary folder $blogTmpFolder" );
File::createDir( $blogTmpFolder, DEFAULT_TEMPLATE_TEMP_FOLDER_PERMISSIONS );
}
$t->secure_dir[] = "./templates/blog_".$blogInfo->getId()."/$layout";
}
- $this->log->debug(" Template::secure_dir = ".$t->secure_dir);
-
$t->cache_dir = $blogTmpFolder;
$t->compile_dir = $blogTmpFolder;
Modified: plog/trunk/class/template/templatesets/templatesetstorage.class.php
===================================================================
--- plog/trunk/class/template/templatesets/templatesetstorage.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/template/templatesets/templatesetstorage.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -375,7 +375,6 @@
$templatePath = $this->getTemplateFolder( $templateName, $blogId );
// and return whether it is available or not
$screenshotPath = $templatePath."/screenshot.jpg";
- $this->log->debug("blogId = $blogId - template = $templateName - screenshot = $screenshotPath");
return( File::isReadable( $screenshotPath ));
}
@@ -400,8 +399,6 @@
else
$screenshotPath = "$baseUrl/$templateFolder/blog_{$blogId}/$templateName/screenshot.jpg";
- $this->log->debug( "screenshot url = $screenshotPath" );
-
return $screenshotPath;
}
Modified: plog/trunk/class/view/blogview.class.php
===================================================================
--- plog/trunk/class/view/blogview.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/view/blogview.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -97,7 +97,6 @@
$t->setYear( $yearName );
$t->setMonth( $monthName );
$archiveUrl = $urls->getArchiveLink( $t->getYear().$t->getMonth());
- $this->log->debug("archive url = $archiveUrl");
$linkName = $locale->formatDate( $t, '%B %Y' );
$link = new ArchiveLink( $linkName, '', $archiveUrl, $this->_blogInfo->getId(), 0, $month, 0);
$links[] = $link;
@@ -183,7 +182,6 @@
function render()
{
if( !$this->isCached()) {
- $this->log->debug("generating contents!");
// and then add our stuff to the view...
$this->setValue( 'archives', $this->_getArchives());
$this->setValue( 'recentposts', $this->_getRecentPosts());
Modified: plog/trunk/class/view/resourceserverview.class.php
===================================================================
--- plog/trunk/class/view/resourceserverview.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/view/resourceserverview.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -81,7 +81,6 @@
$config =& Config::getConfig();
$useCaching = $config->getValue( 'resource_server_http_cache_enabled' );
if( $useCaching ) {
- $this->log->debug( "Using HTTP caching for resources!" );
// send the "Last-Modified" header
$resDate = $this->_resource->getTimestamp();
$lastModified = $resDate->getDate( DATE_FORMAT_UNIXTIME );
Modified: plog/trunk/class/view/smartyview.class.php
===================================================================
--- plog/trunk/class/view/smartyview.class.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/class/view/smartyview.class.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -88,15 +88,11 @@
*/
function isCached()
{
- $this->log->debug("checking if ".$this->_templateName." is cached -- viewId = ".$this->_viewId."<br/>" );
-
if( $this->isCachingEnabled())
$isCached = $this->_template->isCached( $this->_viewId );
else
$isCached = false;
- $this->log->debug("isCached = $isCached<br/>");
-
return $isCached;
}
@@ -110,12 +106,9 @@
{
foreach( $this->_data as $key => $value )
$viewId .= "$key=$value";
-
- $this->log->debug("viewId pre-md5 = ".$viewId."<br/>");
+
$viewId = md5($this->_blogInfo->getId()."-".$viewId);
- $this->log->debug("MD5(viewId) = $viewId<br/>" );
-
return $viewId;
}
@@ -165,7 +158,6 @@
if( $this->isTemplateHttpCacheEnabled() && $this->isCached()) {
// some debug information
$timestamp = $this->_template->getCreationTimestamp();
- $this->log->debug("cache creation timestamp: ".$timestamp);
// and now send the correct headers
if( HttpCache::httpConditional( $timestamp ))
$sendOutput = false;
@@ -174,13 +166,11 @@
header( $header );
}
else {
- $this->log->debug("HTTP cache disabled, sending contents anyway!");
// send the results if needed
$sendOutput = true;
}
if( $sendOutput ) {
- $this->log->debug( "sending contents!" );
// pass all the values to the template object
$this->_template->assign( $this->_params->getAsArray());
Modified: plog/trunk/config/logging.properties.php
===================================================================
--- plog/trunk/config/logging.properties.php 2005-03-20 17:09:44 UTC (rev 1558)
+++ plog/trunk/config/logging.properties.php 2005-03-20 17:22:01 UTC (rev 1559)
@@ -6,17 +6,30 @@
#
$config["default"] = Array(
"layout" => "%d %N - [%f:%l (%c:%F)] %m%n",
- "appender" => "file",
+ "appender" => "null",
"file" => "tmp/plog.log",
"prio" => "debug"
);
#
+# this logger is the only one enabled by default
+# and it will log all sql queries that generate an error
+# to the file tmp/sql_error.log
+#
+$config["sqlerr"] = Array(
+ "layout" => "%d %N - %m%n",
+ "appender" => "file",
+ "file" => "tmp/sql_error.log",
+ "prio" => "error"
+ );
+
+#
# special logger for the trackback.php script, it sends the data to
# tmp/trackback.log
+#
$config["trackback"] = Array(
"layout" => "%d %N - [%f:%l (%c:%F)] %m%n",
- "appender" => "file",
+ "appender" => "null",
"file" => "tmp/trackback.log",
"prio" => "debug"
);
More information about the pLog-svn
mailing list