bugSavane - Bugs: bug #8836, $project->project_data_array is...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #8836: $project->project_data_array is not initialized properly

Submitted by:  Alexey Demakov <allex>
Submitted on:  Mon 02 Apr 2007 09:16:36 AM UTC  
 
Category: Web Frontend: ProjectStatus: None
Severity: 2 - MinorPriority: C - Normal
Assigned to: NoneOpen/Closed: Open
Release: 3.0+2Planned Release: 
Reproducibility: NonePrivacy: Public

 Spam posted by ddzz130
Mon 02 Apr 2007 11:56:59 AM UTC, comment #1:

May be I found the cause:

in Group.class

function Project($id) {
$this->Group($id);
$this->project_data_array=$this->data_array;
}

is in Group class. And Project class is empty. So, when new Project($group_id) is created, project_data_array is not copied from data_array. I've added function Project($id) in Project class and it have solved several problems:

- project license & development status are displayed correctly;
- Select Features page works correctly (now I can change CVS Web Browsing address).

Alexey Demakov <allex>
Mon 02 Apr 2007 09:16:36 AM UTC, original submission:

I'm not familiar with PHP and Savane internals, but it seems to me that there is some inconsistency with $project->project_data_array.

In frontend/php/include/project_home.php I see:

if ($project->CanUse("license"))
{
$license = $project->getLicense();
print '<br />'._("License:").' ';
if ($LICENSE_URL[$license] != "0") {
print utils_link($LICENSE_URL[$license], $LICENSE[$license]);
} else {
print $LICENSE[$license];
if ($license == "other") {
print $project->getLicense_other();
}
}
}

where getLicense() and getLicense_other() are from Group.class:

function getLicense() {
return $this->project_data_array['license'];
}

function getLicense_other() {
return $this->project_data_array['license_other'];
}

function getDevelStatus() {
return $this->project_data_array['devel_status'];
}

These functions return empty value in my case. I didn't find when

function Project($id) {
$this->Group($id);
$this->project_data_array=$this->data_array;
}

from Group.class is called.

If I change project_data_array to data_array everything works fine.
function getLicense_other() {
return $this->data_array['license_other'];
}

I use apache-2.2.4, php-5.2.1, savane-3.0+2

Alexey Demakov <allex>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ddzz130 (Posted a comment)
  • -unavailable- added by allex (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup