[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.261,1.262
geeklog-cvs-admin at lists.geeklog.net
geeklog-cvs-admin at lists.geeklog.net
Sun Sep 21 16:07:47 EDT 2003
Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv22851/public_html
Modified Files:
lib-common.php
Log Message:
Changed COM_isEmail() to use PEAR::Mail/RFC822 to check for valid email addresses. Also introduced {edit_icon} for the story templates as an icon to edit stories.
Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.261
retrieving revision 1.262
diff -C2 -d -r1.261 -r1.262
*** lib-common.php 14 Sep 2003 09:18:04 -0000 1.261
--- lib-common.php 21 Sep 2003 20:07:44 -0000 1.262
***************
*** 547,550 ****
--- 547,557 ----
. '/story.php?mode=edit&sid=' . $A['sid'] );
$article->set_var( 'lang_edit_text', $LANG01[4] );
+ $article->set_var( 'edit_icon', '<a href="' . $_CONF['site_admin_url']
+ . '/story.php?mode=edit&sid=' . $A['sid'] . '"><img src="'
+ . $_CONF['layout_url'] . '/images/edit.gif" alt="' . $LANG01[4]
+ . '" title="' . $LANG01[4] . '" border="0"></a>' );
+ $article->set_var( 'edit_image', '<img src="' . $_CONF['layout_url']
+ . '/images/edit.gif" alt="' . $LANG01[4] . '" title="'
+ . $LANG01[4] . '" border="0">' );
}
***************
*** 2971,2994 ****
/**
! * checks to see if email address is valid
*
! * This function COM_checks to see if an email address is in the correct from.
! * Actually, RFC2822 allows for much more obscure addresses ...
*
! * @param string $email Email address to verify
! * @return boolean True if valid otherwise false
*
*/
!
! function COM_isemail( $email )
{
! if( eregi( "^([-_0-9a-z])+([-._0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*.[a-z]{2,3}$", $email, $check ))
! {
! return TRUE;
! }
! else
! {
! return FALSE;
! }
}
--- 2978,2996 ----
/**
! * Checks to see if email address is valid.
*
! * This function checks to see if an email address is in the correct from.
*
! * @param string $email Email address to verify
! * @return boolean True if valid otherwise false
*
*/
! function COM_isEmail( $email )
{
! require_once( 'Mail/RFC822.php' );
!
! $rfc822 = new Mail_RFC822;
!
! return( $rfc822->isValidInetAddress( $email ) ? true : false );
}
***************
*** 3013,3018 ****
static $mailobj;
! include_once ('Mail.php');
! include_once ('Mail/RFC822.php');
$method = $_CONF['mail_settings']['backend'];
--- 3015,3020 ----
static $mailobj;
! include_once( 'Mail.php' );
! include_once( 'Mail/RFC822.php' );
$method = $_CONF['mail_settings']['backend'];
More information about the geeklog-cvs
mailing list