[pLog-svn] r4014 - in plugins/branches/lifetype-1.1/secret:
class/action class/security locale
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Sep 21 21:35:55 GMT 2006
Author: oscar
Date: 2006-09-21 21:35:54 +0000 (Thu, 21 Sep 2006)
New Revision: 4014
Modified:
plugins/branches/lifetype-1.1/secret/class/action/adminsecretpluginupdatesettingsaction.class.php
plugins/branches/lifetype-1.1/secret/class/security/secretitemfilter.class.php
plugins/branches/lifetype-1.1/secret/locale/locale_en_UK.php
Log:
a few more fixes for the 'secret' plugin
Modified: plugins/branches/lifetype-1.1/secret/class/action/adminsecretpluginupdatesettingsaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/secret/class/action/adminsecretpluginupdatesettingsaction.class.php 2006-09-21 21:14:42 UTC (rev 4013)
+++ plugins/branches/lifetype-1.1/secret/class/action/adminsecretpluginupdatesettingsaction.class.php 2006-09-21 21:35:54 UTC (rev 4014)
@@ -39,7 +39,6 @@
// check if the checkbox fields exists
if( !array_key_exists( "password_protected", $blogFields )) {
- _debug("creating password field!");
$protectedField = new CustomField( "password_protected",
$this->_locale->tr("password_protected_help"),
CUSTOM_FIELD_CHECKBOX,
@@ -47,7 +46,6 @@
$customFields->addCustomField( $protectedField );
}
else {
- _debug("enabling! password field!");
$protectedField = $blogFields["password_protected"];
$protectedField->setHidden( false );
$customFields->updateCustomField( $protectedField );
@@ -55,7 +53,6 @@
// check if the field for the password exists
if( !array_key_exists( "password_field", $blogFields )) {
- _debug("creating pass-word field!");
$passwordField = new CustomField( "password_field",
$this->_locale->tr("password_field_help"),
CUSTOM_FIELD_TEXTBOX,
@@ -63,7 +60,6 @@
$customFields->addCustomField( $passwordField );
}
else {
- _debug("enabling! pass-word field!");
$passwordField = $blogFields["password_field"];
$passwordField->setHidden( false );
$customFields->updateCustomField( $passwordField );
@@ -83,7 +79,6 @@
// check if the checkbox fields exists
if( array_key_exists( "password_protected", $blogFields )) {
- _debug("hiding! password field!");
$protectedField = $blogFields["password_protected"];
$protectedField->setHidden( true );
$customFields->updateCustomField( $protectedField );
@@ -91,7 +86,6 @@
// check if the field for the password exists
if( array_key_exists( "password_field", $blogFields )) {
- _debug("hiding! pass-word field!");
$passwordField = $blogFields["password_field"];
$passwordField->setHidden( true );
$customFields->updateCustomField( $passwordField );
Modified: plugins/branches/lifetype-1.1/secret/class/security/secretitemfilter.class.php
===================================================================
--- plugins/branches/lifetype-1.1/secret/class/security/secretitemfilter.class.php 2006-09-21 21:14:42 UTC (rev 4013)
+++ plugins/branches/lifetype-1.1/secret/class/security/secretitemfilter.class.php 2006-09-21 21:35:54 UTC (rev 4014)
@@ -29,7 +29,7 @@
// get some info
$blogInfo = $this->_pipelineRequest->getBlogInfo();
$request = $this->_pipelineRequest->getHttpRequest();
- $session = HttpVars::getSession();
+ $session = HttpVars::getSession();
// if this is already rejected, there is no reason to do anything here
if ( $this->_pipelineRequest->getRejectedState() )
@@ -92,13 +92,14 @@
// check if the article should be protected or not
$secretItems = new SecretItems();
- if( $secretItems->articleIsSecret( $articleId )) {
+ if( $secretItems->articleIsSecret( $articleId )) {
// if so, first check if the password does not already exist in the session
$itemPassword = $request->getValue( "itemPassword" );
// do we already have this information in the session?
$sessionKey = "article_".$articleId."_auth";
if( $session[ "$sessionKey" ] != "" ) {
+
// check if the information is correct
if( $secretItems->authenticateItemHash( $articleId, $session[ "$sessionKey" ] )) {
// if all correct, go ahead!
@@ -115,7 +116,6 @@
}
else {
// if the user authenticated correctly, then put the information in the session
- _debug("authenticated correctly!");
$session = HttpVars::getSession();
$session[ "$sessionKey" ] = md5( $itemPassword );
$result = new PipelineResult( true );
Modified: plugins/branches/lifetype-1.1/secret/locale/locale_en_UK.php
===================================================================
--- plugins/branches/lifetype-1.1/secret/locale/locale_en_UK.php 2006-09-21 21:14:42 UTC (rev 4013)
+++ plugins/branches/lifetype-1.1/secret/locale/locale_en_UK.php 2006-09-21 21:35:54 UTC (rev 4014)
@@ -14,7 +14,7 @@
$messages["password_protected"] = "Password Protected";
$messages["password_protected_help"] = "Enable Password Protection";
$messages["password_field"] = "Password";
-$messages["password_field_help"] = "Password for this entry (only applies if the post is enabling password protection, otherwise it will be ignored).";
+$messages["password_field_help"] = "Password for this entry (only applies if the 'enable password protection' checkbox on the right side has been enabled, otherwise it will be ignored).";
$messages["item_protected"] = "Secret Post";
$messages["item_protected_help"] = "Please kindly input your password! This is a secret post, you can not read this article without password.";
More information about the pLog-svn
mailing list