$v ) { if ( !in_array( $k, $noUnset ) && isset( $GLOBALS[$k] ) ) { $GLOBALS[$k] = NULL; unset( $GLOBALS[$k] ); } } } function gp_urldecode_deep($value) { $value = is_array( $value ) ? array_map( 'gp_urldecode_deep', $value ) : urldecode( $value ); return $value; } //TODO: add server-guessing code from bb-load.php in a function here // TODO: query something that will be cached and used after that function gp_is_installed() { global $gpdb; $gpdb->flush(); $gpdb->suppress_errors(); $gpdb->query("SELECT id FROM $gpdb->translations WHERE 1=0"); $gpdb->suppress_errors(false); return !((bool)$gpdb->last_error); } /** * Makes all key/value pairs in $vars global variables */ function gp_set_globals( &$vars ) { foreach( $vars as $name => &$value ) { $GLOBALS[$name] = &$value; } }