[geeklog-cvs] Geeklog-1.x/public_html lib-common.php,1.659,1.660
Oliver
ospiess at qs1489.pair.com
Tue Oct 9 21:24:33 EDT 2007
Update of /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/public_html
In directory qs1489.pair.com:/tmp/cvs-serv82143
Modified Files:
lib-common.php
Log Message:
allow plaintext message to be sent to COM_showMessage
Index: lib-common.php
===================================================================
RCS file: /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/public_html/lib-common.php,v
retrieving revision 1.659
retrieving revision 1.660
diff -C2 -d -r1.659 -r1.660
*** lib-common.php 9 Oct 2007 06:28:40 -0000 1.659
--- lib-common.php 10 Oct 2007 01:24:31 -0000 1.660
***************
*** 4314,4319 ****
* Displays a message on the webpage
*
! * Pulls $msg off the URL string and gets the corresponding message and returns
! * it for display on the calling page
*
* @param int $msg ID of message to show
--- 4314,4319 ----
* Displays a message on the webpage
*
! * Receives either a message number and gets the according message from the
! * language file or gets a message in cleartext and displays it then to the user
*
* @param int $msg ID of message to show
***************
*** 4322,4349 ****
*/
! function COM_showMessage( $msg, $plugin='' )
! {
global $_CONF, $MESSAGE, $_IMAGE_TYPE;
$retval = '';
! if( $msg > 0 )
! {
! if( !empty( $plugin ))
! {
$var = 'PLG_' . $plugin . '_MESSAGE' . $msg;
global $$var;
! if( isset( $$var ))
! {
$message = $$var;
! }
! else
! {
$message = sprintf( $MESSAGE[61], $plugin );
COM_errorLog ($MESSAGE[61]. ": " . $var,1);
}
! }
! else
! {
$message = $MESSAGE[$msg];
}
--- 4322,4341 ----
*/
! function COM_showMessage($msg, $plugin='') {
global $_CONF, $MESSAGE, $_IMAGE_TYPE;
$retval = '';
! if($msg > 0) {
! if(!empty($plugin)) {
$var = 'PLG_' . $plugin . '_MESSAGE' . $msg;
global $$var;
! if(isset($$var)) {
$message = $$var;
! } else {
$message = sprintf( $MESSAGE[61], $plugin );
COM_errorLog ($MESSAGE[61]. ": " . $var,1);
}
! } else {
$message = $MESSAGE[$msg];
}
***************
*** 4356,4359 ****
--- 4348,4359 ----
. ' alt="" style="padding-right:5px; padding-bottom:3px">'
. $message . '</p>'
+ . COM_endBlock( COM_getBlockTemplate( '_msg_block', 'footer' ));
+ } else if (strlen($msg) > 0) {
+ $retval .= COM_startBlock( $MESSAGE[40] . ' - ' . $timestamp, '',
+ COM_getBlockTemplate( '_msg_block', 'header' ))
+ . '<p style="padding:5px"><img src="' . $_CONF['layout_url']
+ . '/images/sysmessage.' . $_IMAGE_TYPE . '" border="0" align="left"'
+ . ' alt="" style="padding-right:5px; padding-bottom:3px">'
+ . $msg . '</p>'
. COM_endBlock( COM_getBlockTemplate( '_msg_block', 'footer' ));
}
More information about the geeklog-cvs
mailing list