Ignore:
Timestamp:
Feb 14, 2009, 3:24:10 AM (15 years ago)
Author:
rvelices
Message:

Last (I hope) paranoic optims ...

  • move get_uysername and get_groupname from public to admin/functions.inc.php
  • optim in index.php
  • tags.tpl does not need smarty modifier included
  • move func get_comment_post_key from functions_comment to functions (avoid extra inclusion every time on picture page)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_comment.inc.php

    r3049 r3145  
    2222// +-----------------------------------------------------------------------+
    2323
    24 /**
    25  * returns a "secret key" that is to be sent back when a user enters a comment
    26  */
    27 function get_comment_post_key($image_id)
    28 {
    29   global $conf;
    30 
    31   $time = time();
    32 
    33   return sprintf(
    34     '%s:%s',
    35     $time,
    36     hash_hmac(
    37       'md5',
    38       $time.':'.$image_id,
    39       $conf['secret_key']
    40       )
    41     );
    42 }
    43 
    4424//returns string action to perform on a new comment: validate, moderate, reject
    4525function user_comment_check($action, $comment)
     
    190170      (
    191171        ($comment_action=='validate' and $conf['email_admin_on_comment'])
    192         or 
     172        or
    193173        ($comment_action!='validate' and $conf['email_admin_on_comment_validation'])
    194174      )
Note: See TracChangeset for help on using the changeset viewer.