[pLog-svn] r4620 - plog/branches/lifetype-1.1.5/class/locale
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Mon Jan 29 18:28:32 EST 2007
Author: jondaley
Date: 2007-01-29 18:28:32 -0500 (Mon, 29 Jan 2007)
New Revision: 4620
Modified:
plog/branches/lifetype-1.1.5/class/locale/locale.class.php
Log:
added third parameter to pr function
Modified: plog/branches/lifetype-1.1.5/class/locale/locale.class.php
===================================================================
--- plog/branches/lifetype-1.1.5/class/locale/locale.class.php 2007-01-29 22:44:59 UTC (rev 4619)
+++ plog/branches/lifetype-1.1.5/class/locale/locale.class.php 2007-01-29 23:28:32 UTC (rev 4620)
@@ -283,20 +283,22 @@
/**
* calls printf on the translated string.
*
- * Crappy Crappy! Since it only accepts two arguments... ;) Well, if we
- * ever need more than two, I'll change it!
+ * Crappy Crappy! Since it only accepts three arguments... ;) Well, if we
+ * ever need more than three, I'll change it!
* @private
*/
- function pr( $id, $arg1 = null, $arg2 = null )
+ function pr( $id, $arg1 = null, $arg2 = null, $arg3 = null )
{
// first of all, we translate the string
$str = $this->tr( $id );
if( $arg1 == null )
$result = $str;
- if( $arg2 == null )
+ else if( $arg2 == null )
$result = sprintf( $str, $arg1 );
+ else if( $arg3 == null )
+ $result = sprintf( $str, $arg1, $arg2 );
else
- $result = sprintf( $str, $arg1, $arg2 );
+ $result = sprintf( $str, $arg1, $arg2, $arg3 );
return $result;
}
More information about the pLog-svn
mailing list