This commit is contained in:
Laurent Destailleur 2012-01-08 00:52:07 +01:00
parent ad232fa38c
commit 2d67802938
19 changed files with 170 additions and 134 deletions

View File

@ -78,13 +78,13 @@
<!-- Tweaks to metrics --> <!-- Tweaks to metrics -->
<rule ref="Generic.Metrics.CyclomaticComplexity"> <rule ref="Generic.Metrics.CyclomaticComplexity">
<properties> <properties>
<property name="complexity" value="30" /> <property name="complexity" value="40" />
<property name="absoluteComplexity" value="100" /> <property name="absoluteComplexity" value="100" />
</properties> </properties>
</rule> </rule>
<rule ref="Generic.Metrics.NestingLevel"> <rule ref="Generic.Metrics.NestingLevel">
<properties> <properties>
<property name="nestingLevel" value="6" /> <property name="nestingLevel" value="9" />
<property name="absoluteNestingLevel" value="50" /> <property name="absoluteNestingLevel" value="50" />
</properties> </properties>
</rule> </rule>

View File

@ -78,13 +78,13 @@
<!-- Tweaks to metrics --> <!-- Tweaks to metrics -->
<rule ref="Generic.Metrics.CyclomaticComplexity"> <rule ref="Generic.Metrics.CyclomaticComplexity">
<properties> <properties>
<property name="complexity" value="30" /> <property name="complexity" value="40" />
<property name="absoluteComplexity" value="100" /> <property name="absoluteComplexity" value="100" />
</properties> </properties>
</rule> </rule>
<rule ref="Generic.Metrics.NestingLevel"> <rule ref="Generic.Metrics.NestingLevel">
<properties> <properties>
<property name="nestingLevel" value="6" /> <property name="nestingLevel" value="9" />
<property name="absoluteNestingLevel" value="50" /> <property name="absoluteNestingLevel" value="50" />
</properties> </properties>
</rule> </rule>

View File

@ -344,7 +344,7 @@ $formfile=new FormFile($db);
$formfile->form_attach_new_file(DOL_URL_ROOT.'/admin/security_other.php',$langs->trans("FormToTestFileUploadForm"),0,0,1); $formfile->form_attach_new_file(DOL_URL_ROOT.'/admin/security_other.php',$langs->trans("FormToTestFileUploadForm"),0,0,1);
$db->close();
llxFooter(); llxFooter();
$db->close();
?> ?>

View File

@ -464,10 +464,11 @@ class ActionComm extends CommonObject
/** /**
* Load all objects with filters * Load all objects with filters
* *
* @param int $socid Filter by thirdparty * @param int $socid Filter by thirdparty
* @param int $fk_element Id of element action is linked to * @param int $fk_element Id of element action is linked to
* @param string $elementtype Type of element action is linked to * @param string $elementtype Type of element action is linked to
* @param filter Other filter * @param string $filter Other filter
* @return int <0 if KO, >0 if OK
*/ */
function getActions($socid=0, $fk_element=0, $elementtype='', $filter='') function getActions($socid=0, $fk_element=0, $elementtype='', $filter='')
{ {
@ -732,7 +733,7 @@ class ActionComm extends CommonObject
* @param string $type 'event' or 'journal' * @param string $type 'event' or 'journal'
* @param int $cachedelay Do not rebuild file if date older than cachedelay seconds * @param int $cachedelay Do not rebuild file if date older than cachedelay seconds
* @param string $filename Force filename * @param string $filename Force filename
* @param filters Array of filters * @param array $filters Array of filters
* @return int <0 if error, nb of events in new file if ok * @return int <0 if error, nb of events in new file if ok
*/ */
function build_exportfile($format,$type,$cachedelay,$filename,$filters) function build_exportfile($format,$type,$cachedelay,$filename,$filters)

View File

@ -47,7 +47,7 @@ class ical
function read_file($file) function read_file($file)
{ {
$this->file = $file; $this->file = $file;
$file_text = join("", file ($file)); //load file $file_text = join("", file($file)); //load file
$file_text = preg_replace("/[\r\n]{1,} ([:;])/","\\1",$file_text); $file_text = preg_replace("/[\r\n]{1,} ([:;])/","\\1",$file_text);
return $file_text; // return all text return $file_text; // return all text
@ -105,7 +105,7 @@ class ical
switch ($text) // search special string switch ($text) // search special string
{ {
case "BEGIN:VTODO": case "BEGIN:VTODO":
$this->todo_count = $this->todo_count+1; // new todo begin $this->todo_count = $this->todo_count+1; // new to do begin
$type = "VTODO"; $type = "VTODO";
break; break;
@ -157,9 +157,10 @@ class ical
/** /**
* Add to $this->ical array one value and key. Type is VTODO, VEVENT, VFREEBUSY, VCALENDAR ... . * Add to $this->ical array one value and key. Type is VTODO, VEVENT, VFREEBUSY, VCALENDAR ... .
* *
* @param string $type Type * @param string $type Type
* @param string $key Key * @param string $key Key
* @param string $value Value * @param string $value Value
* @return void
*/ */
function add_to_array($type, $key, $value) function add_to_array($type, $key, $value)
{ {

View File

@ -798,12 +798,13 @@ llxFooter();
* @param int $year Year * @param int $year Year
* @param int $monthshown Current month shown in calendar view * @param int $monthshown Current month shown in calendar view
* @param string $style Style to use for this day * @param string $style Style to use for this day
* @param array $eventarray Array of events * @param array &$eventarray Array of events
* @param int $maxPrint Nb of actions to show each day on month view (0 means non limit) * @param int $maxPrint Nb of actions to show each day on month view (0 means non limit)
* @param int $maxnbofchar Nb of characters to show for event line * @param int $maxnbofchar Nb of characters to show for event line
* @param string $newparam Parameters on current URL * @param string $newparam Parameters on current URL
* @param int $showinfo Add extended information (used by day view) * @param int $showinfo Add extended information (used by day view)
* @param int $minheight Minimum height for each event. 60px by default. * @param int $minheight Minimum height for each event. 60px by default.
* @return void
*/ */
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxPrint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60) function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxPrint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60)
{ {

View File

@ -48,7 +48,8 @@ $element = GETPOST('element');
/** /**
* * \file htdocs/core/ajax/fileupload.php
* \brief This class is used to manage file upload using ajax
*/ */
class UploadHandler class UploadHandler
{ {
@ -56,6 +57,7 @@ class UploadHandler
private $fk_elment; private $fk_elment;
private $element; private $element;
/** /**
* Constructor * Constructor
* *
@ -107,7 +109,7 @@ class UploadHandler
/** /**
* Enter description here ... * Enter description here ...
* *
* @param string $file_name * @param string $file_name Filename
* @return stdClass|NULL * @return stdClass|NULL
*/ */
private function get_file_object($file_name) private function get_file_object($file_name)
@ -136,18 +138,20 @@ class UploadHandler
/** /**
* Enter description here ... * Enter description here ...
*
* @return void
*/ */
private function get_file_objects() private function get_file_objects()
{ {
return array_values(array_filter(array_map( return array_values(array_filter(array_map(array($this, 'get_file_object'), scandir($this->options['upload_dir']))));
array($this, 'get_file_object'),
scandir($this->options['upload_dir'])
)));
} }
/** /**
* Create thumbs * Create thumbs
* options is array('max_width', 'max_height') *
* @param string $file_name Filename
* @param string $options is array('max_width', 'max_height')
* @return void
*/ */
private function create_scaled_image($file_name, $options) private function create_scaled_image($file_name, $options)
{ {
@ -177,9 +181,9 @@ class UploadHandler
/** /**
* Enter description here ... * Enter description here ...
* *
* @param unknown_type $uploaded_file * @param string $uploaded_file Uploade file
* @param unknown_type $file * @param string $file File
* @param unknown_type $error * @param string $error Error
* @return unknown|string * @return unknown|string
*/ */
private function has_error($uploaded_file, $file, $error) private function has_error($uploaded_file, $file, $error)
@ -216,11 +220,11 @@ class UploadHandler
/** /**
* Enter description here ... * Enter description here ...
* *
* @param unknown_type $uploaded_file * @param string $uploaded_file Uploade file
* @param unknown_type $name * @param string $name Name
* @param unknown_type $size * @param int $size Size
* @param unknown_type $type * @param string $type Type
* @param unknown_type $error * @param string $error Error
* @return stdClass * @return stdClass
*/ */
private function handle_file_upload($uploaded_file, $name, $size, $type, $error) private function handle_file_upload($uploaded_file, $name, $size, $type, $error)
@ -284,7 +288,9 @@ class UploadHandler
} }
/** /**
* Enter description here ... * Output data
*
* @return void
*/ */
public function get() public function get()
{ {
@ -300,7 +306,9 @@ class UploadHandler
} }
/** /**
* Enter description here ... * Output data
*
* @return void
*/ */
public function post() public function post()
{ {
@ -317,24 +325,18 @@ class UploadHandler
foreach ($upload['tmp_name'] as $index => $value) { foreach ($upload['tmp_name'] as $index => $value) {
$info[] = $this->handle_file_upload( $info[] = $this->handle_file_upload(
$upload['tmp_name'][$index], $upload['tmp_name'][$index],
isset($_SERVER['HTTP_X_FILE_NAME']) ? isset($_SERVER['HTTP_X_FILE_NAME']) ? $_SERVER['HTTP_X_FILE_NAME'] : $upload['name'][$index],
$_SERVER['HTTP_X_FILE_NAME'] : $upload['name'][$index], isset($_SERVER['HTTP_X_FILE_SIZE']) ? $_SERVER['HTTP_X_FILE_SIZE'] : $upload['size'][$index],
isset($_SERVER['HTTP_X_FILE_SIZE']) ? isset($_SERVER['HTTP_X_FILE_TYPE']) ? $_SERVER['HTTP_X_FILE_TYPE'] : $upload['type'][$index],
$_SERVER['HTTP_X_FILE_SIZE'] : $upload['size'][$index],
isset($_SERVER['HTTP_X_FILE_TYPE']) ?
$_SERVER['HTTP_X_FILE_TYPE'] : $upload['type'][$index],
$upload['error'][$index] $upload['error'][$index]
); );
} }
} else { } else {
$info[] = $this->handle_file_upload( $info[] = $this->handle_file_upload(
$upload['tmp_name'], $upload['tmp_name'],
isset($_SERVER['HTTP_X_FILE_NAME']) ? isset($_SERVER['HTTP_X_FILE_NAME']) ? $_SERVER['HTTP_X_FILE_NAME'] : $upload['name'],
$_SERVER['HTTP_X_FILE_NAME'] : $upload['name'], isset($_SERVER['HTTP_X_FILE_SIZE']) ? $_SERVER['HTTP_X_FILE_SIZE'] : $upload['size'],
isset($_SERVER['HTTP_X_FILE_SIZE']) ? isset($_SERVER['HTTP_X_FILE_TYPE']) ? $_SERVER['HTTP_X_FILE_TYPE'] : $upload['type'],
$_SERVER['HTTP_X_FILE_SIZE'] : $upload['size'],
isset($_SERVER['HTTP_X_FILE_TYPE']) ?
$_SERVER['HTTP_X_FILE_TYPE'] : $upload['type'],
$upload['error'] $upload['error']
); );
} }
@ -349,7 +351,9 @@ class UploadHandler
} }
/** /**
* Enter description here ... * Delete uploaded file
*
* @return void
*/ */
public function delete() public function delete()
{ {

View File

@ -116,7 +116,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
$row_array['value'] = $row['town']; $row_array['value'] = $row['town'];
$row_array['zipcode'] = $row['zip']; $row_array['zipcode'] = $row['zip'];
} }
$row_array['departement_id'] = $row['fk_county']; // TODO deprecated $row_array['departement_id'] = $row['fk_county']; // deprecated
$row_array['selectcountry_id'] = $row['fk_country']; $row_array['selectcountry_id'] = $row['fk_country'];
$row_array['state_id'] = $row['fk_county']; $row_array['state_id'] = $row['fk_county'];

View File

@ -58,73 +58,81 @@ class FormFile
* @param int $sectionid If upload must be done inside a particular ECM section * @param int $sectionid If upload must be done inside a particular ECM section
* @param int $perm Value of permission to allow upload * @param int $perm Value of permission to allow upload
* @param int $size Length of input file area * @param int $size Length of input file area
* @param Object $object Object to use (when attachment is done on an element)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50) function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='')
{ {
global $conf,$langs; global $conf,$langs;
$maxlength=$size; if ($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)
print "\n\n<!-- Start form attach new file -->\n";
if (empty($title)) $title=$langs->trans("AttachANewFile");
if ($title != 'none') print_titre($title);
print '<form name="userfile" action="'.$url.'" enctype="multipart/form-data" method="POST">';
print '<input type="hidden" name="section" value="'.$sectionid.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table width="100%" class="nobordernopadding">';
print '<tr><td width="50%" valign="top">';
$max=$conf->global->MAIN_UPLOAD_DOC; // En Kb
$maxphp=@ini_get('upload_max_filesize'); // En inconnu
if (preg_match('/m$/i',$maxphp)) $maxphp=$maxphp*1024;
if (preg_match('/k$/i',$maxphp)) $maxphp=$maxphp;
// Now $max and $maxphp are in Kb
if ($maxphp > 0) $max=min($max,$maxphp);
if ($max > 0)
{ {
print '<input type="hidden" name="max_file_size" value="'.($max*1024).'">'; return $this->_form_ajaxfileupload($object);
}
print '<input class="flat" type="file" name="userfile" size="'.$maxlength.'"';
print (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm)?' disabled="disabled"':'');
print '>';
print ' &nbsp; ';
print '<input type="submit" class="button" name="sendit" value="'.$langs->trans("Upload").'"';
print (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm)?' disabled="disabled"':'');
print '>';
if ($addcancel)
{
print ' &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
}
if (! empty($conf->global->MAIN_UPLOAD_DOC))
{
if ($perm)
{
print ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb");
print ' '.info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
print ')';
}
} }
else else
{ {
print ' ('.$langs->trans("UploadDisabled").')'; $maxlength=$size;
print "\n\n<!-- Start form attach new file -->\n";
if (empty($title)) $title=$langs->trans("AttachANewFile");
if ($title != 'none') print_titre($title);
print '<form name="userfile" action="'.$url.'" enctype="multipart/form-data" method="POST">';
print '<input type="hidden" name="section" value="'.$sectionid.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table width="100%" class="nobordernopadding">';
print '<tr><td width="50%" valign="top">';
$max=$conf->global->MAIN_UPLOAD_DOC; // En Kb
$maxphp=@ini_get('upload_max_filesize'); // En inconnu
if (preg_match('/m$/i',$maxphp)) $maxphp=$maxphp*1024;
if (preg_match('/k$/i',$maxphp)) $maxphp=$maxphp;
// Now $max and $maxphp are in Kb
if ($maxphp > 0) $max=min($max,$maxphp);
if ($max > 0)
{
print '<input type="hidden" name="max_file_size" value="'.($max*1024).'">';
}
print '<input class="flat" type="file" name="userfile" size="'.$maxlength.'"';
print (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm)?' disabled="disabled"':'');
print '>';
print ' &nbsp; ';
print '<input type="submit" class="button" name="sendit" value="'.$langs->trans("Upload").'"';
print (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm)?' disabled="disabled"':'');
print '>';
if ($addcancel)
{
print ' &nbsp; ';
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
}
if (! empty($conf->global->MAIN_UPLOAD_DOC))
{
if ($perm)
{
print ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb");
print ' '.info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
print ')';
}
}
else
{
print ' ('.$langs->trans("UploadDisabled").')';
}
print "</td></tr>";
print "</table>";
print '</form>';
if (empty($sectionid)) print '<br>';
print "\n<!-- End form attach new file -->\n\n";
return 1;
} }
print "</td></tr>";
print "</table>";
print '</form>';
if (empty($sectionid)) print '<br>';
print "\n<!-- End form attach new file -->\n\n";
return 1;
} }
/** /**
@ -723,12 +731,13 @@ class FormFile
} }
/** /**
* Show form to upload a new file with jquery fileupload * Show form to upload a new file with jquery fileupload.
* This form use the fileupload.php file.
* *
* @param Object $object Object to use * @param Object $object Object to use
* @return void * @return void
*/ */
function form_ajaxfileupload($object) private function _form_ajaxfileupload($object)
{ {
global $langs; global $langs;

View File

@ -158,7 +158,7 @@ if ($_GET["action"] == 'create')
// Label // Label
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" size="40" maxlength="32" value="'.$ecmdir->label.'"></td></tr>'."\n"; print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input name="label" size="40" maxlength="32" value="'.$ecmdir->label.'"></td></tr>'."\n";
print '<tr><td>'.$langs->trans ("AddIn").'</td><td>'; print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
print $formecm->select_all_sections(! empty($_GET["catParent"])?$_GET["catParent"]:$ecmdir->fk_parent,'catParent'); print $formecm->select_all_sections(! empty($_GET["catParent"])?$_GET["catParent"]:$ecmdir->fk_parent,'catParent');
print '</td></tr>'."\n"; print '</td></tr>'."\n";

View File

@ -51,7 +51,7 @@ class Expedition extends CommonObject
var $origin; var $origin;
var $origin_id; var $origin_id;
var $lines=array(); var $lines=array();
var $expedition_method_id; // TODO deprecated var $expedition_method_id; // deprecated
var $shipping_method_id; var $shipping_method_id;
var $tracking_number; var $tracking_number;
var $tracking_url; var $tracking_url;

View File

@ -69,11 +69,12 @@ class Export
{ {
global $langs,$conf,$mysoc; global $langs,$conf,$mysoc;
dol_syslog("Export::load_arrays user=".$user->id." filter=".$filter); dol_syslog(get_class($this)."::load_arrays user=".$user->id." filter=".$filter);
$var=true; $var=true;
$i=0; $i=0;
// Define list of modules directories into modulesdir
foreach ($conf->file->dol_document_root as $type => $dirroot) foreach ($conf->file->dol_document_root as $type => $dirroot)
{ {
$modulesdir[] = $dirroot . "/core/modules/"; $modulesdir[] = $dirroot . "/core/modules/";
@ -188,7 +189,7 @@ class Export
$this->array_export_sql_end[$i]=$module->export_sql_end[$r]; $this->array_export_sql_end[$i]=$module->export_sql_end[$r];
//$this->array_export_sql[$i]=$module->export_sql[$r]; //$this->array_export_sql[$i]=$module->export_sql[$r];
dol_syslog("Export loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".count($module->export_fields_code[$r])); dol_syslog(get_class($this)."::load_arrays loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".count($module->export_fields_code[$r]));
$i++; $i++;
// } // }
} }

View File

@ -800,8 +800,9 @@ llxFooter();
/** /**
* Return table name of an alias. For this, we look for the "tablename as alias" in sql string. * Return table name of an alias. For this, we look for the "tablename as alias" in sql string.
* *
* @param code Alias.Fieldname * @param string $code Alias.Fieldname
* @param sqlmaxforexport SQL request to parse * @param string $sqlmaxforexport SQL request to parse
* @return string Table name of field
*/ */
function getablenamefromfield($code,$sqlmaxforexport) function getablenamefromfield($code,$sqlmaxforexport)
{ {

View File

@ -207,9 +207,9 @@ class Fichinter extends CommonObject
/** /**
* Fetch a intervention * Fetch a intervention
* *
* @param int $id Id of intervention * @param int $rowid Id of intervention
* @param string $ref Ref of intervention * @param string $ref Ref of intervention
* @return int <0 if ko, >0 if ok * @return int <0 if KO, >0 if OK
*/ */
function fetch($rowid,$ref='') function fetch($rowid,$ref='')
{ {
@ -389,6 +389,7 @@ class Fichinter extends CommonObject
/** /**
* Returns the label status * Returns the label status
*
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* @return string Label * @return string Label
*/ */
@ -445,8 +446,8 @@ class Fichinter extends CommonObject
/** /**
* Return clicable name (with picto eventually) * Return clicable name (with picto eventually)
* *
* @param int withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only * @param int $withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only
* @return string String with URL * @return string String with URL
*/ */
function getNomUrl($withpicto=0) function getNomUrl($withpicto=0)
{ {
@ -520,7 +521,8 @@ class Fichinter extends CommonObject
/** /**
* Information sur l'objet fiche intervention * Information sur l'objet fiche intervention
* *
* @param int $id id de la fiche d'intervention * @param int $id Id de la fiche d'intervention
* @return void
*/ */
function info($id) function info($id)
{ {
@ -570,7 +572,8 @@ class Fichinter extends CommonObject
/** /**
* Delete intervetnion * Delete intervetnion
* *
* @param User $user Object user who deletes * @param User $user Object user who delete
* @return int <0 if KO, >0 if OK
*/ */
function delete($user) function delete($user)
{ {
@ -875,8 +878,9 @@ class FichinterLigne
/** /**
* Constructeur d'objets ligne d'intervention * Constructor
* @param DoliDB $DB handler d'acces base de donnee *
* @param DoliDB $DB Database handler
*/ */
function FichinterLigne($DB) function FichinterLigne($DB)
{ {
@ -886,7 +890,8 @@ class FichinterLigne
/** /**
* Retrieve the line of intervention * Retrieve the line of intervention
* *
* @param int $rowid line id * @param int $rowid Line id
* @return int <0 if KO, >0 if OK
*/ */
function fetch($rowid) function fetch($rowid)
{ {

View File

@ -85,7 +85,7 @@ if ($search_desc) $sql .= " AND (f.description like '%".$db->escape($search_d
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($socid) $sql.= " AND s.rowid = " . $socid; if ($socid) $sql.= " AND s.rowid = " . $socid;
$sql.= " ORDER BY ".$sortfield." ".$sortorder; $sql.= " ORDER BY ".$sortfield." ".$sortorder;
$sql.= $db->plimit($limit + 1 ,$offset); $sql.= $db->plimit($limit+1, $offset);
$result=$db->query($sql); $result=$db->query($sql);
if ($result) if ($result)

View File

@ -36,7 +36,17 @@ define("NOLOGIN",1); // This means this output page does not require to be logg
define("NOCSRFCHECK",1); // We accept to go on this page from external web site. define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
// C'est un wrapper, donc header vierge // C'est un wrapper, donc header vierge
/**
* Header function
*
* @return void
*/
function llxHeaderVierge() { print '<html><title>Export agenda cal</title><body>'; } function llxHeaderVierge() { print '<html><title>Export agenda cal</title><body>'; }
/**
* Footer function
*
* @return void
*/
function llxFooterVierge() { print '</body></html>'; } function llxFooterVierge() { print '</body></html>'; }
require("../../main.inc.php"); require("../../main.inc.php");

View File

@ -340,8 +340,8 @@ llxFooterVierge();
/** /**
* Show header for demo * Show header for demo
* *
* @param string $title * @param string $title Title
* @param string $head * @param string $head Head string
* @return void * @return void
*/ */
function llxHeaderVierge($title, $head = "") function llxHeaderVierge($title, $head = "")

View File

@ -25,7 +25,17 @@ define("NOLOGIN",1); // This means this output page does not require to be logg
define("NOCSRFCHECK",1); // We accept to go on this page from external web site. define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
// C'est un wrapper, donc header vierge // C'est un wrapper, donc header vierge
/**
* Header function
*
* @return void
*/
function llxHeaderVierge() { print '<html><title>Export agenda cal</title><body>'; } function llxHeaderVierge() { print '<html><title>Export agenda cal</title><body>'; }
/**
* Header function
*
* @return void
*/
function llxFooterVierge() { print '</body></html>'; } function llxFooterVierge() { print '</body></html>'; }
require("../../main.inc.php"); require("../../main.inc.php");

View File

@ -211,14 +211,7 @@ if ($socid > 0)
$formfile=new FormFile($db); $formfile=new FormFile($db);
// Show upload form // Show upload form
if ($conf->global->MAIN_USE_JQUERY_FILEUPLOAD) $formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?socid='.$socid,'',0,0,$user->rights->societe->creer,50,$object);
{
$formfile->form_ajaxfileupload($object);
}
else
{
$formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?socid='.$socid,'',0,0,$user->rights->societe->creer);
}
// List of document // List of document
$param='&socid='.$object->id; $param='&socid='.$object->id;