I have adopted com_registration component in a way that some additional elements are added in form and stored in alberghi_client table (from alberghi component).
That worked perfectly until host provider did server upgrade (Apache 1 -> 2.2.9 (Unix), PHP 4 -> 5.2.6), and after that fatal error occurs:
Class 'mosAlberghiClient' not found in /home/croatiad/public_html/components/com_registration/registration.php on line 164
In attachment you can find registration.php file, where adaptation can be seen.
This code has been copied from alberghi component to registration.php:
Code: Select all
// Class: mosAlberghiClient
class mosAlberghiClient extends mosDBTable {
//************************************************************
// Declare variables to store data
//************************************************************
var $id=null;
var $name=null;
var $contact=null;
var $address=null;
var $town=null;
var $county=null;
var $country=null;
var $postcode=null;
var $email=null;
var $website=null;
var $websiteDescription=null;
var $telephone=null;
var $fax=null;
var $extrainfo=null;
var $checked_out=null;
var $checked_out_time=null;
var $editor=null;
// Function: mosAlberghiClient
function mosAlberghiClient( &$db ) {
$this->mosDBTable( '#__alberghi_client', 'id', $db );
}
// Function: Check
function check() {
// check for valid name
if (trim( $this->name ) == '') {
$this->_error = "Devi inserire un nome.";
return false;
}
return true;
}
}
//***********************************************************
// Function: saveClient
//***********************************************************
function saveClient( &$database ) {
// Initialise a new row
$row = new mosAlberghiClient( $database );
// Bind the values submitted to the row
if (!$row->bind( $_POST )) {
return $database->getErrorMsg();
}
// Check the row
if (!$row->check()) {
return $database->getErrorMsg();
}
$row->contact = $row->name;
// Store the row
if (!$row->store()) {
return $database->getErrorMsg();
}
// Check in the row
$row->checkin($id);
// Return success
return NULL;
}
//***********************************************************
// Function: saveClient - END
//***********************************************************
This same class still works under alberghi component, and registration component works if this add-on is removed.
I hope I have explained my problem a little bit.
Any help is welcome.