Skip to content

Commit

Permalink
FIX url to check keyword not saved on partnership from public form
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Sep 2, 2023
1 parent 0be3145 commit 1ac364a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion htdocs/install/repair.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
'fichinter'=>'fichinter', 'fichinterdet'=>'fichinterdet',
'inventory'=>'inventory',
'actioncomm'=>'actioncomm', 'bom_bom'=>'bom_bom', 'mrp_mo'=>'mrp_mo',
'adherent_type'=>'adherent_type', 'user'=>'user', 'projet'=>'projet', 'projet_task'=>'projet_task', 'ticket'=>'ticket');
'adherent_type'=>'adherent_type', 'user'=>'user', 'partnershiap'=>'partnershiap', 'projet'=>'projet', 'projet_task'=>'projet_task', 'ticket'=>'ticket');
//$listofmodulesextra = array('fichinter'=>'fichinter');

print '<tr><td colspan="2"><br>*** Check fields into extra table structure match table of definition. If not add column into table</td></tr>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/partnership/class/partnership.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Partnership extends CommonObject
'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
'date_partnership_start' => array('type'=>'date', 'label'=>'DatePartnershipStart', 'enabled'=>'1', 'position'=>52, 'notnull'=>1, 'visible'=>1,),
'date_partnership_end' => array('type'=>'date', 'label'=>'DatePartnershipEnd', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>1,),
'url_to_check' => array('type'=>'varchar(255)', 'label'=>'UrlToCheck', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1,),
'url_to_check' => array('type'=>'varchar(255)', 'label'=>'UrlToCheck', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax100'),
'count_last_url_check_error' => array('type'=>'integer', 'label'=>'CountLastUrlCheckError', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>-2, 'default'=>'0',),
'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'1', 'position'=>72, 'notnull'=>0, 'visible'=>-2,),
'reason_decline_or_cancel' => array('type'=>'text', 'label'=>'ReasonDeclineOrCancel', 'enabled'=>'1', 'position'=>73, 'notnull'=>0, 'visible'=>-2,),
Expand Down
7 changes: 4 additions & 3 deletions htdocs/public/partnership/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ function llxFooterVierge()
$partnership->date_partnership_start = dol_now();
$partnership->fk_user_creat = 0;
$partnership->fk_type = GETPOST('partnershiptype', 'int');
$partnership->url = GETPOST('url');
//$partnership->typeid = $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE ? $conf->global->PARTNERSHIP_NEWFORM_FORCETYPE : GETPOST('typeid', 'int');
$partnership->ip = getUserRemoteIP();

Expand All @@ -253,16 +254,16 @@ function llxFooterVierge()
}
}
}
// test if societe already exist
// test if thirdparty already exists
$company = new Societe($db);
$result = $company->fetch(0, GETPOST('societe'));
if ($result == 0) { // si il ya pas d'entree sur le nom on teste l'email
if ($result == 0) { // if entry with name not found, we search using the email
$result1 = $company->fetch(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, GETPOST('email'));
if ($result1 > 0) {
$error++;
$errmsg = $langs->trans("EmailAlreadyExistsPleaseRewriteYourCompanyName");
} else {
//create thirdparty
// create thirdparty
$company = new Societe($db);

$company->name = GETPOST('societe');
Expand Down

0 comments on commit 1ac364a

Please sign in to comment.