public_html/admin/story.php
branchHEAD
changeset 7400 37fcd14cdee2
parent 7386 c0af5c30022f
child 7413 5db714583481
     1.1 --- a/public_html/admin/story.php	Sat Oct 17 23:00:40 2009 +0200
     1.2 +++ b/public_html/admin/story.php	Thu Oct 29 18:09:46 2009 +0100
     1.3 @@ -727,11 +727,22 @@
     1.4      $story_templates->set_var('lang_cancel', $LANG_ADMIN['cancel']);
     1.5      $story_templates->set_var('lang_delete', $LANG_ADMIN['delete']);
     1.6      $story_templates->set_var('gltoken_name', CSRF_TOKEN);
     1.7 -    $story_templates->set_var('gltoken', SEC_createToken());
     1.8 +    $token = SEC_createToken();
     1.9 +    $story_templates->set_var('gltoken', $token);
    1.10      $story_templates->parse('output','editor');
    1.11  
    1.12      $display .= COM_startBlock ($LANG24[5], '',
    1.13                          COM_getBlockTemplate ('_admin_block', 'header'));
    1.14 +
    1.15 +    $expirytime = SEC_getTokenExpiryTime($token);
    1.16 +    if ($expirytime > 0) {
    1.17 +        $txt = '<p id="token-expirynotice">' . '' . '</p>';
    1.18 +        $exptime = '<span id="token-expirytime">'
    1.19 +                 . strftime($_CONF['timeonly'], $expirytime) . '</span>';
    1.20 +        $display .= '<p id="token-expirynotice">'
    1.21 +                 . sprintf($LANG24[91], $exptime) . '</p>';
    1.22 +    }
    1.23 +
    1.24      $display .= $story_templates->finish($story_templates->get_var('output'));
    1.25      $display .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));
    1.26