Changeset 11752

Show
Ignore:
Timestamp:
08/28/07 11:46:08 (1 year ago)
Author:
piotras
Message:

mgd_config_init returns true if _MIDGARD_CONNECTION is already set.
Additional E_NOTICE is thrown.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/branch-1-9/midgard/apis/php5/midgard.c

    r11620 r11752  
    21202120#endif 
    21212121{ 
    2122         php_error(E_WARNING,"mgd_config_init function is obsolete."); 
     2122        gchar *conf; 
     2123        gint conf_length; 
     2124        MidgardConnection *mgd = mgd_handle_singleton_get(); 
     2125        RETVAL_FALSE; 
     2126         
     2127        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", 
     2128                                &conf, &conf_length) == FAILURE) 
     2129                return; 
     2130         
     2131        /* Check if connection is established */ 
     2132        if(mgd != NULL) { 
     2133                 
     2134                php_error(E_NOTICE, 
     2135                                "mgd_config_init is deprecated. Use midgard_connection class"); 
     2136                RETURN_TRUE; 
     2137        } 
     2138         
     2139        /* TODO , open connection here if really needed for some backward compatibility */ 
    21232140} 
    21242141