cmv             Wed Apr  2 11:51:40 2003 EDT

  Modified files:              
    /php4/ext/standard  basic_functions.c info.h info.c 
  Log:
  fixes for logo guid functions
  
  
  
Index: php4/ext/standard/basic_functions.c
diff -u php4/ext/standard/basic_functions.c:1.600 
php4/ext/standard/basic_functions.c:1.601
--- php4/ext/standard/basic_functions.c:1.600   Tue Apr  1 05:02:29 2003
+++ php4/ext/standard/basic_functions.c Wed Apr  2 11:51:39 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.600 2003/04/01 10:02:29 sas Exp $ */
+/* $Id: basic_functions.c,v 1.601 2003/04/02 16:51:39 cmv Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -312,6 +312,8 @@
        PHP_FE(phpversion,                                                             
                                                 NULL)
        PHP_FE(phpcredits,                                                             
                                                 NULL)
        PHP_FE(php_logo_guid,                                                          
                                         NULL)
+       PHP_FE(php_real_logo_guid,                                                     
                                         NULL)
+       PHP_FE(php_egg_logo_guid,                                                      
                                         NULL)
        PHP_FE(zend_logo_guid,                                                         
                                         NULL)
        PHP_FE(php_sapi_name,                                                          
                                         NULL)
        PHP_FE(php_uname,                                                              
                                                 NULL)
Index: php4/ext/standard/info.h
diff -u php4/ext/standard/info.h:1.31 php4/ext/standard/info.h:1.32
--- php4/ext/standard/info.h:1.31       Tue Mar 25 03:07:12 2003
+++ php4/ext/standard/info.h    Wed Apr  2 11:51:39 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: info.h,v 1.31 2003/03/25 08:07:12 sebastian Exp $ */
+/* $Id: info.h,v 1.32 2003/04/02 16:51:39 cmv Exp $ */
 
 #ifndef INFO_H
 #define INFO_H
@@ -59,6 +59,7 @@
 PHP_FUNCTION(phpinfo);
 PHP_FUNCTION(phpcredits);
 PHP_FUNCTION(php_logo_guid);
+PHP_FUNCTION(php_real_logo_guid);
 PHP_FUNCTION(zend_logo_guid);
 PHP_FUNCTION(php_egg_logo_guid);
 PHP_FUNCTION(php_sapi_name);
@@ -77,6 +78,7 @@
 PHPAPI void php_info_print_box_start(int bg);
 PHPAPI void php_info_print_box_end(void);
 PHPAPI void php_info_print_hr(void);
+PHPAPI char *php_logo_guid(void);
 
 void register_phpinfo_constants(INIT_FUNC_ARGS);
 
Index: php4/ext/standard/info.c
diff -u php4/ext/standard/info.c:1.231 php4/ext/standard/info.c:1.232
--- php4/ext/standard/info.c:1.231      Tue Apr  1 06:04:38 2003
+++ php4/ext/standard/info.c    Wed Apr  2 11:51:40 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: info.c,v 1.231 2003/04/01 11:04:38 thies Exp $ */
+/* $Id: info.c,v 1.232 2003/04/02 16:51:40 cmv Exp $ */
 
 #include "php.h"
 #include "php_ini.h"
@@ -385,11 +385,6 @@
        char **env, *tmp1, *tmp2;
        char *php_uname;
        int expose_php = INI_INT("expose_php");
-       time_t the_time;
-       struct tm *ta, tmbuf;
-
-       the_time = time(NULL);
-       ta = php_localtime_r(&the_time, &tmbuf);
 
        if (!sapi_module.phpinfo_as_text) {
                php_print_info_htmlhead(TSRMLS_C);
@@ -412,11 +407,9 @@
                        if (SG(request_info).request_uri) {
                                PUTS(SG(request_info).request_uri);
                        }
-                       if ((ta->tm_mon==3) && (ta->tm_mday==1)) {
-                               PUTS("?="PHP_EGG_LOGO_GUID"\" alt=\"Dog!\" /></a>");
-                       } else {
-                               PUTS("?="PHP_LOGO_GUID"\" alt=\"PHP Logo\" /></a>");
-                       }
+                       PUTS("?=");
+                       PUTS(php_logo_guid());
+                       PUTS("\" alt=\"PHP Logo\" /></a>");
                }
 
                if (!sapi_module.phpinfo_as_text) {
@@ -902,10 +895,48 @@
 }
 /* }}} */
 
+
+/* {{{ php_logo_guid
+ */
+PHPAPI char *php_logo_guid()
+{
+       char *logo_guid;
+
+       time_t the_time;
+       struct tm *ta, tmbuf;
+
+       the_time = time(NULL);
+       ta = php_localtime_r(&the_time, &tmbuf);
+
+       if ((ta->tm_mon==3) && (ta->tm_mday==1)) {
+               logo_guid = PHP_EGG_LOGO_GUID;
+       } else {
+               logo_guid = PHP_LOGO_GUID;
+       }
+
+       return estrdup(logo_guid);
+
+}
+/* }}} */
+
 /* {{{ proto string php_logo_guid(void)
    Return the special ID used to request the PHP logo in phpinfo screens*/
 PHP_FUNCTION(php_logo_guid)
 {
+
+       if (ZEND_NUM_ARGS() != 0) {
+               WRONG_PARAM_COUNT;
+       }
+
+       RETURN_STRING(php_logo_guid(), 1);
+}
+/* }}} */
+
+/* {{{ proto string php_real_logo_guid(void)
+   Return the special ID used to request the PHP logo in phpinfo screens*/
+PHP_FUNCTION(php_real_logo_guid)
+{
+
        if (ZEND_NUM_ARGS() != 0) {
                WRONG_PARAM_COUNT;
        }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to