[geeklog-cvs] geeklog-1.3/public_html profiles.php,1.29,1.30
dhaun at iowaoutdoors.org
dhaun at iowaoutdoors.org
Tue Jun 8 05:42:17 EDT 2004
Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv17335
Modified Files:
profiles.php
Log Message:
Added an extra check for the "email story" option.
Formatted function headers to be phpdocu compatible.
Index: profiles.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/profiles.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** profiles.php 29 May 2004 11:44:31 -0000 1.29
--- profiles.php 8 Jun 2004 09:42:14 -0000 1.30
***************
*** 10,14 ****
// | |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2003 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony at tonybibbs.com |
--- 10,14 ----
// | |
// +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 by the following authors: |
// | |
// | Authors: Tony Bibbs - tony at tonybibbs.com |
***************
*** 36,50 ****
// $Id$
! include('lib-common.php');
/**
! * Mails the contents of the author contact form to that author
! *
! * @uid int User ID of person to send email to
! * @author string The name of the person sending the email
! * @authoremail string Email address of person sending the email
! * @subject string Subject of email
! * @message string Text of message to send
*
*/
function contactemail($uid,$author,$authoremail,$subject,$message)
--- 36,50 ----
// $Id$
! require_once ('lib-common.php');
/**
! * Mails the contents of the contact form to that user
*
+ * @param int $uid User ID of person to send email to
+ * @param string $author The name of the person sending the email
+ * @param string $authoremail Email address of person sending the email
+ * @param string $subject Subject of email
+ * @param string $message Text of message to send
+ * @return string Meta redirect or HTML for the contact form
*/
function contactemail($uid,$author,$authoremail,$subject,$message)
***************
*** 102,106 ****
$retval .= COM_refresh($_CONF['site_url'] . '/index.php?msg=27');
} else {
! $retval .= COM_siteHeader("menu")
.COM_errorLog($LANG08[3],2)
.contactform($uid,$subject,$message)
--- 102,106 ----
$retval .= COM_refresh($_CONF['site_url'] . '/index.php?msg=27');
} else {
! $retval .= COM_siteHeader('menu')
.COM_errorLog($LANG08[3],2)
.contactform($uid,$subject,$message)
***************
*** 108,112 ****
}
} else {
! $retval .= COM_siteHeader("menu")
.COM_errorLog($LANG08[4],2)
.contactform($uid,$subject,$message)
--- 108,112 ----
}
} else {
! $retval .= COM_siteHeader('menu')
.COM_errorLog($LANG08[4],2)
.contactform($uid,$subject,$message)
***************
*** 118,131 ****
/**
! * Shows the email author form
*
! * @uid int User ID of article author
! * @subject string Subject of email
! * @message string Text of message to send
*
*/
function contactform($uid, $subject='', $message='')
{
! global $_TABLES, $HTTP_COOKIE_VARS, $_CONF, $LANG08, $LANG_LOGIN, $_USER;
$retval = '';
--- 118,132 ----
/**
! * Displays the contact form
*
! * @param int $uid User ID of article author
! * @param string $subject Subject of email
! * @param string $message Text of message to send
! * @return string HTML for the contact form
*
*/
function contactform($uid, $subject='', $message='')
{
! global $_CONF, $_TABLES, $_USER, $LANG08, $LANG_LOGIN, HTTP_COOKIE_VARS;
$retval = '';
***************
*** 190,206 ****
}
! ###############################################################################
! # Sends the contents of the contact form to the author
! #
! # Modification History
! #
! # Date Author Description
! # ---- ------ -----------
! # 4/17/01 Tony Bibbs Code now allows anonymous users to send email
! # and it allows user to input a message as well
! # Thanks to Yngve Wassvik Bergheim for some of
! # this code
! #
!
function mailstory ($sid, $to, $toemail, $from, $fromemail, $shortmsg)
{
--- 191,215 ----
}
! /**
! * Email story to a friend
! *
! * @param string $sid id of story to email
! * @param string $to name of person / friend to email
! * @param string $toemail friend's email address
! * @param string $from name of person sending the email
! * @param string $fromemail sender's email address
! * @param string $shortmsg short intro text to send with the story
! * @return string Meta refresh
! *
! * Modification History
! *
! * Date Author Description
! * ---- ------ -----------
! * 4/17/01 Tony Bibbs Code now allows anonymous users to send email
! * and it allows user to input a message as well
! * Thanks to Yngve Wassvik Bergheim for some of
! * this code
! *
! */
function mailstory ($sid, $to, $toemail, $from, $fromemail, $shortmsg)
{
***************
*** 213,216 ****
--- 222,230 ----
}
+ // check if emailing of stories is disabled
+ if ($_CONF['hideemailicon'] == 1) {
+ return COM_refresh ($_CONF['site_url'] . '/article.php?story=' . $sid);
+ }
+
// check mail speedlimit
COM_clearSpeedlimit ($_CONF['speedlimit'], 'mail');
***************
*** 258,272 ****
/**
! * Sends the contents of the contact form to the author
*
! * @sid string ID of article to email
*
*/
! function mailstoryform($sid)
{
global $_TABLES, $HTTP_COOKIE_VARS, $_CONF, $LANG08, $_USER, $LANG_LOGIN;
$retval = '';
!
if (empty($_USER['username']) &&
(($_CONF['loginrequired'] == 1) || ($_CONF['emailstoryloginrequired'] == 1))) {
--- 272,287 ----
/**
! * Display form to email a story to someone.
*
! * @param string $sid ID of article to email
! * @return string HTML for email story form
*
*/
! function mailstoryform($sid)
{
global $_TABLES, $HTTP_COOKIE_VARS, $_CONF, $LANG08, $_USER, $LANG_LOGIN;
$retval = '';
!
if (empty($_USER['username']) &&
(($_CONF['loginrequired'] == 1) || ($_CONF['emailstoryloginrequired'] == 1))) {
More information about the geeklog-cvs
mailing list