$code = symlink($path . '/etc/plugins/' . $name, forge_get_config('config_path'). '/plugins/'.$name);
if (!$code) {
$this->setError('['.forge_get_config('config_path'). '/plugins/'.$name.'->'.$path . '/etc/plugins/' . $name . ']'.'<br />'.
- _('Config file could not be linked to etc/gforge/plugins/%1$s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
+ _('Config file could not be linked to etc/gforge/plugins/%s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
}
}
}
$code = symlink($path . '/etc/plugins/' . $name, forge_get_config('config_path'). '/plugins/'.$name);
if (!$code) {
$this->setError('['.forge_get_config('config_path'). '/plugins/'.$name.'->'.$path . '/etc/plugins/' . $name . ']'.'<br />'.
- _('Config file could not be linked to etc/gforge/plugins/%1$s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
+ _('Config file could not be linked to etc/gforge/plugins/%s. Check the write permissions for apache in /etc/gforge/plugins or create the link manually.'), $name);
}
}
}
*/
function RegisterPlugin(&$pluginobject) {
if (!$pluginobject->GetName()) {
- exit_error(_("Some plugin did not provide a name. I'd gladly tell you which one, but obviously I can't. Sorry."),'');
+ exit_error(_("Some plugin did not provide a name. I'd gladly tell you which one, but obviously I cannot. Sorry."),'');
}
$p_name = $pluginobject->GetName() ;
$this->plugins_objects[$p_name] =& $pluginobject;
/**
* TODO: Enter description here ...
- * @param unknown_type $section
- * @param unknown_type $action
+ * @param string $section
+ * @param string $action
*/
function forge_check_global_perm ($section, $action = NULL) {
$engine = RBACEngine::getInstance() ;
function printShortStats($params) {
$project = $this->checkParams($params);
if (!$project) {
- return false ;
+ return;
}
if ($project->usesPlugin($this->name)) {
$project = $this->checkParams($params);
if (!$project) {
- return false ;
+ return;
}
if ($project->usesPlugin ($this->name)) {
return '';
}
}
-
}
// Local Variables:
$this->clearError();
$ldap_conn = @ldap_connect(forge_get_config('ldap_host'),forge_get_config('ldap_port'));
if (!$ldap_conn) {
- $this->setError('ERROR: Cannot connect to LDAP server<br />');
+ $this->setError('Error: Cannot connect to LDAP server<br />');
return false;
}
if (forge_get_config('ldap_version')) {
} else {
return false ;
}
- };
+ }
}
/**
$entry['shadowWarning']=7;
if (!$this->gfLdapAdd($dn,$entry)) {
- $this->setError("ERROR: cannot add LDAP user entry '".
+ $this->setError("Error: cannot add LDAP user entry '".
$user->getUnixName()."': ".$this->gfLdapError()."<br />");
return false;
}
$entry['shadowWarning']=7;
if (!$this->gfLdapAdd($dn,$entry)) {
- $this->setError("ERROR: cannot add LDAP user entry '".
+ $this->setError("Error: cannot add LDAP user entry '".
$username."': ".$this->gfLdapError()."<br />");
return false;
}
$dn = 'uid='.$user->getUnixName().',ou=People,'.forge_get_config('ldap_base_dn');
if (!$this->gfLdapDelete($dn)) {
- $this->setError("ERROR: cannot delete LDAP user entry '".
+ $this->setError("Error: cannot delete LDAP user entry '".
$user->getUnixName()."': ".$this->gfLdapError()."<br />");
return false;
}
$entry[$attr]=$value;
if (!$this->gfLdapModifyIfExists($dn, $entry)) {
- $this->setError("ERROR: cannot change LDAP attribute '$attr' for user '".
+ $this->setError("Error: cannot change LDAP attribute '$attr' for user '".
$user->getUnixName()."': ".$this->gfLdapError()."<br />");
return false;
}
$group = &group_get_object($group_id);
if (!$group) {
- $this->setError("ERROR: Cannot find group [$group_id]<br />");
+ $this->setError("Error: Cannot find group [$group_id]<br />");
return false;
}
if (!$this->gfLdapConnect()) {
$ret_val=true;
if (!$this->gfLdapAdd($dn,$entry)) {
- $this->setError("ERROR: cannot add LDAP group entry '".
+ $this->setError("Error: cannot add LDAP group entry '".
$group->getUnixName()."': ".$this->gfLdapError()."<br />");
// If there's error, that's bad. But don't stop.
$ret_val=false;
}
if (!$this->gfLdapAdd($dn,$entry)) {
- $this->setError("ERROR: cannot add LDAP CVS group entry '"
+ $this->setError("Error: cannot add LDAP CVS group entry '"
.$group->getUnixName()."': ".$this->gfLdapError()."<br />");
$ret_val=false;
}
'/bin/false', '/bin/false',
$this->getSCMGID(),
$this->getUnixGID(), "/dev/null")) {
- $this->setError("ERROR: cannot add LDAP AnonCVS user entry '"
+ $this->setError("Error: cannot add LDAP AnonCVS user entry '"
.$group->getUnixName()."': ".$this->gfLdapError()."<br />");
$ret_val=false;
}
$dn = 'cn='.$group->getUnixName().',ou=Group,'.forge_get_config('ldap_base_dn');
if (!$this->gfLdapDelete($dn)) {
- $this->setError("ERROR: cannot delete LDAP group entry '".
+ $this->setError("Error: cannot delete LDAP group entry '".
$group->getUnixName()."': ".$this->gfLdapError()."<br />");
$ret_val = false;
}
$dn = 'cn='.$group->getUnixName().',ou=cvsGroup,'.forge_get_config('ldap_base_dn');
if (!$this->gfLdapDelete($dn)) {
- $this->setError("ERROR: cannot delete LDAP CVS group entry '".
+ $this->setError("Error: cannot delete LDAP CVS group entry '".
$group->getUnixName()."': ".$this->gfLdapError()."<br />");
$ret_val = false;
}
$dn = 'uid=anoncvs_'.$group->getUnixName().',ou=People,'.forge_get_config('ldap_base_dn');
if (!$this->gfLdapDelete($dn)) {
- $this->setError("ERROR: cannot delete LDAP AnonCVS user entry '".
+ $this->setError("Error: cannot delete LDAP AnonCVS user entry '".
$group->getUnixName()."': ".$this->gfLdapError()."<br />");
$ret_val = false;
}
//
if (!$this->gfLdapModAdd($cvs_dn,$entry)) {
- $this->setError("ERROR: cannot add member to LDAP CVS group entry '".
+ $this->setError("Error: cannot add member to LDAP CVS group entry '".
$group->getUnixName()."': ".$this->gfLdapError()."<br />");
return false;
}
//
if (!$this->gfLdapModAdd($dn,$entry)) {
- $this->setError("ERROR: cannot add member to LDAP group entry '".
+ $this->setError("Error: cannot add member to LDAP group entry '".
$group->getUnixName()."': ".$this->gfLdapError()."<br />");
return false;
}
$ret_val=true;
if (!$this->gfLdapModDel($cvs_dn,$entry) && !$this->gfLdapDoesNotExist()) {
- $this->setError("ERROR: cannot remove member from LDAP CVS group entry '".
+ $this->setError("Error: cannot remove member from LDAP CVS group entry '".
$group->getUnixName()."': ".$this->gfLdapError()."(".$this->gfLdapErrno().")"."<br />");
$ret_val=false;
}
}
if (!$this->gfLdapModDel($dn,$entry) && !$this->gfLdapDoesNotExist()) {
- $this->setError("ERROR: cannot remove member from LDAP group entry '".
+ $this->setError("Error: cannot remove member from LDAP group entry '".
$group->getUnixName()."': ".$this->gfLdapError()."(".$this->gfLdapErrno().")"."<br />");
$ret_val=false;
}
'A',
$user_id)) ;
if (!$res) {
- $this->setError('ERROR - Could Not Update User UID/GID: '.db_error());
+ $this->setError('Error: Cannot Update User UID/GID: '.db_error());
return false;
}
return true;
array ('N',
$user_id));
if (!$res) {
- $this->setError('ERROR - Could Not Update User Unix Status: '.db_error());
+ $this->setError('Error: Cannot Update User Unix Status: '.db_error());
return false;
}
return true;
'A',
$user_id)) ;
if (!$res) {
- $this->setError('ERROR - Could Not Update User UID/GID: '.db_error());
+ $this->setError('Error: Cannot Update User UID/GID: '.db_error());
return false;
}
$res1 = db_query_params ('DELETE FROM nss_usergroups WHERE user_id=$1',
array ($user_id)) ;
if (!$res1) {
- $this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+ $this->setError('Error: Cannot Delete Group Member(s): '.db_error());
return false;
}
// This is group used for user, not a real project
(SELECT user_name FROM users WHERE user_id=$1)',
array ($user_id));
if (!$res2) {
- $this->setError('ERROR - Could Not Delete Group GID: '.db_error());
+ $this->setError('Error: Cannot Delete Group GID: '.db_error());
return false;
}
$res3 = db_query_params ('INSERT INTO nss_groups
FROM users WHERE user_id=$1',
array ($user_id));
if (!$res3) {
- $this->setError('ERROR - Could Not Update Group GID: '.db_error());
+ $this->setError('Error: Cannot Update Group GID: '.db_error());
return false;
}
*
*/
function sysRemoveUser($user_id) {
- $res = db_query_params ('UPDATE users SET unix_status=$1 WHERE user_id=$2',
+ $res = db_query_params('UPDATE users SET unix_status=$1 WHERE user_id=$2',
array ('D',
- $user_id)) ;
+ $user_id));
if (!$res) {
- $this->setError('ERROR - Could Not Update User Unix Status: '.db_error());
+ $this->setError('Error: Cannot Update User Unix Status: '.db_error());
return false;
} else {
$res1 = db_query_params ('DELETE FROM nss_usergroups WHERE user_id=$1',
array ($user_id));
if (!$res1) {
- $this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+ $this->setError('Error: Cannot Delete Group Member(s): '.db_error());
return false;
}
// This is group used for user, not a real project
(SELECT user_name FROM users WHERE user_id=$1)',
array ($user_id)) ;
if (!$res2) {
- $this->setError('ERROR - Could Not Delete Group GID: '.db_error());
+ $this->setError('Error: Cannot Delete Group GID: '.db_error());
return false;
}
}
$res1 = db_query_params ('DELETE FROM nss_usergroups WHERE group_id=$1',
array ($group_id));
if (!$res1) {
- $this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+ $this->setError('Error: Cannot Delete Group Member(s): '.db_error());
return false;
}
$res3 = db_query_params ('DELETE FROM nss_groups WHERE group_id=$1',
array ($group_id)) ;
if (!$res3) {
- $this->setError('ERROR - Could Not Delete Group GID: '.db_error());
+ $this->setError('Error: Cannot Delete Group GID: '.db_error());
return false;
}
$res4 = db_query_params ('INSERT INTO nss_groups
array ($this->GID_ADD,
$group_id)) ;
if (!$res4) {
- $this->setError('ERROR - Could Not Insert Group GID: '.db_error());
+ $this->setError('Error: Cannot Insert Group GID: '.db_error());
return false;
}
$res5 = db_query_params ('INSERT INTO nss_groups
$group_id)) ;
if (!$res5) {
- $this->setError('ERROR - Could Not Insert SCM Group GID: '.db_error());
+ $this->setError('Error: Cannot Insert SCM Group GID: '.db_error());
return false;
}
$res1 = db_query_params ('DELETE FROM nss_usergroups WHERE group_id=$1',
array ($group_id)) ;
if (!$res1) {
- $this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+ $this->setError('Error: Cannot Delete Group Member(s): '.db_error());
return false;
}
$res3 = db_query_params ('DELETE FROM nss_groups WHERE group_id=$1',
array ($group_id)) ;
if (!$res3) {
- $this->setError('ERROR - Could Not Delete Group GID: '.db_error());
+ $this->setError('Error: Cannot Delete Group GID: '.db_error());
return false;
}
return true;
$group_id));
if (!$res) {
db_rollback();
- $this->setError('ERROR - Could Not Update Group Member(s): '.db_error());
+ $this->setError('Error: Cannot Update Group Member(s): '.db_error());
return false;
}
}
'A', 'A', 'A',
$group_id)) ;
if (!$res) {
- $this->setError('ERROR - Could Not Update Group Member(s): '.db_error());
+ $this->setError('Error: Cannot Update Group Member(s): '.db_error());
db_rollback () ;
return false;
}
array ($user_id,
$group_id)) ;
if (!$res) {
- $this->setError('ERROR - Could Not Delete Group Member(s): '.db_error());
+ $this->setError('Error: Cannot Delete Group Member(s): '.db_error());
return false;
}
return true;
$datetime=date('Y-m-d'); //we will use this to concatenate it with the tar filename
-if(!(isset($sys_path_to_backup)) || (strcmp($sys_path_to_backup,"/") == 0)){
+if(!(isset($sys_path_to_backup)) || (strcmp($sys_path_to_backup,"/") == 0)){
// cron_entry(23,'Variable $sys_path_to_backup was not set or it was equal to /.');
// exit;
// Default value
if (!is_dir($sys_path_to_backup)) {
if (!mkdir($sys_path_to_backup, 0700, true)) {
cron_entry(23,'Couldn\'t create directory '.$sys_path_to_backup.' for backups');
- exit;
- }
- }
+ exit;
+ }
+}
// add trailing slash
if (!preg_match('/\\/$/',$sys_path_to_backup)) {
$err.= implode("\n", $output);
}
} else {
- $err.= 'Unable to find upload dir. Configured value is:'.forge_get_config('upload_dir');
+ $err.= 'Unable to find upload dir. Configured value is:'.forge_get_config('upload_dir');
}
/**************************************
$err.= implode("\n", $output);
}
} else {
- $err.= 'Unable to find Mailman data dir. Please edit backup_site.php cronjob';
+ $err.= 'Unable to find Mailman data dir. Please edit backup_site.php cronjob';
}
/**************************************
* The rest Copyright 2002-2005 (c) GForge Team
* Copyright 2012, Franck Villaume - TrivialDev
* Copyright © 2013 Thorsten Glaser, tarent solutions GmbH
+ * http://fusionforge.org/
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
$err = '';
/*
- * check whether directory preficēs are set
- * and create the præfix directories unless they exist
+ * check whether directory prefices are set
+ * and create the prefix directories unless they exist
*/
if (!($gpfx = forge_get_config('groupdir_prefix'))) {
* with FusionForge; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * -------------- Gforge team comment ------------
+ * -------------- FusionForge team comment ------------
* This file was proposed by Brett N DiFrischia
* with the following description:
* The GFDL uses many large files that could not be uploaded to our GForge site.