The easy part: removing unused references to $Language in various files.
* @return boolean success.
*/
function create($filename,$filetype,$data,$doc_group,$title,$language_id,$description) {
-
- global $Language;
if (strlen($title) < 5) {
$this->setError(_('Title Must Be At Least 5 Characters'));
return false;
* @return boolean success
*/
function fetchData($docid) {
- global $Language;
$res=db_query("SELECT * FROM docdata_vw
WHERE docid='$docid'
AND group_id='". $this->Group->getID() ."'");
* @return boolean success.
*/
function update($filename,$filetype,$data,$doc_group,$title,$language_id,$description,$stateid) {
- global $Language;
if (strlen($title) < 5) {
$this->setError(_('Title Must Be At Least 5 Characters'));
return false;
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return array Document objects.
*/
function &getDocuments() {
- global $Language;
if (!$this->Documents) {
$this->getFromDB();
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return id on success / false on failure.
*/
function create($name,$parent_doc_group=0) {
- global $Language;
//
// data validation
//
* @return boolean.
*/
function fetchData($id) {
- global $Language;
$res=db_query("SELECT * FROM doc_groups WHERE doc_group='$id'");
if (!$res || db_numrows($res) < 1) {
$this->setError(_('DocumentGroup: Invalid DocumentGroup ID'));
* @return boolean.
*/
function update($name,$parent_doc_group) {
- global $Language;
-
$perm =& $this->Group->getPermission (session_get_user());
if (!$perm || !$perm->isDocEditor()) {
$this->setPermissionDeniedError();
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return boolean success.
*/
function Forum(&$Group, $group_forum_id=false, $arr=false) {
- global $Language;
$this->Error();
if (!$Group || !is_object($Group)) {
$this->setError(sprintf(_('%1$s:: No Valid Group Object'), "Forum"));
* @return boolean success.
*/
function create($forum_name,$description,$is_public=1,$send_all_posts_to='',$create_default_message=1,$allow_anonymous=1,$moderation_level=0) {
- global $Language;
if (strlen($forum_name) < 3) {
$this->setError(_('Forum Name Must Be At Least 3 Characters'));
return false;
* @return boolean success.
*/
function fetchData($group_forum_id) {
- global $Language, $sys_database_type;
+ global $sys_database_type;
if ($sys_database_type == "mysql") {
$sql="
* @return boolean success.
*/
function setMonitor() {
- global $Language;
if (!session_loggedin()) {
$this->setError(_('You can only monitor if you are logged in'));
return false;
* @return boolean success.
*/
function stopMonitor() {
- global $Language;
if (!session_loggedin()) {
$this->setError(_('You can only monitor if you are logged in'));
return false;
* @return boolean success.
*/
function savePlace() {
- global $Language;
if (!session_loggedin()) {
$this->setError(_('You Can Only Save Your Place If You Are Logged In'));
return false;
* @return boolean success.
*/
function update($forum_name,$description,$allow_anonymous,$is_public,$send_all_posts_to='',$moderation_level=0) {
- global $Language;
if (strlen($forum_name) < 3) {
$this->setError(_('Forum Name Must Be At Least 3 Characters'));
return false;
* @param object The Group object to which this forum is associated.
*/
function ForumFactory(&$Group) {
- global $Language;
$this->Error();
if (!$Group || !is_object($Group)) {
$this->setError(_('Forum:: No Valid Group Object'));
* @return array The array of Forum objects.
*/
function &getForums() {
- global $Language, $sys_database_type;
+ global $sys_database_type;
if ($this->forums) {
return $this->forums;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return boolean success.
*/
function ForumMessage(&$Forum, $msg_id=false, $arr=false, $pending=false) {
- global $Language;
$this->Error();
if (!$Forum || !is_object($Forum)) {
$this->setError(_('ForumMessage:: No Valid Forum Object'));
*/
function insertreleasedmsg($group_forum_id,$subject, $body,$post_date, $thread_id, $is_followup_to,$posted_by,$has_followups,$most_recent_date) {
- global $Language;
-
if ($is_followup_to != 0) {
//was posted in reply to another thread
*/
function insertmsg($subject, $body, $thread_id='', $is_followup_to='',$user_id,$has_attach=false) {
- global $Language;
-
if (!$thread_id) {
$thread_id=$this->Forum->getNextThreadID();
$is_followup_to=0;
* @return boolean success.
*/
function create($subject, $body, $thread_id='', $is_followup_to='',$has_attach=false) {
- global $Language;
if (!$body || !$subject) {
$this->setError(_('Must Include A Message Body And Subject'));
return false;
* @return boolean success.
*/
function fetchData($msg_id) {
- global $Language;
$res=db_query("SELECT * FROM forum_user_vw
WHERE msg_id='$msg_id'
AND group_forum_id='". $this->Forum->getID() ."'");
* @return boolean success.
*/
function fetchModeratedData($msg_id) {
- global $Language;
$res=db_query("SELECT * FROM forum_pending_user_vw
WHERE msg_id='$msg_id'
AND group_forum_id='". $this->Forum->getID() ."'");
* @return int The count of deleted messages.
*/
function delete() {
- global $Language;
$msg_id=$this->getID();
if (!$msg_id) {
$this->setError(_('Invalid Message ID'));
* @return boolean success.
*/
function sendNotice($has_attach=false) {
- global $Language;
$ids =& $this->Forum->getMonitoringIDs();
//
* @return boolean success.
*/
function sendNewModeratedMsgNotice() {
- global $Language;
-
$ids =& $this->Forum->getForumAdminIDs();
//
* @return boolean success.
*/
function sendAttachNotice($attach_id) {
- global $Language;
-
if ($attach_id) {
$ids =& $this->Forum->getMonitoringIDs();
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return boolean success.
*/
function create($name,$file_location,$type_id,$processor_id,$release_time=false) {
- global $Language;
if (strlen($name) < 3) {
$this->setError(_('FRSFile Name Must Be At Least 3 Characters'));
return false;
* @return boolean success.
*/
function update($type_id,$processor_id,$release_time,$release_id=false) {
- global $Language;
-
$perm =& $this->FRSRelease->FRSPackage->Group->getPermission( session_get_user() );
if (!$perm || !is_object($perm) || !$perm->isReleaseTechnician()) {
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return boolean success.
*/
function create($name,$is_public=1) {
- global $Language,$sys_apache_user,$sys_apache_group;
+ global $sys_apache_user,$sys_apache_group;
if (strlen($name) < 3) {
$this->setError(_('FRSPackage Name Must Be At Least 3 Characters'));
return false;
* @return boolean success.
*/
function setMonitor() {
- global $Language;
if (!session_loggedin()) {
$this->setError(_('You can only monitor if you are logged in'));
return false;
* @return boolean success.
*/
function stopMonitor() {
- global $Language;
if (!session_loggedin()) {
$this->setError(_('You can only monitor if you are logged in'));
return false;
* @return boolean success.
*/
function update($name,$status) {
- global $Language;
if (strlen($name) < 3) {
$this->setError(_('FRSPackage Name Must Be At Least 3 Characters'));
return false;
* @return boolean success.
*/
function create($name,$notes,$changes,$preformatted,$release_date=false) {
- global $Language;
if (strlen($name) < 3) {
$this->setError(_('FRSPackage Name Must Be At Least 3 Characters'));
return false;
* @return boolean success.
*/
function update($status,$name,$notes,$changes,$preformatted,$release_date) {
-
- global $Language;
if (strlen($name) < 3) {
$this->setError(_('FRSPackage Name Must Be At Least 3 Characters'));
return false;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*
*/
function setPermissionDeniedError(){
- global $Language;
$this->setError(_('Permission denied.'), ERROR__PERMISSION_DENIED_ERROR);
}
* retrieves the localized error string for Invalid Email and calls exit_error()
*/
function setInvalidEmailError(){
- global $Language;
$this->setError(_('Invalid Email Address'), ERROR__INVALID_EMAIL_ERROR);
}
*
*/
function setOnUpdateError($result=""){
- global $Language;
$this->setError(sprintf(_('Error On Update:'), $result), ERROR__ON_UPDATE_ERROR);
}
* retrieves the localized error string for Group ID
*/
function setGroupIdError(){
- global $Language;
$this->setError(_('Group_id in db result does not match Group Object'), ERROR__GROUPID_ERROR);
}
* retrieves the localized error string for missing pparams
*/
function setMissingParamsError(){
- global $Language;
$this->setError(_('Missing Parameters'), ERROR__MISSING_PARAMS_ERROR);
}
* @param string The purpose of the group.
*/
function create(&$user, $full_name, $unix_name, $description, $license, $license_other, $purpose, $unix_box='shell1', $scm_box='cvs1') {
- global $Language;
-
// $user is ignored - anyone can create pending group
if ($this->getID()!=0) {
* @access public.
*/
function updateAdmin(&$user, $is_public, $license, $type_id, $unix_box, $http_domain) {
- global $Language;
-
$perm =& $this->getPermission($user);
if (!$perm || !is_object($perm)) {
$new_doc_address,$send_all_docs,$logo_image_id,
$enable_pserver,$enable_anonscm,
$use_ftp,$use_tracker,$use_frs,$use_stats) {
- global $Language;
$perm =& $this->getPermission($user);
* @access public.
*/
function setStatus(&$user, $status) {
- global $Language,$SYS;
+ global $SYS;
$perm =& $this->getPermission($user);
if (!$perm || !is_object($perm)) {
* @param string The name of the new SCM_BOX
*/
function setSCMBox($scm_box) {
- global $Language;
-
if ($scm_box) {
db_begin();
$sql = "UPDATE groups SET scm_box = '$scm_box' WHERE group_id = ".$this->getID();
}
function delete($sure,$really_sure,$really_really_sure) {
- global $Language;
-
if (!$sure || !$really_sure || !$really_really_sure) {
$this->setMissingParamsError();
return false;
* @access public.
*/
function addUser($user_unix_name,$role_id) {
- global $Language,$SYS;
+ global $SYS;
/*
Admins can add users to groups
*/
* @return boolean success.
*/
function removeUser($user_id) {
- global $Language,$SYS,$sys_database_type;
+ global $SYS,$sys_database_type;
if ($user_id==user_getid()) {
//users can remove themselves
* @return boolean success.
*/
function updateUser($user_id,$role_id) {
- global $Language,$SYS;
+ global $SYS;
$perm =& $this->getPermission( session_get_user() );
if (!$perm || !is_object($perm) || !$perm->isAdmin()) {
* @return boolean success.
*/
function setUnixStatus($status) {
- global $Language,$SYS;
+ global $SYS;
db_begin();
$res=db_query("
UPDATE groups
* @return boolean Success.
*/
function create($user_id,$comments) {
- global $Language;
-
$v = new Validator();
$v->check($user_id, "user_id");
//$v->check($comments, "comments");
* @return boolean true/false.
*/
function sendJoinNotice() {
- global $Language;
$user =& session_get_user();
$admins =& $this->Group->getAdmins();
for ($i=0; $i<count($admins); $i++) {
* @return true or false
*/
function sendRegistrationEmail() {
- global $Language;
$message=stripcslashes(sprintf(_('Thank you for registering on the %4$s web site. You have
account with username %1$s created for you. In order
to complete your registration, visit the following url:
*/
function update($firstname,$lastname,$language_id,$timezone,$mail_site,$mail_va,$use_ratings,
$jabber_address,$jabber_only,$theme_id,$address,$address2,$phone,$fax,$title,$ccode) {
- global $Language;
$mail_site = $mail_site ? 1 : 0;
$mail_va = $mail_va ? 1 : 0;
$block_ratings = $use_ratings ? 0 : 1;
* @return boolean success.
*/
function setUnixStatus($status) {
- global $Language,$SYS;
+ global $SYS;
db_begin();
$res=db_query("
UPDATE users
* @return boolean success.
*/
function setShell($shell) {
- global $Language,$SYS;
+ global $SYS;
$shells = file('/etc/shells');
$shells[count($shells)] = "/bin/cvssh";
$out_shells = array();
* @return boolean success.
*/
function setPasswd($passwd) {
- global $Language,$SYS;
+ global $SYS;
if (!account_pwvalid($passwd)) {
$this->setError('Error: '.$GLOBALS['register_error']);
return false;
*
*/
function account_pwvalid($pw) {
- global $Language;
if (strlen($pw) < 6) {
$GLOBALS['register_error'] = _('Password must be at least 6 characters.');
return 0;
*
*/
function account_namevalid($name) {
- global $Language;
// no spaces
if (strrpos($name,' ') > 0) {
$GLOBALS['register_error'] = _('There cannot be any spaces in the login name.');
*
*/
function account_groupnamevalid($name) {
- global $Language;
if (!account_namevalid($name)) return 0;
// illegal names
return $GLOBALS['groupdir_prefix'].'/'.$group;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*
*/
function session_login_valid($loginname, $passwd, $allowpending=0) {
- global $feedback,$Language;
+ global $feedback;
if (!$loginname || !$passwd) {
$feedback = _('Missing Password Or Users Name');
}
function session_login_valid_dbonly ($loginname, $passwd, $allowpending) {
- global $feedback,$userstatus,$Language;
+ global $feedback,$userstatus;
// Try to get the users from the database using user_id and (MD5) user_pw
$res = db_query("
* @return none
*/
function session_set_new($user_id) {
- global $G_SESSION,$session_ser,$Language;
+ global $G_SESSION,$session_ser;
// set session cookie
//
*
*/
function util_send_message($to,$subject,$body,$from='',$BCC='',$sendername='',$extra_headers='',$send_html_email=false) {
- global $Language,$sys_bcc_all_email_address,$sys_sendmail_path;
+ global $sys_bcc_all_email_address,$sys_sendmail_path;
if (!$to) {
$to='noreply@'.$GLOBALS['sys_default_domain'];
*
*/
function show_priority_colors_key() {
- global $Language;
echo '<p /><strong> '._('Priority Colors').':</strong><br />
<table border="0"><tr>';
function util_is_root_dir($dir) {
return !preg_match('/[^\\/]/',$dir);
}
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return boolean success.
*/
function MailingList(&$Group, $groupListId = false, $dataArray = false) {
- global $Language;
$this->Error();
if (!$Group || !is_object($Group)) {
$this->setError(sprintf(_('%1$s:: No Valid Group Object'), 'MailingList'));
* @return boolean success.
*/
function create($listName, $description, $isPublic = MAIL__MAILING_LIST_IS_PUBLIC,$creator_id=false) {
- global $Language;
-
//
// During the group creation, the current user_id will not match the admin's id
//
* @return boolean success.
*/
function fetchData($groupListId) {
- global $Language;
$res=db_query("SELECT * FROM mail_group_list "
. "WHERE group_list_id='".$groupListId."' "
. "AND group_id='". $this->Group->getID() ."'");
* @return boolean success.
*/
function update($description, $isPublic = MAIL__MAILING_LIST_IS_PUBLIC) {
- global $Language;
-
if(! $this->userIsAdmin()) {
$this->setPermissionDeniedError();
return false;
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @param object The Group object to which these mailing lists are associated.
*/
function MailingListFactory(& $Group) {
- global $Language;
$this->Error();
if (!$Group || !is_object($Group)) {
* @return array The array of MailingList objects.
*/
function &getMailingLists() {
- global $Language;
if (isset($this->mailingLists) && is_array($this->mailingLists)) {
return $this->mailingLists;
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return boolean success.
*/
function create($name) {
-
- global $Language;
//
// data validation
//
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return boolean success.
*/
function create($project_name,$description,$is_public=1,$send_all_posts_to='') {
-
- global $Language;
-
if (strlen($project_name) < 3) {
$this->setError(_('Title Must Be At Least 5 Characters'));
return false;
* @return boolean success.
*/
function update($project_name,$description,$send_all_posts_to='') {
-
- global $Language;
if (strlen($project_name) < 3) {
$this->setError(_('Title Must Be At Least 5 Characters'));
return false;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return array The array of ProjectGroups.
*/
function &getProjectGroups() {
-
- global $Language;
if ($this->projectGroups) {
return $this->projectGroups;
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
//for msproject users - ms project has more complex logic than gforge
return true;
- global $Language;
if ($depend_on_id == $original_id) {
$this->setError(_('Circular Dependency Detected\''));
return false;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function create($projectTaskId, $week, $daysAdjust, $timeCode, $hours)
{
- global $Language;
-
$report_date=($week + ($days_adjust*REPORT_DAY_SPAN))+(12*60*60);
$res=db_query("INSERT INTO rep_time_tracking (user_id,week,report_date,project_task_id,time_code,hours)
VALUES ('".user_getid()."','$week','$report_date','$projectTaskId','$timeCode','$hours')");
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function report_header($title) {
- global $HTML,$sys_name,$Language;
+ global $HTML,$sys_name;
echo $HTML->header(array('title'=>" "._('Reporting').": " . $title));
if (isset($GLOBALS['feedback'])) {
echo html_feedback_top($GLOBALS['feedback']);
}
function report_span_box($name='SPAN', $selected='1', $suppress_daily=false) {
- global $Language;
if ($suppress_daily) {
$vals=array(2,3);
$titles=array(_('Weekly'),
}
function report_weeks_box($Report, $name='week', $selected=false) {
- global $Language;
$arr =& $Report->getWeekStartArr();
$arr2=array();
}
function report_day_adjust_box($Report, $name='days_adjust', $selected=false) {
- global $Language;
$days[]='0.0';
$days[]='1';
$days[]='2';
}
function report_months_box($Report, $name='month', $selected=false) {
- global $Language;
$arr =& $Report->getMonthStartArr();
$arr2=array();
}
function report_area_box($name='area', $selected='1') {
- global $Language;
$arr[]='tracker';
$arr[]='forum';
$arr[]='docman';
}
function report_tracker_box($name='datatype', $selected='1') {
- global $Language;
$arr[]=_('Bugs');
$arr[]=_('Support');
$arr[]=_('Patches');
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return boolean success.
*/
function Survey(&$Group, $survey_id=false, $arr=false) {
- global $Language;
$this->Error();
if (!$Group || !is_object($Group)) {
$this->setError(sprintf(_('%1$s:: No Valid Group Object'), "Survey"));
* @return boolean success.
*/
function create($survey_title, $add_questions, $is_active=0, $is_public=1, $is_result_public=0, $double_vote=0) {
- global $Language;
-
if (!$survey_title) {
$this->setError(_('UPDATE FAILED: Survey Title Required'));
return false;
* @return boolean success.
*/
function update($survey_title, &$add_questions, &$del_questions, $is_active=0, $is_public=1, $is_result_public=0, $double_vote=0) {
- global $Language;
-
if (!$survey_title) {
$this->setError(_('UPDATE FAILED: Survey Title Required'));
return false;
* @return boolean success.
*/
function updateOrder($question_number, $is_up=true) {
- global $Language;
-
$group_id = $this->Group->GetID();
$survey_id = $this->getID();
* @return boolean success.
*/
function delete() {
- global $Language;
-
$group_id = $this->Group->GetID();
$survey_id = $this->getID();
* @return boolean success.
*/
function fetchData($survey_id) {
- global $Language;
$group_id = $this->Group->GetID();
$sql="SELECT * FROM surveys WHERE survey_id='$survey_id' AND group_id='$group_id'";
// mode: php
// c-file-style: "bsd"
// End:
+
?>
* @param int The survey_id
*/
function SurveyFactory(&$Group) {
- global $Language;
-
$this->Error();
if (!$Group || !is_object($Group)) {
$this->setError(_('No valid Group Object'));
* @return array The array of Survey Question objects.
*/
function &getSurveys() {
- global $Language;
-
/* We alread have it */
if ($this->surveys) {
return $this->surveys;
* @return boolean success.
*/
function SurveyQuestion(&$Group, $question_id=false, $arr=false) {
- global $Language;
$this->Error();
if (!$Group || !is_object($Group)) {
$this->setError(sprintf(_('%1$s:: No Valid Group Object'), 'Survey Question'));
* @return boolean success.
*/
function create($question, $question_type=1) {
- global $Language;
-
if (strlen($question) < 3) {
$this->setError(_('Question is too short'));
return false;
* @return boolean success.
*/
function update($question, $question_type=1) {
- global $Language;
-
if (strlen($question) < 3) {
$this->setError(_('Question is too short'));
return false;
* @return boolean success.
*/
function delete() {
- global $Language;
-
-
$group_id = $this->Group->GetID();
$question_id = $this->getID();
* @return boolean success.
*/
function fetchData($question_id) {
- global $Language;
$group_id = $this->Group->GetID();
$sql="SELECT survey_questions.*, survey_question_types.type
* @param int The survey_id
*/
function SurveyQuestionFactory(&$Group) {
- global $Language;
$this->Error();
if (!$Group || !is_object($Group)) {
$this->setError(_('No valid Group Object'));
* @return array The array of Survey Question objects.
*/
function &getSurveyQuestions() {
- global $Language;
-
/* We alread have it */
if ($this->questions) {
return $this->questions;
* @return boolean success.
*/
function SurveyResponse(&$Group, $arr=false) {
- global $Language;
$this->Error();
if (!$Group || !is_object($Group)) {
$this->setError(sprintf(_('%1$s:: No Valid Group Object'), 'Survey Question'));
* @return boolean success.
*/
function create($user_id, $survey_id, $question_id, $response) {
- global $Language;
$group_id = $this->Group->GetID();
$now = time();
* @param int The survey_id
*/
function SurveyResponseFactory(&$Survey, &$Question ) {
- global $Language;
$this->Error();
if (!$Survey || !is_object($Survey)) {
* @return array The array of Survey Response objects.
*/
function &getSurveyResponses() {
- global $Language;
-
/* We alread have it */
if ($this->Responses) {
return $this->Responses;
* @return boolean success.
*/
function Artifact(&$ArtifactType, $data=false) {
- global $Language;
$this->Error();
$this->ArtifactType =& $ArtifactType;
* @return id on success / false on failure.
*/
function create( $summary, $details, $assigned_to=100, $priority=3, $extra_fields=array()) {
- global $Language;
-
//
// make sure this person has permission to add artifacts
//
* @return false - always false - always use the getErrorMessage() for feedback
*/
function setMonitor() {
- global $Language;
if (session_loggedin()) {
$user_id=user_getid();
* @return boolean success.
*/
function addMessage($body,$by=false,$send_followup=false) {
- global $Language;
if (!$body) {
$this->setMissingParamsError();
return false;
function update($priority,$status_id,
$assigned_to,$summary,$canned_response,$details,$new_artifact_type_id,$extra_fields=array()) {
- global $Language;
/*
Field-level permission checking
*/
* this artifact
*/
function getExtraFieldDataText() {
- global $Language;
-
// First we get the list of extra fields and the data
// associated to the fields
$efs = $this->ArtifactType->getExtraFields();
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function create($name,$id) {
- global $Language;
//settype($id,"integer");
//
// data validation
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return id on success / false on failure.
*/
function create($title, $body) {
- global $Language;
//
// data validation
//
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return true on success / false on failure.
*/
function create($name,$field_type,$attribute1,$attribute2,$is_required=0,$alias='') {
- global $Language;
-
//
// data validation
//
* @return array types.
*/
function getAvailableTypes() {
- global $Language;
return array(
1=>_('Select Box'),
2=>_('Check Box'),
* @return boolean success.
*/
function update($name,$attribute1,$attribute2,$is_required=0,$alias="") {
- global $Language;
-
if (!$this->ArtifactType->userIsAdmin()) {
$this->setPermissionDeniedError();
return false;
* @return bool true if alias is valid, false otherwise and it sets the corresponding error
*/
function validateAlias($alias) {
- global $Language;
-
// these are reserved alias names
static $reserved_alias = array(
"project",
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function create($name,$status_id=0) {
- global $Language;
//
// data validation
//
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return id on success / false on failure.
*/
function create($filename, $filetype, $filesize, $bin_data, $description='None') {
-
- global $Language;
// Some browsers don't supply mime type if they don't know it
if (!$filetype) {
// Let's be on safe side?
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return id on success / false on failure.
* /
function create($name, $auto_assign_to) {
- global $Language;
-
//
// data validation
//
*/
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return id on success / false on failure.
*/
function create($body,$by=false) {
- global $Language;
-
if (!$body) {
$this->setMissingParamsError();
return false;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return true on success / false on failure.
*/
function create($name,$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange=0,$closedaterange=0) {
- global $Language;
-
//
// data validation
//
* @return boolean success.
*/
function update($name,$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange='',$closedaterange='') {
- global $Language;
if (!$name) {
$this->setMissingParamsError();
return false;
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function create($name,$description,$is_public,$allow_anon,$email_all,$email_address,
$due_period,$use_resolution,$submit_instructions,$browse_instructions,$datatype=0) {
- global $Language;
$perm =& $this->Group->getPermission( session_get_user() );
if (!$perm || !is_object($perm) || !$perm->isArtifactAdmin()) {
* @return false - always false - always use the getErrorMessage() for feedback
*/
function setMonitor() {
- global $Language;
if (session_loggedin()) {
$user_id=user_getid();
function update($name,$description,$email_all,$email_address,
$due_period, $status_timeout,$use_resolution,$submit_instructions,$browse_instructions) {
- global $Language;
-
if (!$this->userIsAdmin()) {
$this->setPermissionDeniedError();
return false;
}
function CallHook ($hookname, $params) {
- global $Language, $HTML ;
+ global $HTML ;
switch ($hookname) {
case "session_set_entry":
}
function AuthUser ($loginname, $passwd) {
- global $feedback,$Language;
+ global $feedback;
if(!$loginname) {
return false;
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*
*/
function getCommitEntries($Query,$group_id) {
- global $Language;
-
$group = &group_get_object($group_id);
if (!$group->usesPlugin($this->name)) {
*
*/
function getTitleArr() {
- global $Language;
$title_arr=array();
$title_arr[]=_('Filename');
$title_arr[]=_('Date');
*
*/
function getDiffLink($GroupName, $FileName, $PrevVersion, $ActualVersion) {
- global $sys_default_domain,$Language;
+ global $sys_default_domain;
return '<a href="/scm/viewvc.php/'.
$FileName.'?root='.$GroupName.'&r1='.$PrevVersion.'&r2='.
$ActualVersion.'">'.
*
*/
function CallHook ($hookname, $params) {
- global $group_id,$Language, $G_SESSION, $HTML, $use_cvstrackerplugin,$aid ;
+ global $group_id, $G_SESSION, $HTML, $use_cvstrackerplugin,$aid ;
$use_cvstrackerplugin = getIntFromRequest('use_cvstrackerplugin');
if ($hookname == "groupisactivecheckbox") {
//Check if the group is active
}
function CallHook ($hookname, $params) {
- global $Language, $G_SESSION, $HTML, $group_id;
+ global $G_SESSION, $HTML, $group_id;
if ($hookname == "usermenu") {
$text = "EIRC" ;
echo ' | ' . $HTML->PrintSubMenu (array ($text),
echo "</td>";
echo "</tr>";
} elseif ($hookname == "user_personal_links") {
- global $Language;
// this displays the link in the user´s profile page to it´s personal HelloWorld (if you want other sto access it, youll have to change the permissions in the index.php
$userid = $params['user_id'];
$user = user_get_object($userid);
<a href="/plugins/helloworld/index.php?id=' . $userid . '&type=user&pluginname=' . $this->name . '">' . _('View Personal HelloWorld') .'</a></p>';
}
} elseif ($hookname == "project_admin_plugins") {
- global $Language;
// this displays the link in the project admin options page to it´s HelloWorld administration
$group_id = $params['group_id'];
$group = &group_get_object($group_id);
// the header that displays for the user portion of the plugin
function helloworld_Project_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$id;
$params['toptab']='helloworld';
$params['group']=$id;
/*
// the header that displays for the project portion of the plugin
function helloworld_User_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$user_id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$user_id;
$params['toptab']='helloworld';
$params['user']=$user_id;
/*
site_project_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
}
function CallHook ($hookname, $params) {
- global $Language, $HTML ;
+ global $HTML ;
$loginname = $params['loginname'] ;
$passwd = $params['passwd'] ;
}
function AuthUser ($loginname, $passwd) {
- global $feedback,$Language;
+ global $feedback;
if (!$this->ldap_conn) {
$this->ldap_conn = ldap_connect ($this->ldap_server,
echo "</td>";
echo "</tr>";
} elseif ($hookname == "user_personal_links") {
- global $Language;
// this displays the link in the user´s profile page to it´s personal Mantis (if you want other sto access it, youll have to change the permissions in the index.php
$userid = $params['user_id'];
$user = user_get_object($userid);
<a href="'.$GLOBALS['sys_urlprefix'].'/plugins/mantis/index.php?id=' . $userid . '&type=user&pluginname=' . $this->name . '">' . _('View Mantis') .'</a></p>';
}
} elseif ($hookname == "project_admin_plugins") {
- global $Language;
// this displays the link in the project admin options page to it´s Mantis administration
$group_id = $params['group_id'];
$group = &group_get_object($group_id);
// the header that displays for the user portion of the plugin
function helloworld_Project_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$id;
$params['toptab']='mantis';
$params['group']=$id;
/*
// the header that displays for the project portion of the plugin
function helloworld_User_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$user_id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$user_id;
$params['toptab']='mantis';
$params['user']=$user_id;
/*
}
}
-
-
-
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
echo "</td>";
echo "</tr>";
} elseif ($hookname == "user_personal_links") {
- global $Language;
// this displays the link in the user´s profile page to it´s personal MediaWiki (if you want other sto access it, youll have to change the permissions in the index.php
$userid = $params['user_id'];
$user = user_get_object($userid);
<a href="/mediawiki/index.php/User:' . $user->getUnixName() . '">' . _('View Personal MediaWiki') .'</a></p>';
}
} elseif ($hookname == "project_admin_plugins") {
- global $Language;
// this displays the link in the project admin options page to it´s MediaWiki administration
$group_id = $params['group_id'];
$group = &group_get_object($group_id);
// the header that displays for the user portion of the plugin
function mediawiki_Project_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$id;
$params['toptab']='mediawiki';
$params['group']=$id;
/*
// the header that displays for the project portion of the plugin
function mediawiki_User_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$user_id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$user_id;
$params['toptab']='mediawiki';
$params['user']=$user_id;
/*
site_project_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
}
function CallHook ($hookname, $params) {
- global $use_projects_hierarchyplugin,$G_SESSION,$HTML,$Language;
+ global $use_projects_hierarchyplugin,$G_SESSION,$HTML;
if ($hookname == "usermenu") {
$text = $this->text; // this is what shows in the tab
if ($G_SESSION->usesPlugin("projects_hierarchy")) {
echo "</td>";
echo "</tr>";
} elseif ($hookname == "user_personal_links") {
- global $Language;
// this displays the link in the user´s profile page to it´s personal projects_hierarchy (if you want other sto access it, youll have to change the permissions in the index.php
$userid = $params['user_id'];
$user = user_get_object($userid);
<a href="/plugins/projects_hierarchy/index.php?id=' . $userid . '&type=user&pluginname=' . $this->name . '">' . _('View Personal projects_hierarchy') .'</a></p>';
}
} elseif ($hookname == "project_admin_plugins") {
- global $Language;
// this displays the link in the project admin options page to it´s projects_hierarchy administration
$group_id = $params['group_id'];
$group = &group_get_object($group_id);
function type_son_box () {
- global $Language;
return "<select name='link_type' onchange=\"javascript:" .
"if(this.value!= 0){" .
"document.formson.son.disabled=false" .
return $family;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
// the header that displays for the user portion of the plugin
function projects_hierarchy_Project_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$id;
$params['toptab']='projects_hierarchy';
$params['group']=$id;
// the header that displays for the project portion of the plugin
function projects_hierarchy_User_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$user_id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$user_id;
$params['toptab']='projects_hierarchy';
$params['user']=$user_id;
site_project_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function aff_tree($tree, $lvl) {
global $project_name ;
- global $Language ;
echo "<br/>";
$arbre = "" ;
}
function CallHook ($hookname, $params) {
- global $use_quota_managementplugin,$G_SESSION,$HTML,$Language;
+ global $use_quota_managementplugin,$G_SESSION,$HTML;
if ($hookname == "usermenu") {
$text = $this->text; // this is what shows in the tab
if ($G_SESSION->usesPlugin("quota_management")) {
echo "</td>";
echo "</tr>";
} elseif ($hookname == "user_personal_links") {
- global $Language;
// this displays the link in the user´s profile page to it´s personal quota_management (if you want other sto access it, youll have to change the permissions in the index.php
$userid = $params['user_id'];
$user = user_get_object($userid);
<a href="/plugins/quota_management/index.php?id=' . $userid . '&type=user&pluginname=' . $this->name . '">' . _('View Personal quota_management') .'</a></p>';
}
} elseif ($hookname == "project_admin_plugins") {
- global $Language;
// this displays the link in the project admin options page to it´s quota_management administration
$group_id = $params['group_id'];
$group = &group_get_object($group_id);
// the header that displays for the user portion of the plugin
function quota_management_Project_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$id;
$params['toptab']='quota_management';
$params['group']=$id;
/*
// the header that displays for the project portion of the plugin
function quota_management_User_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$user_id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$user_id;
$params['toptab']='quota_management';
$params['user']=$user_id;
/*
site_project_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
}
function CallHook ($hookname, $params) {
- global $Language, $HTML ;
+ global $HTML ;
switch ($hookname) {
case "scm_page":
}
function display_scm_page ($group_id) {
- global $Language, $HTML ;
+ global $HTML ;
$project =& group_get_object($group_id);
}
function display_stats ($params) {
- global $Language ;
$group_id = $params['group_id'] ;
$result = db_query("
SELECT commits, adds
}
function CallHook ($hookname, $params) {
- global $Language, $HTML;
+ global $HTML;
switch ($hookname) {
case 'scm_page':
}
function getPage ($group_id) {
- global $Language, $HTML ;
+ global $HTML ;
$project =& group_get_object($group_id);
if (!$project || !is_object($project)) {
}
function getAdminPage ($params) {
- global $Language;
$group =& group_get_object($params['group_id']);
if ($group->usesPlugin($this->name)) {
}
function getStats ($params) {
- global $Language ;
$group_id = $params['group_id'] ;
$project =& group_get_object($group_id);
if (!$project || !is_object($project)) {
}
function getDetailedStats ($params) {
- global $Language, $HTML;
+ global $HTML;
$group_id = $params['group_id'] ;
$result = db_query('
}
function CallHook ($hookname, $params) {
- global $Language, $HTML ;
+ global $HTML ;
switch ($hookname) {
case 'scm_page':
}
function getPage ($group_id) {
- global $Language, $HTML, $sys_scm_snapshots_path;
+ global $HTML, $sys_scm_snapshots_path;
$project =& group_get_object($group_id);
if (!$project || !is_object($project)) {
}
function getAdminPage ($params) {
- global $Language ;
$group =& group_get_object($params['group_id']);
if ( $group->usesPlugin ( $this->name ) && $group->isPublic()) {
?>
}
function getStats ($params) {
- global $Language ;
$group_id = $params['group_id'] ;
$project =& group_get_object($group_id);
if (!$project || !is_object($project)) {
}
function getDetailedStats ($params) {
- global $Language, $HTML;
+ global $HTML;
$group_id = $params['group_id'] ;
$result = db_query('
*
*/
function getCommitEntries($Query,$group_id) {
- global $Language;
-
$group = &group_get_object($group_id);
$DBResult = db_query($Query);
$Rows= db_numrows($DBResult);
*
*/
function getTitleArr() {
- global $Language;
$title_arr=array();
$title_arr[]=_('Filename');
$title_arr[]=_('Date');
*
*/
function getDiffLink($GroupName, $FileName, $PrevVersion, $ActualVersion) {
- global $sys_default_domain,$Language;
+ global $sys_default_domain;
return '<a href="/plugins/scmsvn/viewcvs.php/'.
$FileName.'?root='.$GroupName.'&r1='.$PrevVersion.'&r2='.
$ActualVersion.'">'.
*
*/
function CallHook ($hookname, $params) {
- global $group_id,$Language, $G_SESSION, $HTML, $use_svntrackerplugin,$aid ;
+ global $group_id, $G_SESSION, $HTML, $use_svntrackerplugin,$aid ;
if ($hookname == "groupisactivecheckbox") {
//Check if the group is active
$group = &group_get_object($group_id);
}
function CallHook ($hookname, $params) {
- global $use_webcalendarplugin,$G_SESSION,$HTML,$Language;
+ global $use_webcalendarplugin,$G_SESSION,$HTML;
if ($hookname == "usermenu") {
$text = $this->text; // this is what shows in the tab
if ($G_SESSION->usesPlugin("webcalendar")) {
echo "</td>";
echo "</tr>";
} elseif ($hookname == "user_personal_links") {
- global $Language;
// this displays the link in the user´s profile page to it´s personal webcalendar (if you want other sto access it, youll have to change the permissions in the index.php
$userid = $params['user_id'];
$user = user_get_object($userid);
<a href="/plugins/webcalendar/index.php?id=' . $userid . '&type=user&pluginname=' . $this->name . '">' . _('View Personal webcalendar') .'</a></p>';
}
} elseif ($hookname == "project_admin_plugins") {
- global $Language;
// this displays the link in the project admin options page to it´s webcalendar administration
$group_id = $params['group_id'];
$group = &group_get_object($group_id);
// the header that displays for the user portion of the plugin
function webcalendar_Project_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$id;
$params['toptab']='webcalendar';
$params['group']=$id;
/*
// the header that displays for the project portion of the plugin
function webcalendar_User_Header($params) {
- global $DOCUMENT_ROOT,$HTML,$user_id,$Language;
+ global $DOCUMENT_ROOT,$HTML,$user_id;
$params['toptab']='webcalendar';
$params['user']=$user_id;
/*
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('pre.php');
function forum_header($params) {
- global $HTML,$group_id,$forum_name,$forum_id,$sys_news_group,$Language,$f,$sys_use_forum,$group_forum_id;
+ global $HTML,$group_id,$forum_name,$forum_id,$sys_news_group,$f,$sys_use_forum,$group_forum_id;
if ($group_forum_id) {
$forum_id=$group_forum_id;
echo site_user_footer(array());
function user_belongs_to_group($user_id,$group_id){
-global $HTML,$Language;
+global $HTML;
$sql = "SELECT value,admin_flags FROM user_group,role_setting WHERE role_setting.role_id = user_group.role_id AND user_group.user_id = '".$user_id."' AND user_group.group_id = '".$group_id."' AND role_setting.section_name = 'webcal'";
//$sql = "SELECT COUNT(*) FROM user_group WHERE user_id = '".$user_id."' AND group_id = '".$group_id."'";
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @param $primary_key - the primary key of the table
*/
function admin_table_add($table, $unit, $primary_key) {
- global $Language;
-
// This query may return no rows, but the field names are needed.
$result = db_query('SELECT * FROM '.$table.' WHERE '.$primary_key.'=0');
$fields = array();
* @param $primary_key - the primary key of the table
*/
function admin_table_postadd($table, $unit, $primary_key) {
- global $Language;
-
if (!form_key_is_valid(getStringFromRequest('form_key'))) {
exit_form_double_submit();
}
* @param $id - the id of the record to act on
*/
function admin_table_confirmdelete($table, $unit, $primary_key, $id) {
- global $Language;
-
if ($unit == "processor") {
$result = db_numrows(db_query("SELECT processor_id FROM frs_file WHERE processor_id = $id"));
if ($result > 0) {
* @param $id - the id of the record to act on
*/
function admin_table_delete($table, $unit, $primary_key, $id) {
- global $Language;
-
$sql = "DELETE FROM $table WHERE $primary_key=$id";
if (db_query($sql)) {
printf(_('%1$s successfully deleted.'), ucfirst(getUnitLabel($unit)));
* @param $id - the id of the record to act on
*/
function admin_table_edit($table, $unit, $primary_key, $id) {
- global $Language;
-
$result = db_query("SELECT * FROM $table WHERE $primary_key=$id");
if ($result) {
* @param $id - the id of the record to act on
*/
function admin_table_postedit($table, $unit, $primary_key, $id) {
- global $HTTP_POST_VARS, $Language;
+ global $HTTP_POST_VARS;
$sql = 'UPDATE '.$table.' SET ';
while (list($var, $val) = each($HTTP_POST_VARS)) {
* @param $primary_key - the primary key of the table
*/
function admin_table_show($table, $unit, $primary_key) {
- global $HTML, $Language;
+ global $HTML;
$result = db_query("SELECT * FROM $table ORDER BY $primary_key");
$HTML->footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function activate_group($group_id) {
global $feedback;
- global $Language;
$group =& group_get_object($group_id);
site_admin_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @param string the path to the plugins conf dir
*/
function printSelection($checked,$pluginpath) {
- global $Language,$feedback,$sys_etc_path;
+ global $feedback,$sys_etc_path;
$config_files = array(); // array that'll have the config files
$i = 0;
* @param unknown_type $filepath
*/
function updateVars($vars,$filepath) {
- global $Language,$feedback;
+ global $feedback;
$filedata = file_get_contents($filepath);
$lines = explode("\n",$filedata);
function do_update(&$group, $is_public, $status, $license,
$group_type, $unix_box, $http_domain, $scm_box='') {
global $feedback;
- global $Language;
db_begin();
site_admin_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
site_admin_header(array('title'=>_('Site Admin: Edit Rejection Responses')));
function check_select_value($value, $type) {
- global $Language;
if( $value == "100" ) {
print("<span class=\"important\">".sprintf(_('You can\'t %1$s \"None\"!'), $GLOBALS['type'])."</span><br />\n");
}
site_admin_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
// print current node, then all subnodes
function printnode ($nodeid,$text) {
- global $Language;
print ('<br />');
for ($i=0;$i<$GLOBALS['depth'];$i++) {
site_admin_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @param string $user_id - the user id to act upon
*/
function performAction($newStatus, $statusString, $user_id) {
- global $Language;
$u =& user_get_object($user_id);
if (!$u || !is_object($u)) {
exit_error('Error','Could Not Get User');
}
function show_users_list ($result) {
- global $Language;
echo '<p>' ._('Key') .':
<span class="active">'._('Active'). '</span>
<span class="deleted">' ._('Deleted') .'</span>
$HTML->footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function docman_header($title,$pagehead,$style='xyz') {
- global $group_id, $Language, $HTML, $sys_use_docman;
+ global $group_id, $HTML, $sys_use_docman;
if (!$sys_use_docman) {
exit_disabled();
}
function doc_droplist_count($l_group_id, $language_id, $g) {
- global $Language;
-
if (session_loggedin()) {
$perm =& $g->getPermission( session_get_user() );
if (!$perm || !is_object($perm) || !$perm->isMember()) {
* docman_display_documents - Recursive function to show the documents inside the groups tree
*/
function docman_display_documents(&$nested_groups, &$document_factory, $is_editor, $stateid=0, $from_admin=false, $parent_group=0) {
- global $selected_doc_group_id,$Language;
+ global $selected_doc_group_id;
$selected_doc_group_id=getIntFromRequest('selected_doc_group_id');
*/
function PrintAdminOptions() {
- global $Language,$group_id,$forum_id;
+ global $group_id,$forum_id;
echo '
<p>
*/
function PrintAdminPendingOption($forum_id) {
- global $Language;
echo '
<a href="pending.php?action=view_pending&group_id=' . $this->group_id . '&forum_id=' . $forum_id . '">' . _('Manage Pending Messages').'</a><br /></p>';
}
* @param string action to execute.
*/
function ExecuteAction ($action) {
- global $Language,$HTML;
+ global $HTML;
if ($action == "change_status") { //change a forum
$forum_name = getStringFromRequest('forum_name');
$group_id = getIntFromRequest('group_id');
$forum_id = getIntFromRequest("forum_id");
-global $Language,$HTML;
+global $HTML;
$fa = new ForumAdmin();
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function goodbye($msg) {
- global $Language;
site_header(array('title'=>_('Attachments')));
html_feedback_top($msg);
echo '<p><p><center><form method="post"><input type="button" value="Close Window" onclick="window.close()"></form></center>';
$msg_id = getIntFromRequest("msg_id");
$group_id = getIntFromRequest("group_id");
$forum_id = getIntFromRequest("forum_id");
-global $Language;
if ( !($forum_id) || !($group_id) ) {
exit_missing_param();
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*
*/
function AddToDBOnly($userid, $dateline, $filename, $filedata, $filesize, $visible, $filehash, $mimetype) {
- global $Language;
-
$result=db_query("SELECT max(msg_id) AS id FROM forum");
if (!$result || db_numrows($result) < 1) {
$this->messages[] = _('Couldn\'t get message id');
*
*/
function attach($attach,$group_id,$update=0,$msg_id=0) {
- global $Language;
global $_FILES;
$attachment = trim($attach['tmp_name']);
require_once('www/forum/include/AttachManager.class.php');
function forum_header($params) {
- global $HTML,$group_id,$forum_name,$forum_id,$sys_news_group,$Language,$f,$sys_use_forum,$group_forum_id;
+ global $HTML,$group_id,$forum_name,$forum_id,$sys_news_group,$f,$sys_use_forum,$group_forum_id;
if ($group_forum_id) {
$forum_id=$group_forum_id;
* @return returns the html output
*/
function showPendingMessage ( &$msg) {
- global $Language,$HTML,$group_id;
+ global $HTML,$group_id;
$am = new AttachManager();
$ret_val = $am->PrintHelperFunctions();
in the format appropriate for the nested messages
*/
- global $Language,$HTML,$group_id;
+ global $HTML,$group_id;
/*
See if this message is new or not
If so, highlite it in bold
*/
function LinkAttachEditForm($filename,$group_id,$forum_id,$attachid,$msg_id) {
- global $Language;
$return_val = '
<p>
*/
function LinkAttachForm() {
- global $Language;
-
$poststarttime = time();
$posthash = md5($poststarttime . user_getid() );
echo "
*/
function showEditForm(&$msg) {
- global $Language,$sys_default_domain;
+ global $sys_default_domain;
$thread_id = $msg->getThreadID();
$msg_id = $msg->getID();
}
function showPostForm($thread_id=0, $is_followup_to=0, $subject="") {
- global $Language,$sys_default_domain,$group_id;
+ global $sys_default_domain,$group_id;
$body = '';
}
function frs_header($params) {
- global $group_id,$HTML,$Language,$sys_use_frs;
+ global $group_id,$HTML,$sys_use_frs;
/*
Does this site use FRS?
/*
return a pop-up select box of the available filetypes
*/
- global $FRS_FILETYPE_RES, $Language;
+ global $FRS_FILETYPE_RES;
if (!isset($FRS_FILETYPE_RES)) {
$FRS_FILETYPE_RES=db_query("SELECT * FROM frs_filetype");
}
/*
return a pop-up select box of the available processors
*/
- global $FRS_PROCESSOR_RES, $Language;
+ global $FRS_PROCESSOR_RES;
if (!isset($FRS_PROCESSOR_RES)) {
$FRS_PROCESSOR_RES=db_query("SELECT * FROM frs_processor");
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function displayText($text, $bbcode_uid)
{
- global $Language, $HTML;
+ global $HTML;
// First: If there isn't a "[" and a "]" in the message, don't bother.
if (!(strpos($text, "[") && strpos($text, "]"))){
return $text;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function prepareJavascript($form_name, $text_field_name){
- global $Language;
-
$javascript_ready = 1;
?>
}
function displayBBCodeHelpTools(){
- global $Language;
-
?>
<table width="450" border="0" cellspacing="0" cellpadding="2">
}
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
}
function header($params) {
- global $Language;
-
$this->headerStart($params); ?>
<body>
<?php
}
function bodyHeader($params){
- global $Language;
?>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="headertable">
<?php
global $sys_show_source;
- global $Language;
if ($sys_show_source) {
print '<a class="showsource" href="'.$GLOBALS['sys_urlprefix'].'/source.php?file=' . getStringFromServer('SCRIPT_NAME') . '"> '._('Show source').' </a>';
}
}
function outerTabs($params) {
- global $Language,$sys_use_trove,$sys_use_snippet,$sys_use_people;
+ global $sys_use_trove,$sys_use_snippet,$sys_use_people;
$TABS_DIRS[]='/';
$TABS_DIRS[]='/my/';
* @param string Is the group we should look up get title info
*/
function projectTabs($toptab,$group) {
-
- global $Language;
-
// get group info using the common result set
$project =& group_get_object($group);
if (!$project || !is_object($project)) {
}
function searchBox() {
- global $Language,$words,$forum_id,$group_id,$group_project_id,$atid,$exact,$type_of_search;
+ global $words,$forum_id,$group_id,$group_project_id,$atid,$exact,$type_of_search;
if(get_magic_quotes_gpc()) {
$defaultWords = stripslashes($words);
}
function advancedSearchBox($sectionsArray, $group_id, $words, $isExact) {
- global $Language;
// display the searchmask
print '
<form name="advancedsearch" action="'.getStringFromServer('PHP_SELF').'" method="post">
*/
function generic_header_start($params) {
- global $G_SESSION, $Language, $sys_name;
+ global $G_SESSION, $sys_name;
if (!$params['title']) {
$params['title'] = $GLOBALS['sys_name'];
* @param array Footer parameters array
*/
function generic_footer($params) {
- global $Language, $sys_name;
+ global $sys_name;
echo '<P><A HREF="'.$GLOBALS['sys_urlprefix'].'/source.php?page_url='.getStringFromServer('PHP_SELF').'"><B><FONT COLOR="WHITE">Show Source</FONT></B></A><P>';
global $IS_DEBUG,$QUERY_COUNT;
* @param array Header parameters array
*/
function header($params) {
- global $Language;
$this->generic_header_start($params);
/*
* @param string Any extra text to print out
*/
function project_tabs($toptab,$group,$extra_text='') {
-
- global $Language;
-
// get group info using the common result set
$project=group_get_object($group);
if ($project->isError()) {
//
function displaySmiliesList($number_of_smilies_per_row=5)
{
- global $SMILIES, $Language, $sys_default_domain;
+ global $SMILIES, $sys_default_domain;
$num_smilies = count($SMILIES);
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @param string Error text
*/
function exit_error($title,$text="", $toptab='') {
- global $HTML,$group_id, $Language;
+ global $HTML,$group_id;
$HTML->header(array('title'=>_('Exiting with error'), 'group'=>$group_id, 'toptab'=>$toptab));
print '<span class="error">'.$title.'</span><p>'.htmlspecialchars($text) .'</p>';
$HTML->footer(array());
* @param string $reason_descr
*/
function exit_permission_denied($reason_descr='') {
- global $Language;
if(!session_loggedin()) {
exit_not_logged_in();
} else {
* exit_no_group() - Exit with no group chosen error
*/
function exit_no_group() {
- global $Language;
exit_error(_('ERROR - No group was chosen or you can\'t access it'),_('No group was chosen or you can\'t access it'));
}
* exit_missing_param() - Exit with missing required parameters error
*/
function exit_missing_param() {
- global $Language;
exit_error(_('Error - missing parameters'),_('Error - missing required parameters'));
}
* exit_disabled() - Exit with disabled feature error.
*/
function exit_disabled() {
- global $Language;
exit_error(_('Error - disabled feature.'),_('The Site Administrator has turned off this feature.'));
}
* exit_form_double_submit() - Exit with double submit error.
*/
function exit_form_double_submit() {
- global $Language;
exit_error(_('Error - double submit'),_('You Attempted To Double-submit this item. Please avoid double-clicking.'));
}
require_once('common/include/GForge.class.php');
function show_features_boxes() {
- GLOBAL $HTML,$Language,$sys_use_ratings;
+ GLOBAL $HTML,$sys_use_ratings;
$return = '';
$return .= $HTML->boxTop(sprintf(_('%1$s Statistics'), $GLOBALS['sys_name']),0);
}
function show_top_downloads() {
-
- global $Language;
// TODO yesterday is now defined as two days ago. Quick fix
// to allow download list to be cached before nightly
// aggregation is done. jbyers 2001.03.19
}
function show_sitestats() {
- global $Language;
$gforge = new GForge();
$return = '';
$return .= _('Hosted Projects').': <strong>'.number_format($gforge->getNumberOfHostedProjects()).'</strong>';
}
function show_newest_projects() {
- global $Language;
$sql = "SELECT group_id,unix_group_name,group_name,register_time FROM groups " .
"WHERE is_public=1 AND status='A' AND type_id=1 AND register_time > 0 " .
"ORDER BY register_time DESC";
}
function show_highest_ranked_users() {
- global $Language;
//select out the users information to show the top users on the site
$sql="SELECT users.user_name,users.realname,user_metric.metric
FROM user_metric,users
}
function show_highest_ranked_projects() {
- global $Language;
$sql="SELECT groups.group_name,groups.unix_group_name,groups.group_id,".
"project_weekly_metric.ranking,project_weekly_metric.percentile ".
"FROM groups,project_weekly_metric ".
return $return;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @param string What to call the 'Any row' defaults to any
*/
function html_build_radio_buttons_from_arrays ($vals,$texts,$select_name,$checked_val='xzxz',$show_100=true,$text_100='none',$show_any=false,$text_any='any') {
- global $Language;
if ($text_100=='none'){
$text_100=_('None');
}
* @param string What to call the 'Any row' defaults to any
*/
function html_build_select_box_from_arrays ($vals,$texts,$select_name,$checked_val='xzxz',$show_100=true,$text_100='none',$show_any=false,$text_any='any') {
- global $Language;
if ($text_100=='none'){
$text_100=_('None');
}
* @param string What to call the '100 row'. Defaults to none.
*/
function html_build_select_box ($result, $name, $checked_val="xzxz",$show_100=true,$text_100='none') {
- global $Language;
if ($text_100=='none'){
$text_100=_('None');
}
* @param bool Whether or not to show the '100 row'
*/
function html_build_multiple_select_box ($result,$name,$checked_array,$size='8',$show_100=true) {
- global $Language;
$checked_count=count($checked_array);
$return .= '
<select name="'.$name.'" multiple="multiple" size="'.$size.'">';
* @param bool Whether or not to show the '100 row'
*/
function html_build_multiple_select_box_from_arrays($ids,$texts,$name,$checked_array,$size='8',$show_100=true,$text_100='none') {
- global $Language;
$checked_count=count($checked_array);
$return ='
<select name="'.$name.'" multiple="multiple" size="'.$size.'">';
* @param bool Whether to make 'No Change' selected.
*/
function html_build_priority_select_box ($name='priority', $checked_val='3', $nochange=false) {
- global $Language;
?>
<select name="<?php echo $name; ?>">
<?php if($nochange) { ?>
* @param params array() must contain $user_id
*/
function site_user_header($params) {
- GLOBAL $HTML,$Language;
+ GLOBAL $HTML;
/*
Check to see if active user
. $text . '</textarea>';
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
// Menu entry for all admin tasks when logged as site administor
function menu_site_admin() {
- global $HTML, $Language, $sys_name;
+ global $HTML, $sys_name;
$HTML->menuhtml_top($sys_name." "._('Admin'));
$HTML->menu_entry('/admin/',_('Site admin'));
$HTML->menu_entry('/admin/grouplist.php',_('Group list admin'));
}
function menu_site_help() {
- global $HTML, $Language, $sys_name;
+ global $HTML, $sys_name;
$HTML->menuhtml_top($sys_name);
$HTML->menu_entry('/', _('Home'));
$HTML->menu_entry('/snippet/', _('Code Snippets'));
function menu_project_info($group) {
- global $HTML, $Language;
+ global $HTML;
$project =& group_get_object($group);
if ($project->isError()) {
}
function menu_search() {
- global $HTML, $Language;
+ global $HTML;
$HTML->menuhtml_top(_('Search'));
menu_show_search_box();
$HTML->menuhtml_bottom();
}
function menu_notloggedin() {
- global $HTML, $Language;
+ global $HTML;
$HTML->menuhtml_top('Login Status:');
echo "<span class=\"error\">NOT LOGGED IN</span> <br />";
// $HTML->menu_entry($GLOBALS['sys_home'].'faq/?group='.$GLOBALS['sys_unix_group_name'].'&question=Why_to_log_in.txt','Why Log In?');
* @param bool Whether to return the results within an HTML table or not
*/
function project_summary($group_id,$mode,$no_table) {
- global $Language;
if (!$group_id) {
return 'Error - No Group ID';
}
return $return;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @param string The bar colors
*/
function reports_quick_graph($title,$sql1,$sql2,$bar_colors) {
- global $Language;
$result1=db_query($sql1);
$result2=db_query($sql2);
if ($result1 && $result2 && db_numrows($result2) > 0) {
global $what;
global $period;
global $span;
- global $Language;
print '<form method="get" action="'.getStringFromServer('PHP_SELF').'#b">';
print "</form>\n";
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
global $discrim_url;
global $expl_discrim;
global $form_cat;
- global $Language;
$res_trovecat = db_query("
SELECT trove_cat.fullpath AS fullpath,
* @param int The survey ID
*/
function show_survey ($group_id,$survey_id) {
- global $Language;
-
/*
Select this survey from the database
*/
");
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function mail_header($params) {
- global $Language, $HTML, $group_id;
+ global $HTML, $group_id;
if ($group_id) {
//required for site_project_header
site_project_footer($params);
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function show_news_approve_form($sql_pending, $sql_rejected, $sql_approved) {
- global $Language;
/*
Show list of waiting news items
*/
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function news_header($params) {
- global $HTML,$group_id,$news_name,$news_id,$sys_news_group,$Language,$sys_use_news;
+ global $HTML,$group_id,$news_name,$news_id,$sys_news_group,$sys_use_news;
if (!$sys_use_news) {
exit_disabled();
}
function news_show_latest($group_id='',$limit=10,$show_summaries=true,$allow_submit=true,$flat=false,$tail_headlines=0,$show_forum=true) {
- global $sys_news_group,$Language;
+ global $sys_news_group;
if (!$group_id) {
$group_id=$sys_news_group;
}
}
function news_foundry_latest($group_id=0,$limit=5,$show_summaries=true) {
- global $Language;
/*
Show a the latest news for a portal
*/
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
}
function people_add_to_skill_inventory($skill_id,$skill_level_id,$skill_year_id) {
- global $feedback, $Language;
+ global $feedback;
if (session_loggedin()) {
// check required fields
if (!$skill_id || $skill_id == "xyxy") {
}
function people_show_skill_inventory($user_id) {
- global $Language;
$sql="SELECT people_skill.name AS skill_name, people_skill_level.name AS level_name, people_skill_year.name AS year_name ".
"FROM people_skill_year,people_skill_level,people_skill,people_skill_inventory ".
"WHERE people_skill_year.skill_year_id=people_skill_inventory.skill_year_id ".
}
function people_edit_skill_inventory($user_id) {
- global $Language;
$sql="SELECT * FROM people_skill_inventory WHERE user_id='$user_id'";
$result=db_query($sql);
function people_add_to_job_inventory($job_id,$skill_id,$skill_level_id,$skill_year_id) {
- global $feedback, $Language;
+ global $feedback;
if (session_loggedin()) {
//check if they've already added this skill
$sql="SELECT * FROM people_job_inventory WHERE job_id='$job_id' AND skill_id='$skill_id'";
}
function people_show_job_inventory($job_id) {
- global $Language;
$sql="SELECT people_skill.name AS skill_name, people_skill_level.name AS level_name, people_skill_year.name AS year_name ".
"FROM people_skill_year,people_skill_level,people_skill,people_job_inventory ".
"WHERE people_skill_year.skill_year_id=people_job_inventory.skill_year_id ".
}
function people_get_skill_name($skill_id) {
- global $Language;
$sql="SELECT name FROM people_skill WHERE skill_id='$skill_id'";
$result=db_query($sql);
if (!$result || db_numrows($result) < 1) {
// think of a way of turning into valid XHTML without the resulting
// table looking like poo.
function people_edit_job_inventory($job_id,$group_id) {
- global $Language, $HTML;
+ global $HTML;
$sql="SELECT * FROM people_job_inventory WHERE job_id='$job_id'";
$result=db_query($sql);
}
function people_show_category_table() {
- global $Language;
-
//show a list of categories in a table
//provide links to drill into a detail page that shows these categories
}
function people_show_job_list($result) {
- global $Language;
//takes a result set from a query and shows the jobs
//query must contain 'group_id', 'job_id', 'title', 'category_name' and 'status_name'
*/
function displayUserSkills($user_id, $allowEdit) {
- GLOBAL $HTML, $Language;
+ global $HTML;
$sql = "SELECT * FROM skills_data_types ORDER BY type_id ASC";
$result=db_query($sql);
$rows = db_numrows($result);
}
function handle_multi_edit($skill_ids) {
- GLOBAL $HTML, $Language;
+ global $HTML;
$numSkills = count($skill_ids);
$SQL = "select * from skills_data where skills_data_id in(".$skill_ids[0];
for($i = 1; $i < $numSkills; $i++) {
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function pm_header($params) {
// XXX ogi: What to do with these?
- global $group_id,$is_pm_page,$words,$group_project_id,$HTML,$order,$pg,$Language,$sys_use_pm;
+ global $group_id,$is_pm_page,$words,$group_project_id,$HTML,$order,$pg,$sys_use_pm;
if (!$sys_use_pm) {
exit_disabled();
}
function percentCompleteBox($name='percent_complete',$selected=0) {
- global $Language;
echo '
<select name="'.$name.'">';
echo '
}
function showMonthBox($name,$select_month=0) {
- global $Language;
echo '
<select name="'.$name.'" size="1">';
$monthlist = array(
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function showDependentTasks () {
- global $Language;
$sql="SELECT project_task.project_task_id,project_task.summary
FROM project_task,project_dependencies
WHERE project_task.project_task_id=project_dependencies.project_task_id
}
function showRelatedArtifacts() {
- global $Language;
$res=$this->getRelatedArtifacts();
$rows=db_numrows($res);
/*
Show the details rows from task_history
*/
- global $Language;
-
$result=$this->getMessages();
$rows=db_numrows($result);
show the project_history rows that are
relevant to this project_task_id, excluding details
*/
- global $Language;
-
$result=$this->getHistory();
$rows=db_numrows($result);
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
$bar_colors=array("pink","violet");
function pm_reporting_header($group_id) {
- global $Language;
reports_header($group_id,
array('aging','tech','subproject'),
array(_('Aging Report'),
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function check_file_size($size) {
global $feedback;
- global $Language;
if (($size > 20) && ($size < 256000)) {
return true;
global $group_id;
global $description;
global $feedback;
- global $Language;
if (!util_check_fileupload($input_file)) {
exit_error("Error","Invalid filename");
project_admin_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function project_admin_header($params) {
- global $group_id,$feedback,$HTML,$Language;
+ global $group_id,$feedback,$HTML;
$params['toptab']='admin';
$params['group']=$group_id;
show the group_history rows that are relevant to
this group_id
*/
- global $Language;
$result=group_get_history($group_id);
$rows=db_numrows($result);
}
function permissions_blurb() {
- global $Language;
-
return _('<strong>NOTE:</strong><dl><dt><strong>Project Admins (bold)</strong></dt><dd>can access this page and other project administration pages</dd><dt><strong>Release Technicians</strong></dt><dd>can make the file releases (any project admin also a release technician)</dd><dt><strong>Tool Technicians (T)</strong></dt><dd>can be assigned Bugs/Tasks/Patches</dd><dt><strong>Tool Admins (A)</strong></dt><dd>can make changes to Bugs/Tasks/Patches as well as use the /toolname/admin/ pages</dd><dt><strong>Tool No Permission (N/A)</strong></dt><dd>Developer doesn\'t have specific permission (currently equivalent to \'-\')</dd><dt><strong>Moderators</strong> (forums)</dt><dd>can delete messages from the project forums</dd><dt><strong>Editors</strong> (doc. manager)</dt><dd>can update/edit/remove documentation from the project.</dd></dl>');
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
// stats_project_daily
function stats_project_daily( $group_id, $span = 7 ) {
global $HTML;
- global $Language;
//
// We now only have 30 & 7-day views
// stats_project_monthly
function stats_project_monthly( $group_id ) {
global $HTML;
- global $Language;
$res = db_query("
SELECT * FROM stats_project_months
WHERE group_id='$group_id'
function stats_project_all( $group_id ) {
global $HTML;
- global $Language;
$res = db_query("
SELECT *
FROM stats_project_all_vw
return "AND $field_name>=" . (string)($time_now-$seconds) ." \n";
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/report_utils.php');
require_once('common/reporting/Report.class.php');
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error('Error',$report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/report_utils.php');
require_once('common/reporting/Report.class.php');
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error($report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
session_require( array('group'=>$sys_stats_group) );
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error($report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
session_require( array('group'=>$sys_stats_group) );
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error($report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
session_require( array('group'=>$sys_stats_group,'A') );
-global $Language;
-
- echo report_header(_('Main Page'));
+echo report_header(_('Main Page'));
if (getStringFromRequest('submit') && getStringFromRequest('im_sure')) {
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/Report.class.php');
session_require( array('group'=>$sys_stats_group) );
-global $Language;
$report=new Report();
if ($report->isError()) {
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/ReportSiteTime.class.php');
session_require( array('group'=>$sys_stats_group) );
-global $Language;
$report=new Report();
if ($report->isError()) {
}
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/Report.class.php');
session_require( array('group'=>$sys_stats_group) );
-global $Language;
$report=new Report();
if ($report->isError()) {
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/ReportSetup.class.php');
session_require( array('group'=>$sys_stats_group,'A') );
-global $Language;
$time_code = getStringFromRequest('time_code');
$category_name = getStringFromRequest('category_name');
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/report_utils.php');
require_once('common/reporting/Report.class.php');
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error($report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
session_require( array('group'=>$sys_stats_group) );
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error($report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/report_utils.php');
require_once('common/reporting/Report.class.php');
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error('Error',$report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
require_once('common/reporting/report_utils.php');
require_once('common/reporting/Report.class.php');
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error($report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
session_require( array('group'=>$sys_stats_group) );
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error($report->getErrorMessage());
session_require( array('group'=>$sys_stats_group) );
-global $Language;
-
$report=new Report();
if ($report->isError()) {
exit_error($report->getErrorMessage());
echo report_footer();
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function scm_header($params) {
- global $HTML, $Language, $sys_use_scm;
+ global $HTML, $sys_use_scm;
if (!$sys_use_scm) {
exit_disabled();
}
site_project_footer(array());
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* @return String the output of the ViewCVS command.
*/
function viewcvs_execute($repos_name, $repos_type) {
- global $Language;
-
$request_uri = getStringFromServer('REQUEST_URI');
$query_string = getStringFromServer('QUERY_STRING');
return $content;
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
}
function loadSearchEngines() {
- global $Language;
-
// Specific search engines
$this->addSearchEngine(
SEARCH__TYPE_IS_ARTIFACT,
}
+
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
+?>
class DocsGroupSearchEngine extends GroupSearchEngine {
function DocsGroupSearchEngine() {
- global $Language;
$this->GroupSearchEngine(SEARCH__TYPE_IS_DOCS, 'DocsHtmlSearchRenderer', _('This project\'s documents'));
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
class ForumSearchEngine extends GroupSearchEngine {
function ForumSearchEngine() {
- global $Language;
$this->GroupSearchEngine(SEARCH__TYPE_IS_FORUM, 'ForumHtmlSearchRenderer', _('This forum'));
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
class ForumsGroupSearchEngine extends GroupSearchEngine {
function ForumsGroupSearchEngine() {
- global $Language;
$this->GroupSearchEngine(SEARCH__TYPE_IS_FORUMS, 'ForumsHtmlSearchRenderer', _('This project\'s forums'));
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
class FrsGroupSearchEngine extends GroupSearchEngine {
function FrsGroupSearchEngine() {
- global $Language;
$this->GroupSearchEngine(SEARCH__TYPE_IS_FRS, 'FrsHtmlSearchRenderer', _('This project\'s releases'));
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
class NewsGroupSearchEngine extends GroupSearchEngine {
function NewsGroupSearchEngine() {
- global $Language;
$this->GroupSearchEngine(SEARCH__TYPE_IS_NEWS, 'NewsHtmlSearchRenderer', _('This project\'s news'));
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
class TasksGroupSearchEngine extends GroupSearchEngine {
function TasksGroupSearchEngine() {
- global $Language;
$this->GroupSearchEngine(SEARCH__TYPE_IS_TASKS, 'TasksHtmlSearchRenderer', _('This project\'s tasks'));
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
class TrackersGroupSearchEngine extends GroupSearchEngine {
function TrackersGroupSearchEngine() {
- global $Language;
$this->GroupSearchEngine(SEARCH__TYPE_IS_TRACKERS, 'TrackersHtmlSearchRenderer', _('This project\'s trackers'));
}
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
*/
function snippet_mainpage() {
global $SCRIPT_LANGUAGE,$SCRIPT_CATEGORY;
- global $Language;
$return =_('<p>The purpose of this archive is to let you share your code snippets, scripts, and functions with the Open Source Software Community.</p><p>You can create a "new snippet", then post additional versions of that snippet quickly and easily.</p><p>Once you have snippets posted, you can then create a "Package" of snippets. That package can contain multiple, specific versions of other snippets.</p><p> </p><h3>Browse Snippets</h3> <p>You can browse the snippet library quickly:</p>').'
<br />
<p/>
echo snippet_mainpage();
snippet_footer(array());
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
$SCRIPT_EXTENSION[16] = '.cs';
function snippet_header($params) {
- global $HTML, $Language, $sys_use_snippet;
+ global $HTML, $sys_use_snippet;
if (!$sys_use_snippet) {
exit_disabled();
}
function snippet_show_package_snippets($version) {
-
- global $Language;
//show the latest version
$sql="SELECT snippet_package_item.snippet_version_id, snippet_version.version,snippet.name,users.user_name ".
"FROM snippet,snippet_version,snippet_package_item,users ".
</table></p>';
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
function stats_site_projects_form( $report='last_30', $orderby = 'downloads', $projects = 0, $trovecat = 0 ) {
- global $Language;
print '<form action="projects.php" method="get">' . "\n";
print '<table width="100%" cellpadding="0" cellspacing="0" class="tableheading">' . "\n";
}
function stats_site_projects( $report, $orderby, $projects, $trove ) {
- global $Language;
$i=0;
$offset=0;
$trove_cat=0;
?><?php
function stats_site_projects_daily( $span ) {
- global $Language;
$i=0;
//
// We now only have 30 & 7-day views
}
function stats_site_projects_monthly() {
- global $Language;
$i=0;
$sql="SELECT * FROM stats_site_months
ORDER BY month DESC";
}
function stats_site_aggregate( ) {
-
- global $Language;
$res = db_query("SELECT * FROM stats_site_all_vw", -1, 0, SYS_DB_STATS);
$site_totals = db_fetch_array($res);
<?php
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
?>
Function ShowResultsEditQuestion($result) {
global $group_id;
- global $Language;
$rows = db_numrows($result);
$cols = db_numfields($result);
echo "<h3>" .sprintf(ngettext('%1$s question found', '%1$s questions found', $rows), $rows)."</h3>";
*/
function survey_header($params) {
- global $group_id,$is_admin_page,$HTML,$Language,$sys_use_survey;
+ global $group_id,$is_admin_page,$HTML,$sys_use_survey;
if (!$sys_use_survey) {
exit_disabled();
}
function header($params) {
- global $Language;
-
$this->headerStart($params); ?>
<body>
border="0" /></a></div>
<?php
global $sys_show_source;
-global $Language;
if ($sys_show_source) {
print '<a class="showsource" href="'.$GLOBALS['sys_urlprefix'].'/source.php?file=' . getStringFromServer('SCRIPT_NAME') . '"> '._('Show source').' </a>';
}
* @param string Is the group we should look up get title info
*/
function projectTabs($toptab,$group) {
- global $Language;
-
// get group info using the common result set
$project =& group_get_object($group);
if (!$project || !is_object($project)) {
function searchBox() {
- global $Language,$words,$forum_id,$group_id,$group_project_id,$atid,$exact,$type_of_search;
+ global $words,$forum_id,$group_id,$group_project_id,$atid,$exact,$type_of_search;
if(get_magic_quotes_gpc()) {
$defaultWords = stripslashes($words);
}
function advancedSearchBox($sectionsArray, $group_id, $words, $isExact) {
- global $Language;
// display the searchmask
print '
<form name="advancedsearch" action="'.getStringFromServer('PHP_SELF').'" method="post">
}
function bodyHeader($params){
- global $Language;
?>
<div class="header">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
global $sys_show_source;
-global $Language;
if ($sys_show_source) {
global $SCRIPT_NAME;
print '<a class="showsource" href="'.$GLOBALS['sys_urlprefix'].'/source.php?file=' . $SCRIPT_NAME . '"> '._('Show source').' </a>';
}
function outerTabs($params) {
- global $Language,$sys_use_trove,$sys_use_snippet,$sys_use_people;
+ global $sys_use_trove,$sys_use_snippet,$sys_use_people;
$TABS_DIRS[]='/';
$TABS_DIRS[]='/my/';
* @param string Is the group we should look up get title info
*/
function projectTabs($toptab,$group) {
-
- global $Language;
-
// get group info using the common result set
$project =& group_get_object($group);
if (!$project || !is_object($project)) {
}
function searchBox() {
- global $Language,$words,$forum_id,$group_id,$group_project_id,$atid,$exact,$type_of_search;
+ global $words,$forum_id,$group_id,$group_project_id,$atid,$exact,$type_of_search;
if(get_magic_quotes_gpc()) {
$defaultWords = stripslashes($words);
}
function advancedSearchBox($sectionsArray, $group_id, $words, $isExact) {
- global $Language;
// display the searchmask
print '
<form name="advancedsearch" action="'.getStringFromServer('PHP_SELF').'" method="post">
}
function mainMenu($params) {
- global $Language,$sys_use_trove,$sys_use_snippet,$sys_use_people;
+ global $sys_use_trove,$sys_use_snippet,$sys_use_people;
$TABS_DIRS[]='/';
$TABS_DIRS[]='/my/';
* @param array Header parameters array
*/
function header($params) {
- global $Language, $sys_name;
+ global $sys_name;
$this->headerStart($params); ?>
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
}
function searchBox() {
- global $Language,$words,$forum_id,$group_id,$group_project_id,$atid,$exact,$type_of_search;
+ global $words,$forum_id,$group_id,$group_project_id,$atid,$exact,$type_of_search;
// if there is no search currently, set the default
if ( ! isset($type_of_search) ) {
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
* show details preformatted (like followups)
*/
function showDetails() {
- global $Language;
$result = $this->getDetails();
$title_arr = array();
function showMessages() {
- global $Language;
$result= $this->getMessages();
$rows=db_numrows($result);
}
function showHistory() {
- global $artifact_cat_arr,$artifact_grp_arr,$artifact_res_arr, $Language;
+ global $artifact_cat_arr,$artifact_grp_arr,$artifact_res_arr;
$result=$this->getHistory();
$rows= db_numrows($result);
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>
}
function header($params) {
- global $HTML, $Language, $sys_use_tracker;
+ global $HTML, $sys_use_tracker;
if (!$sys_use_tracker) {
exit_disabled();
}
}
function adminHeader($params) {
- global $Language,$HTML;
+ global $HTML;
echo $this->header($params);
$group_id= $this->Group->getID();
* @return box and choices
*/
function renderSelect ($extra_field_id,$checked='xzxz',$show_100=false,$text_100='none',$show_any=false,$text_any='Any') {
- global $Language;
if ($text_100 == 'none'){
$text_100=_('None');
}
* @return radio buttons
*/
function renderCheckbox ($extra_field_id,$checked=array(),$show_100=false,$text_100='none') {
- global $Language;
if ($text_100 == 'none'){
$text_100=_('None');
}
* @return radio multiselectbox
*/
function renderMultiSelectBox ($extra_field_id,$checked=array(),$show_100=false,$text_100='none') {
- global $Language;
$arr =& $this->getExtraFieldElements($extra_field_id);
if (!$checked) {
$checked=array();
}
function technicianBox ($name='assigned_to[]',$checked='xzxz',$show_100=true,$text_100='none',$extra_id='-1',$extra_name='',$multiple=false) {
- global $Language;
if ($text_100=='none'){
$text_100=_('Nobody');
}
*
*/
function statusBox ($name='status_id',$checked='xzxz',$show_100=false,$text_100='none') {
- global $Language;
if ($text_100=='none'){
$text_100=_('None');
}
}
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:
+
?>