P4A 3.0.1 released


– a bug about session name was solved
– FCKEditor was updated to 2.6.2
– a bug with shadows CSS was solved (unused shadow.png file is not linked by screen.css anymore so we’ve no “file not found” in web server’s logs)
– P4A_Error_Handler() global function now uses the P4A::messageWarning() wrapper for P4A::message() solving a bug with the warning icon name that was changed in 3.0.0-rc5
– jQuery UI was updated to 1.5.1

For the first time p4a is also available as .deb package. We encourage all users of Debian based distros to test this new package and give us feedback.

Download P4A 3.0.1

8 thoughts on “P4A 3.0.1 released

  1. Eddie

    Fabrizio, using the exportToCSV method of P4A_DB_Source, I noted that the columns are disordered ’cause the Joins; I modified the code to export the data in the order that the $fields_names are setted:

    public function getAsCSV($separator = ‘,’, $fields_names = null)
    if ($fields_names === true or is_array($fields_names)) {
    $insert_header = true;
    } else {
    $insert_header = false;

    if ($fields_names === null or $fields_names === false or $fields_names === true) {
    $fields_names = array();
    while ($field = $this->fields->nextItem()) {
    $name = $field->getName();
    $fields_names[$name] = $name;

    $csv = “”;
    $rows = $this->getAll();

    if ($insert_header) {
    array_unshift($rows, $fields_names);

    foreach ($rows as $row) {
    $strrow = “”;
    foreach ($fields_names as $field=>$label) {
    if (array_key_exists($field, $row)) {
    $col = str_replace(“\n”,””,$row[$field]);
    $col = str_replace(“\r”,””,$col);
    $strrow .= ‘”‘ . str_replace(‘”‘,'””‘,$col . “\”{$separator}”);
    $csv .= substr($strrow,0,-1) . “\n”;
    return $csv;

  2. blas


    I want to make a comment (or maybe suggestion) about setSource…

    I see that p4a uses the info zend_db_table method in order to know the fields of a table and creates it in the mask.

    I’m thinking that, could be, it will be a useful enhacement, in a future version, using the metadata information provided by this call to set another field property as length (and maybe width ) or some validator (as nullable, type, etc.) by default.

    I don’t know if this culd be possible or I forgot something …



  3. Eddie

    Hi Fabrizio, I use an auto_increment field for my tables, why after insert a record via saveRow() method, the pointer goes to te first row..? I’ve traced the saveRow() and the value of my pk field is actually gathered, but never is setted to the P4A_DB_Field to allow save the multivalue fields and locate the new row.

  4. Eddie

    I recommend the modification of the line 742 of db_source to incorporate something like:

    $pks = $this->getPk();
    $pkvalue = $p4a_db_table->insert($fields_values);

    if (is_string($pks) && !is_array($pkvalue)) {

Leave a Reply

Your email address will not be published. Required fields are marked *