-<?php
+<?php
/**
* FusionForge top-level information
*
* Copyright 2002, GForge, LLC
* Copyright 2009-2011, Roland Mas
*
- * This file is part of FusionForge.
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
*
- * FusionForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published
- * by the Free Software Foundation; either version 2 of the License,
- * or (at your option) any later version.
- *
- * FusionForge is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with FusionForge; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
require_once $gfcommon.'include/Error.class.php';
+
class FusionForge extends Error {
var $software_name ;
+ var $software_type ;
var $software_version ;
/**
function FusionForge() {
$this->Error();
- $this->software_name = 'FusionForge' ;
- $this->software_version = '5.1.50' ;
+ $pkg = dirname(dirname(__FILE__)).'/pkginfo.inc.php';
+ if (file_exists($pkg)) {
+ include $pkg;
+ }
+
+ if (isset($forge_pkg_name)) {
+ $this->software_name = $forge_pkg_name;
+ } else {
+ $this->software_name = 'FusionForge' ;
+ }
+
+ if (isset($forge_pkg_version)) {
+ $this->software_version = $forge_pkg_version;
+ } else {
+ $this->software_version = '5.1.92' ; // 5.2~rc2
+ }
+
+ 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'];