Changeset 877:e012da998f83 for inc/public
- Timestamp:
- 08/16/12 14:13:27 (13 years ago)
- Branch:
- sexy
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/public/lib.urlhandlers.php
r876 r877 315 315 { 316 316 $post_id = $_ctx->posts->post_id; 317 $post_password = $_ctx->posts->post_password;318 319 # Password protected entry320 if ($post_password != '' && !$_ctx->preview)321 {322 # Get passwords cookie323 if (isset($_COOKIE['dc_passwd'])) {324 $pwd_cookie = unserialize($_COOKIE['dc_passwd']);325 } else {326 $pwd_cookie = array();327 }328 329 # Check for match330 if ((!empty($_POST['password']) && $_POST['password'] == $post_password)331 || (isset($pwd_cookie[$post_id]) && $pwd_cookie[$post_id] == $post_password))332 {333 $pwd_cookie[$post_id] = $post_password;334 setcookie('dc_passwd',serialize($pwd_cookie),0,'/');335 }336 else337 {338 self::serveDocument('password-form.html','text/html',false);339 return;340 }341 }342 343 317 # The entry 344 318 self::serveDocument('post.html');
Note: See TracChangeset
for help on using the changeset viewer.