Changeset 16181
- Timestamp:
- 04/21/08 21:42:11 (6 months ago)
- Files:
-
- trunk/midgard/apis/php5/midgard.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midgard/apis/php5/midgard.c
r16169 r16181 452 452 return; 453 453 454 /* rcfg is already associated with midgard_connection */455 454 MidgardRequestConfig *rcfg = midgard_http_host_get_request_config(http_host); 455 if(!midgard_connection_set_request_config(mgd_handle(), rcfg)) 456 g_warning("Couldn't set request configuration for current connection"); 456 457 457 458 return; … … 598 599 php_printf("This program makes use of the Midgard Content Management engine:<br />"); 599 600 php_printf("© 1998-2001 The Midgard Project Ry - 2000-2001 Aurora Linux<br />\n"); 600 php_printf("© 2002-200 7The Midgard Community<br />\n");601 php_printf("© 2002-2008 The Midgard Community<br />\n"); 601 602 php_info_print_box_end(); 602 603 … … 832 833 midgard_connection_get_sitegroup_id(mgd)); 833 834 834 /* PAGES */835 i = 0;836 837 zval *pages;838 MAKE_STD_ZVAL(pages);839 array_init(pages);840 841 if(rcfg->pages != NULL) {842 843 array = rcfg->pages;844 845 for(i = 0; i < array->n_values; i++) {846 847 GValue *oval = g_value_array_get_nth(array, i);848 GObject *object = g_value_get_object(oval);849 850 zval *zobject = NULL;851 MAKE_STD_ZVAL(zobject);852 php_midgard_gobject_init(zobject,853 G_OBJECT_TYPE_NAME(object),854 object, FALSE);855 856 zend_hash_next_index_insert(857 HASH_OF(pages),858 &zobject, sizeof(zval *), NULL);859 }860 }861 862 add_assoc_zval(mgd_php_globals, "pages", pages);863 864 835 guint id = 0; 865 866 836 /* PAGE ID */ 867 837 if(rcfg->page) … … 883 853 add_assoc_bool(mgd_php_globals, "auth", rcfg->auth_required); 884 854 885 /* PREFIX */ 855 /* STYLE */ 856 id = 0; 857 if(rcfg->style) 858 g_object_get(G_OBJECT(rcfg->style), "id", &id, NULL); 859 add_assoc_long(mgd_php_globals, "style", id); 886 860 887 861 }
