-<?php
+<?php
/**
* FusionForge top-level information
*
*/
require_once $gfcommon.'include/Error.class.php';
-@include_once $gfcommon.'pkginfo.inc.php';
class FusionForge extends Error {
* FusionForge - FusionForge object constructor
*/
function FusionForge() {
- global $forge_pkg_name, $forge_pkg_version;
-
$this->Error();
- $this->software_name = 'FusionForge' ;
- $this->software_version = '5.1.50' ;
-
- if (isset($forge_pkg_name) && isset($forge_pkg_version)) {
- $this->software_name = $forge_pkg_name;
- $this->software_version = $forge_pkg_version;
+ $pkg = dirname(dirname(__FILE__)).'/pkginfo.inc.php';
+ if (file_exists($pkg)) {
+ include $pkg;
}
- $this->software_type = $this->software_name;
- if (isset($forge_pkg_type)) {
- $this->software_type = $forge_pkg_type;
+ if (isset($forge_pkg_name)) {
+ $this->software_name = $forge_pkg_name;
+ } else {
+ $this->software_name = 'FusionForge' ;
}
- if (isset($forge_pkg_name) && isset($forge_pkg_version)) {
- $this->software_name = $forge_pkg_name;
+ if (isset($forge_pkg_version)) {
$this->software_version = $forge_pkg_version;
+ } else {
+ $this->software_version = '5.2.3' ;
}
- $this->software_type = $this->software_name;
if (isset($forge_pkg_type)) {
$this->software_type = $forge_pkg_type;
+ } else {
+ $this->software_type = $this->software_name;
}
return true;
function getNumberOfPublicHostedProjects() {
$res = db_query_params ('SELECT group_id FROM groups WHERE status=$1',
- array ('A'));
+ array ('A'));
if (!$res) {
$this->setError('Unable to get hosted project count: '.db_error());
return false;
function getNumberOfHostedProjects() {
$res = db_query_params ('SELECT group_id FROM groups WHERE status=$1',
- array ('A'));
+ array ('A'));
if (!$res) {
$this->setError('Unable to get hosted project count: '.db_error());
return false;
}
return $result;
}
-
+
function parseCount($res) {
$row_count = db_fetch_array($res);
return $row_count['count'];