Merge remote-tracking branch 'upstream/develop' into trimtrailing2
This commit is contained in:
commit
7b2bfb28c2
@ -303,9 +303,11 @@ if ($object->fetch($id) >= 0)
|
||||
// Sort $modulenames
|
||||
sort($modulenames);
|
||||
|
||||
$var = true;
|
||||
|
||||
// Loop on each submodule
|
||||
foreach($modulenames as $modulename)
|
||||
{
|
||||
foreach($modulenames as $modulename)
|
||||
{
|
||||
// Loading Class
|
||||
$file = $dir.$modulename.".modules.php";
|
||||
$classname = "mailing_".$modulename;
|
||||
@ -328,14 +330,16 @@ if ($object->fetch($id) >= 0)
|
||||
// Si le module mailing est qualifie
|
||||
if ($qualified)
|
||||
{
|
||||
$var = ! $var;
|
||||
|
||||
if ($allowaddtarget)
|
||||
{
|
||||
print '<form class="oddeven tagtr" name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
|
||||
print '<form '.$bctag[$var].' name="'.$modulename.'" action="'.$_SERVER['PHP_SELF'].'?action=add&id='.$object->id.'&module='.$modulename.'" method="POST" enctype="multipart/form-data">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div class="oddeven tagtr">';
|
||||
print '<div '.$bctag[$var].'>';
|
||||
}
|
||||
|
||||
print '<div class="tagtd">';
|
||||
|
||||
@ -3705,7 +3705,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$discount = new DiscountAbsolute($db);
|
||||
$result = $discount->fetch(0, $object->id);
|
||||
if ($result > 0){
|
||||
print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(), $discount->getNomUrl(1, 'discount')).'<br>';
|
||||
print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'<br>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@ -158,8 +158,8 @@ print '<!-- ajaxdirpreview type='.$type.' -->'."\n";
|
||||
//print '<!-- Page called with mode='.dol_escape_htmltag(isset($mode)?$mode:'').' type='.dol_escape_htmltag($type).' module='.dol_escape_htmltag($module).' url='.dol_escape_htmltag($url).' '.dol_escape_htmltag($_SERVER["PHP_SELF"]).'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]).' -->'."\n";
|
||||
|
||||
$param=($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:'');
|
||||
if (! empty($website)) $param.='&website='.$website;
|
||||
if (! empty($pageid)) $param.='&pageid='.$pageid;
|
||||
if (! empty($websitekey)) $param.='&website='.$websitekey;
|
||||
if (! empty($pageid)) $param.='&pageid='.$pageid;
|
||||
|
||||
|
||||
// Dir scan
|
||||
@ -234,7 +234,7 @@ if ($type == 'directory')
|
||||
$param.='&file_manager=1';
|
||||
if (!preg_match('/website=/',$param)) $param.='&website='.urlencode(GETPOST('website','alpha'));
|
||||
if (!preg_match('/pageid=/',$param)) $param.='&pageid='.urlencode(GETPOST('pageid','int'));
|
||||
//if (!preg_match('/backtopage=/',$param)) $param.='&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$website.'&pageid='.$pageid);
|
||||
//if (!preg_match('/backtopage=/',$param)) $param.='&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -315,7 +315,7 @@ if ($useajax || $action == 'delete')
|
||||
$formquestion['section_id']=array('type'=>'hidden','value'=>$section_id,'name'=>'section_id'); // We must always put field, even if empty because it is fille by javascript later
|
||||
$formquestion['section_dir']=array('type'=>'hidden','value'=>$section_dir,'name'=>'section_dir'); // We must always put field, even if empty because it is fille by javascript later
|
||||
if (! empty($action) && $action == 'file_manager') $formquestion['file_manager']=array('type'=>'hidden','value'=>1,'name'=>'file_manager');
|
||||
if (! empty($website)) $formquestion['website']=array('type'=>'hidden','value'=>$website,'name'=>'website');
|
||||
if (! empty($websitekey)) $formquestion['website']=array('type'=>'hidden','value'=>$websitekey,'name'=>'website');
|
||||
if (! empty($pageid) && $pageid > 0) $formquestion['pageid']=array('type'=>'hidden','value'=>$pageid,'name'=>'pageid');
|
||||
|
||||
print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0));
|
||||
|
||||
@ -201,7 +201,7 @@ if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE
|
||||
// Edit link
|
||||
print '<td align="right" width="18"><a href="';
|
||||
print DOL_URL_ROOT.'/ecm/dir_card.php?module='.urlencode($modulepart).'§ion='.$val['id'].'&relativedir='.urlencode($val['fullrelativename']);
|
||||
print '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$website.'&pageid='.$pageid);
|
||||
print '&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid);
|
||||
print '">'.img_edit($langs->trans("Edit").' - '.$langs->trans("View"), 0, 'class="valignmiddle opacitymedium"').'</a></td>';
|
||||
|
||||
// Add link
|
||||
|
||||
@ -1323,8 +1323,10 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
$status = isset($this->cronjobs[$key]['status'])?$this->cronjobs[$key]['status']:'';
|
||||
$priority = isset($this->cronjobs[$key]['priority'])?$this->cronjobs[$key]['priority']:'';
|
||||
$test = isset($this->cronjobs[$key]['test'])?$this->cronjobs[$key]['test']:''; // Line must be visible
|
||||
$datestart = isset($this->cronjobs[$key]['datestart'])?$this->cronjobs[$key]['datestart']:'';
|
||||
$dateend = isset($this->cronjobs[$key]['dateend'])?$this->cronjobs[$key]['dateend']:'';
|
||||
|
||||
// Search if boxes def already present
|
||||
// Search if cron entry already present
|
||||
$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."cronjob";
|
||||
$sql.= " WHERE module_name = '".$this->db->escape($this->rights_class)."'";
|
||||
if ($class) $sql.= " AND classesname = '".$this->db->escape($class)."'";
|
||||
@ -1345,7 +1347,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
|
||||
if (! $err)
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datestart, label, jobtype, classesname, objectname, methodename, command, params, note,";
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."cronjob (module_name, datec, datestart, dateend, label, jobtype, classesname, objectname, methodename, command, params, note,";
|
||||
if(is_int($frequency)){ $sql.= ' frequency,'; }
|
||||
if(is_int($unitfrequency)){ $sql.= ' unitfrequency,'; }
|
||||
if(is_int($priority)){ $sql.= ' priority,'; }
|
||||
@ -1354,7 +1356,8 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
$sql.= " VALUES (";
|
||||
$sql.= "'".$this->db->escape($this->rights_class)."', ";
|
||||
$sql.= "'".$this->db->idate($now)."', ";
|
||||
$sql.= "'".$this->db->idate($now)."', ";
|
||||
$sql.= ($datestart ? "'".$this->db->idate($datestart)."'" : "NULL").", ";
|
||||
$sql.= ($dateend ? "'".$this->db->idate($dateend)."'" : "NULL").", ";
|
||||
$sql.= "'".$this->db->escape($label)."', ";
|
||||
$sql.= "'".$this->db->escape($jobtype)."', ";
|
||||
$sql.= ($class?"'".$this->db->escape($class)."'":"null").",";
|
||||
@ -1389,7 +1392,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
|
||||
// else box already registered into database
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
$err++;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ print '<div class="inline-block toolbarbutton centpercent">';
|
||||
|
||||
if ($permtoadd)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php?action=create&module='.urlencode($module).($website?'&website='.$website:'').($pageid?'&pageid='.$pageid:'').'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$website.'&pageid='.$pageid).'" class="inline-block valignmiddle toolbarbutton" title="'.dol_escape_htmltag($langs->trans('ECMAddSection')).'">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/ecm/dir_add_card.php?action=create&module='.urlencode($module).($websitekey?'&website='.$websitekey:'').($pageid?'&pageid='.$pageid:'').'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid).'" class="inline-block valignmiddle toolbarbutton" title="'.dol_escape_htmltag($langs->trans('ECMAddSection')).'">';
|
||||
print '<img class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/folder-new.png">';
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user