Skip to content

Commit

Permalink
Fix: broken features
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Apr 22, 2013
1 parent 5ccb410 commit ccf809b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion htdocs/compta/sociales/class/chargesociales.class.php
Expand Up @@ -30,7 +30,7 @@
*/
class ChargeSociales extends CommonObject
{
public $element='rowid';
public $element='chargesociales';
public $table='chargesociales';
public $table_element='chargesociales';

Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/sociales/document.php
Expand Up @@ -79,7 +79,7 @@
if ($action == 'delete')
{
$file = $upload_dir . '/' . GETPOST("urlfile"); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
$ret=dol_delete_file($file);
$ret=dol_delete_file($file,0,0,0,$object);
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
}
Expand Down Expand Up @@ -172,7 +172,7 @@

// Affiche formulaire upload
$formfile=new FormFile($db);
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id,'',0,0,$user->rights->tax->charges->creer);
$formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id,'',0,0,$user->rights->tax->charges->creer,50,$object);


// List of document
Expand Down
4 changes: 4 additions & 0 deletions htdocs/core/class/fileupload.class.php
Expand Up @@ -94,6 +94,10 @@ function __construct($options=null,$fk_element=null,$element=null)
elseif ($element == 'action') {
$pathname = 'comm/action'; $filename='actioncomm';
$dir_output=$conf->agenda->dir_output;
}
elseif ($element == 'chargesociales') {
$pathname = 'compta/sociales'; $filename='chargesociales';
$dir_output=$conf->tax->dir_output;
} else {
$dir_output=$conf->$element->dir_output;
}
Expand Down

0 comments on commit ccf809b

Please sign in to comment.