View Single Post
Old July 6th, 2005, 04:52 PM   #8 (permalink)
Astaran
Member
Verified Customer
 
Join Date: Jan 2004
Posts: 220
What's working for me:
add 'oldstat' => STRING to typecast call (POST).
And change the if statement to:

//BUGFIX: changed olstat = yes to no
if ( $isprivate == "yes" && $oldstat == "no" ) {
$pa_password = gen_password();

$query = "UPDATE {$Globals['pp_db_prefix']}categories SET password='$pa_password' WHERE id=$albumid";
$setug = ppmysql_query($query,$link);
}
// BUGFIX: changed olstat = no to yes
elseif ( $isprivate == "no" && $oldstat == "yes" ) {
$query = "UPDATE {$Globals['pp_db_prefix']}categories SET password='' WHERE id=$albumid";
$setug = ppmysql_query($query,$link);
}
Astaran is offline   Reply With Quote