forked from Wavyzz/dolibarr
clean indent
This commit is contained in:
@@ -185,16 +185,15 @@
|
||||
|
||||
<!-- Check indent are done with spaces and with correct number -->
|
||||
<!-- Disabled as this does not support tab -->
|
||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent.Incorrect" /> -->
|
||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||
<!-- TODO Enable this
|
||||
<arg name="tab-width" value="4"/>
|
||||
<!-- <arg name="tab-width" value="4"/> -->
|
||||
<rule ref="Generic.WhiteSpace.ScopeIndent">
|
||||
<properties>
|
||||
<property name="indent" value="4"/>
|
||||
<property name="tabIndent" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
-->
|
||||
|
||||
<rule ref="Squiz.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||
|
||||
|
||||
@@ -180,8 +180,6 @@ if ($massaction == 'ventil') {
|
||||
}
|
||||
$msg.='</div>';
|
||||
$msg.= '<div>' . $langs->trans("EndProcessing") . '</div>';
|
||||
//} else {
|
||||
// setEventMessages($langs->trans("NoRecordSelected"), null, 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -161,8 +161,6 @@ if ($massaction == 'ventil') {
|
||||
}
|
||||
$msg.='</div>';
|
||||
$msg.= '<div>' . $langs->trans("EndProcessing") . '</div>';
|
||||
//} else {
|
||||
// setEventMessages($langs->trans("NoRecordSelected"), null, 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +294,6 @@ if ($action == 'writebookkeeping') {
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->date_lim_reglement = $val["datereg"];
|
||||
@@ -341,7 +340,6 @@ if ($action == 'writebookkeeping') {
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +347,6 @@ if ($action == 'writebookkeeping') {
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
// get compte id and label
|
||||
if ($accountingaccount->fetch(null, $k, true)) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
@@ -396,7 +393,6 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -865,7 +861,6 @@ if (empty($action) || $action == 'view') {
|
||||
|
||||
// Third party
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<!-- Thirdparty -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
@@ -892,7 +887,6 @@ if (empty($action) || $action == 'view') {
|
||||
print '<td class="right nowraponall">'. ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
@@ -900,7 +894,6 @@ if (empty($action) || $action == 'view') {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<!-- Product -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
@@ -923,7 +916,6 @@ if (empty($action) || $action == 'view') {
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
|
||||
// VAT
|
||||
|
||||
@@ -305,7 +305,6 @@ if ($action == 'writebookkeeping') {
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ($tabttc[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->date_lim_reglement = $val["datereg"];
|
||||
@@ -352,7 +351,6 @@ if ($action == 'writebookkeeping') {
|
||||
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,7 +358,6 @@ if ($action == 'writebookkeeping') {
|
||||
if (! $errorforline)
|
||||
{
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
//if ($mt) {
|
||||
// get compte id and label
|
||||
if ($accountingaccount->fetch(null, $k, true)) {
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
@@ -407,7 +404,6 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -801,7 +797,6 @@ if (empty($action) || $action == 'view') {
|
||||
// Third party
|
||||
foreach ($tabttc[$key] as $k => $mt)
|
||||
{
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<!-- Thirdparty -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
@@ -828,7 +823,6 @@ if (empty($action) || $action == 'view') {
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
@@ -837,7 +831,6 @@ if (empty($action) || $action == 'view') {
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k, true);
|
||||
|
||||
//if ($mt) {
|
||||
print '<tr class="oddeven">';
|
||||
print "<!-- Product -->";
|
||||
print "<td>" . $date . "</td>";
|
||||
@@ -860,7 +853,6 @@ if (empty($action) || $action == 'view') {
|
||||
print '<td class="right nowraponall">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
|
||||
print '<td class="right nowraponall">' . ($mt >= 0 ? price($mt) : '') . "</td>";
|
||||
print "</tr>";
|
||||
//}
|
||||
}
|
||||
|
||||
// VAT
|
||||
|
||||
@@ -184,8 +184,6 @@ if ($massaction == 'ventil') {
|
||||
}
|
||||
$msg.='</div>';
|
||||
$msg.= '<div>' . $langs->trans("EndProcessing") . '</div>';
|
||||
//} else {
|
||||
// setEventMessages($langs->trans("NoRecordSelected"), null, 'warnings');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,17 +26,12 @@ if (empty($conf) || ! is_object($conf))
|
||||
|
||||
$contact = $GLOBALS['objcanvas']->control->object;
|
||||
|
||||
?>
|
||||
echo "<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->\n";
|
||||
echo $this->control->tpl['showhead'];
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->
|
||||
<?php echo $this->control->tpl['showhead']; ?>
|
||||
|
||||
<?php
|
||||
dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
|
||||
?>
|
||||
|
||||
<?php if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user']; ?>
|
||||
<?php if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
|
||||
if (! empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user'];
|
||||
if (! empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
|
||||
|
||||
<table class="border allwidth">
|
||||
|
||||
@@ -121,29 +116,28 @@ dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors'
|
||||
|
||||
</table>
|
||||
|
||||
<?php echo $this->control->tpl['showend']; ?>
|
||||
<?php echo $this->control->tpl['showend'];
|
||||
|
||||
<?php if (empty($user->societe_id)) { ?>
|
||||
<div class="tabsAction">
|
||||
if (empty($user->societe_id)) {
|
||||
echo '<div class="tabsAction">';
|
||||
|
||||
<?php if ($user->rights->adherent->creer) { ?>
|
||||
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas; ?>"><?php echo $langs->trans('Modify'); ?></a>
|
||||
<?php } ?>
|
||||
if ($user->rights->adherent->creer) {
|
||||
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
|
||||
}
|
||||
|
||||
<?php if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) { ?>
|
||||
<a class="butAction" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&canvas='.$canvas; ?>"><?php echo $langs->trans("CreateDolibarrLogin"); ?></a>
|
||||
<?php } ?>
|
||||
if (! $this->control->tpl['user_id'] && $user->rights->user->user->creer) {
|
||||
echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
|
||||
}
|
||||
|
||||
<?php if ($user->rights->adherent->supprimer) { ?>
|
||||
<a class="butActionDelete" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas; ?>"><?php echo $langs->trans('Delete'); ?></a>
|
||||
<?php } ?>
|
||||
if ($user->rights->adherent->supprimer) {
|
||||
echo '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&canvas='.$canvas.'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
|
||||
</div><br>
|
||||
<?php }
|
||||
echo '</div><br>';
|
||||
}
|
||||
|
||||
echo $this->control->tpl['actionstodo'];
|
||||
|
||||
echo $this->control->tpl['actionsdone'];
|
||||
?>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
echo "<!-- END PHP TEMPLATE -->\n";
|
||||
|
||||
@@ -24,11 +24,7 @@ if (empty($conf) || ! is_object($conf))
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
|
||||
<?php
|
||||
echo "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
|
||||
global $user;
|
||||
|
||||
@@ -39,22 +35,20 @@ $langs->load("members");
|
||||
$total=0;
|
||||
foreach($linkedObjectBlock as $key => $objectlink)
|
||||
{
|
||||
?>
|
||||
<tr class="oddeven" >
|
||||
<td><?php echo $langs->trans("Subscription"); ?></td>
|
||||
<td><?php echo $objectlink->getNomUrl(1); ?></td>
|
||||
<td class="center"></td>
|
||||
<td class="center"><?php echo dol_print_date($objectlink->dateh, 'day'); ?></td>
|
||||
<td class="right"><?php
|
||||
echo '<tr class="oddeven">';
|
||||
echo '<td>'.$langs->trans("Subscription").'</td>';
|
||||
echo '<td>'.$objectlink->getNomUrl(1).'</td>';
|
||||
echo '<td class="center"></td>';
|
||||
echo '<td class="center">'.dol_print_date($objectlink->dateh, 'day').'</td>';
|
||||
echo '<td class="right">';
|
||||
if ($user->rights->adherent->lire) {
|
||||
$total = $total + $objectlink->amount;
|
||||
echo price($objectlink->amount);
|
||||
} ?></td>
|
||||
<td class="right"></td>
|
||||
<td class="right"><a href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
echo '</td>';
|
||||
echo '<td class="right"></td>';
|
||||
echo '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
echo "<!-- END PHP TEMPLATE -->\n";
|
||||
|
||||
@@ -571,7 +571,7 @@ if ($id == 11)
|
||||
'commande' => $langs->trans('Order'),
|
||||
'facture' => $langs->trans('Bill'),
|
||||
'fichinter' => $langs->trans('InterventionCard'),
|
||||
'contrat' => $langs->trans('Contract')
|
||||
'contrat' => $langs->trans('Contract'),
|
||||
);
|
||||
if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty');
|
||||
|
||||
@@ -636,8 +636,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy','tracking')) // Fields that are not mandatory
|
||||
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
|
||||
)
|
||||
)
|
||||
{
|
||||
) {
|
||||
$ok=0;
|
||||
$fieldnamekey=$listfield[$f];
|
||||
// We take translate key of field
|
||||
|
||||
@@ -423,17 +423,20 @@ class PrestaShopWebservice
|
||||
*/
|
||||
public function delete($options)
|
||||
{
|
||||
if (isset($options['url']))
|
||||
if (isset($options['url'])) {
|
||||
$url = $options['url'];
|
||||
elseif (isset($options['resource']) && isset($options['id']))
|
||||
} elseif (isset($options['resource']) && isset($options['id'])) {
|
||||
if (is_array($options['id']))
|
||||
$url = $this->url.'/api/'.$options['resource'].'/?id=['.implode(',', $options['id']).']';
|
||||
else
|
||||
$url = $this->url.'/api/'.$options['resource'].'/'.$options['id'];
|
||||
if (isset($options['id_shop']))
|
||||
}
|
||||
if (isset($options['id_shop'])) {
|
||||
$url .= '&id_shop='.$options['id_shop'];
|
||||
if (isset($options['id_group_shop']))
|
||||
}
|
||||
if (isset($options['id_group_shop'])) {
|
||||
$url .= '&id_group_shop='.$options['id_group_shop'];
|
||||
}
|
||||
$request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'DELETE'));
|
||||
self::checkStatusCode($request['status_code']);// check the response validity
|
||||
return true;
|
||||
|
||||
@@ -32,8 +32,8 @@ class Dolistore
|
||||
* beginning of pagination
|
||||
* @var int
|
||||
*/
|
||||
|
||||
public $start;
|
||||
|
||||
/**
|
||||
* end of pagination
|
||||
* @var int
|
||||
|
||||
@@ -207,8 +207,7 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
|
||||
}
|
||||
} elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') {
|
||||
$val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$conf->entity);
|
||||
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
@@ -221,8 +220,7 @@ $res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ?
|
||||
}
|
||||
} elseif ($action == 'set_FICHINTER_WITHOUT_DURATION') {
|
||||
$val = GETPOST('FICHINTER_WITHOUT_DURATION', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$conf->entity);
|
||||
$res = dolibarr_set_const($db, "FICHINTER_WITHOUT_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
@@ -235,8 +233,7 @@ $res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ?
|
||||
}
|
||||
} elseif ($action == 'set_FICHINTER_DATE_WITHOUT_HOUR') {
|
||||
$val = GETPOST('FICHINTER_DATE_WITHOUT_HOUR', 'alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||
$conf->entity);
|
||||
$res = dolibarr_set_const($db, "FICHINTER_DATE_WITHOUT_HOUR", ($val == 'on' ? 1 : 0), 'bool', 0, '', $conf->entity);
|
||||
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
|
||||
@@ -300,8 +300,14 @@ print '</div>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL < 2) {
|
||||
dol_fiche_end();
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* Documents models for Holidays
|
||||
*/
|
||||
@@ -518,7 +524,7 @@ print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@@ -926,11 +926,9 @@ if ($mode == 'marketplace')
|
||||
<?php
|
||||
print $previouslink;
|
||||
print $nextlink;
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
|
||||
<?php
|
||||
|
||||
print '</div></div>';
|
||||
print '<div class="clearboth"></div>';
|
||||
|
||||
@@ -383,9 +383,12 @@ print '</table>';
|
||||
print '<br>';
|
||||
|
||||
$virtualdiffersfromphysical=0;
|
||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
||||
if (
|
||||
! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
||||
|| ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)
|
||||
) $virtualdiffersfromphysical=1; // According to increase/decrease stock options, virtual and physical stock may differs.
|
||||
) {
|
||||
$virtualdiffersfromphysical=1; // According to increase/decrease stock options, virtual and physical stock may differs.
|
||||
}
|
||||
|
||||
if ($virtualdiffersfromphysical)
|
||||
{
|
||||
@@ -504,7 +507,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
print $form->selectarray("INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT", $arrval, $conf->global->INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT);
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
@@ -512,8 +514,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
If not used by a module, I still need to understand in which case user may need this now we can set rule on product page.
|
||||
if ($conf->global->PRODUIT_SOUSPRODUITS)
|
||||
{
|
||||
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("IndependantSubProductStock").'</td>';
|
||||
print '<td class="right">';
|
||||
|
||||
@@ -112,12 +112,14 @@ jQuery(document).ready(function() {
|
||||
});
|
||||
|
||||
<?php
|
||||
if (in_array($type, array('mysql', 'mysqli'))) print 'jQuery("#radio_dump_mysql").click();';
|
||||
if (in_array($type, array('pgsql'))) print 'jQuery("#radio_dump_postgresql").click();';
|
||||
?>
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print 'jQuery("#radio_dump_mysql").click();';
|
||||
}
|
||||
if (in_array($type, array('pgsql'))) {
|
||||
print 'jQuery("#radio_dump_postgresql").click();';
|
||||
}
|
||||
print "});\n";
|
||||
print "</script>\n";
|
||||
|
||||
print load_fiche_titre($langs->trans("Backup"), '', 'title_setup');
|
||||
//print_barre_liste($langs->trans("Backup"), '', '', '', '', '', $langs->trans("BackupDesc",DOL_DATA_ROOT), 0, 0, 'title_setup');
|
||||
@@ -127,24 +129,17 @@ print $langs->trans("BackupDesc", DOL_DATA_ROOT);
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
?>
|
||||
print "<!-- Dump of a server -->\n";
|
||||
print '<form method="post" action="export.php" name="dump">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
print '<input type="hidden" name="export_type" value="server" />';
|
||||
print '<fieldset id="fieldsetexport"><legend class="legendforfieldsetstep" style="font-size: 3em">1</legend>';
|
||||
|
||||
<!-- Dump of a server -->
|
||||
<form method="post" action="export.php" name="dump"><input type="hidden"
|
||||
name="token" value="<?php echo $_SESSION['newtoken']; ?>" /> <input
|
||||
type="hidden" name="export_type" value="server" />
|
||||
|
||||
<fieldset id="fieldsetexport"><legend class="legendforfieldsetstep" style="font-size: 3em">1</legend>
|
||||
|
||||
<?php
|
||||
print $langs->trans("BackupDesc3", $dolibarr_main_db_name).'<br>';
|
||||
//print $langs->trans("BackupDescY").'<br>';
|
||||
print '<br>';
|
||||
?>
|
||||
|
||||
<div id="backupdatabaseleft" class="fichehalfleft" >
|
||||
|
||||
<?php
|
||||
print '<div id="backupdatabaseleft" class="fichehalfleft" >';
|
||||
|
||||
print load_fiche_titre($title?$title:$langs->trans("BackupDumpWizard"));
|
||||
|
||||
@@ -155,54 +150,40 @@ print $langs->trans("DatabaseName").' : <b>'.$dolibarr_main_db_name.'</b><br>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '<tr '.$bc[false].'><td style="padding-left: 8px">';
|
||||
?>
|
||||
<table class="centpercent">
|
||||
<tr>
|
||||
<td class="tdtop">
|
||||
print '<table class="centpercent">';
|
||||
print '<tr>';
|
||||
print '<td class="tdtop">';
|
||||
|
||||
<div id="div_container_exportoptions">
|
||||
<fieldset id="exportoptions"><legend><?php echo $langs->trans("ExportMethod"); ?></legend>
|
||||
<?php
|
||||
if (in_array($type, array('mysql', 'mysqli')))
|
||||
{
|
||||
?>
|
||||
<div class="formelementrow"><input type="radio" name="what" value="mysql" id="radio_dump_mysql" />
|
||||
<label for="radio_dump_mysql">MySQL Dump (mysqldump)</label>
|
||||
</div>
|
||||
<br>
|
||||
<div class="formelementrow"><input type="radio" name="what" value="mysqlnobin" id="radio_dump_mysql_nobin" />
|
||||
<label for="radio_dump_mysql">MySQL Dump (php) <?php print img_warning($langs->trans('BackupPHPWarning')) ?></label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
elseif (in_array($type, array('pgsql')))
|
||||
{
|
||||
?>
|
||||
<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />
|
||||
<label for="radio_dump_postgresql">PostgreSQL Dump (pg_dump)</label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<div id="div_container_exportoptions">';
|
||||
print '<fieldset id="exportoptions"><legend>'.$langs->trans("ExportMethod").'</legend>';
|
||||
if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print '<div class="formelementrow"><input type="radio" name="what" value="mysql" id="radio_dump_mysql" />';
|
||||
print '<label for="radio_dump_mysql">MySQL Dump (mysqldump)</label>';
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
print '<div class="formelementrow"><input type="radio" name="what" value="mysqlnobin" id="radio_dump_mysql_nobin" />';
|
||||
print '<label for="radio_dump_mysql">MySQL Dump (php) '.img_warning($langs->trans('BackupPHPWarning')).'</label>';
|
||||
print '</div>';
|
||||
} elseif (in_array($type, array('pgsql'))) {
|
||||
print '<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />';
|
||||
print '<label for="radio_dump_postgresql">PostgreSQL Dump (pg_dump)</label>';
|
||||
print '</div>';
|
||||
} else {
|
||||
print 'No method available with database '.$label;
|
||||
}
|
||||
?>
|
||||
</fieldset>
|
||||
</div>
|
||||
print '</fieldset>';
|
||||
print '</div>';
|
||||
|
||||
</td>
|
||||
<td class="tdtop">
|
||||
print '</td>';
|
||||
print '<td class="tdtop">';
|
||||
|
||||
|
||||
<div id="div_container_sub_exportoptions">
|
||||
<?php
|
||||
if (in_array($type, array('mysql', 'mysqli')))
|
||||
{
|
||||
?> <!-- Fieldset mysqldump -->
|
||||
<fieldset id="mysql_options"><legend><?php echo $langs->trans("MySqlExportParameters"); ?></legend>
|
||||
print '<div id="div_container_sub_exportoptions">';
|
||||
if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print "<!-- Fieldset mysqldump -->\n";
|
||||
print '<fieldset id="mysql_options"><legend>'.$langs->trans("MySqlExportParameters").'</legend>';
|
||||
|
||||
<div class="formelementrow"><?php echo $langs->trans("FullPathToMysqldumpCommand");
|
||||
print '<div class="formelementrow">'.$langs->trans("FullPathToMysqldumpCommand");
|
||||
if (empty($conf->global->SYSTEMTOOLS_MYSQLDUMP))
|
||||
{
|
||||
$fullpathofmysqldump=$db->getPathOfDump();
|
||||
@@ -211,219 +192,254 @@ print '<tr '.$bc[false].'><td style="padding-left: 8px">';
|
||||
{
|
||||
$fullpathofmysqldump=$conf->global->SYSTEMTOOLS_MYSQLDUMP;
|
||||
}
|
||||
?><br>
|
||||
<input type="text" name="mysqldump" style="width: 80%"
|
||||
value="<?php echo $fullpathofmysqldump; ?>" /></div>
|
||||
print '<br>';
|
||||
print '<input type="text" name="mysqldump" style="width: 80%" value="'.$fullpathofmysqldump.'" /></div>';
|
||||
|
||||
<br>
|
||||
<fieldset><legend><?php echo $langs->trans("ExportOptions"); ?></legend>
|
||||
<div class="formelementrow"><input type="checkbox"
|
||||
name="use_transaction" value="yes" id="checkbox_use_transaction" /> <label
|
||||
for="checkbox_use_transaction"> <?php echo $langs->trans("UseTransactionnalMode"); ?></label>
|
||||
print '<br>';
|
||||
print '<fieldset><legend>'.$langs->trans("ExportOptions").'</legend>';
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="use_transaction" value="yes" id="checkbox_use_transaction" />';
|
||||
print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>';
|
||||
|
||||
</div>
|
||||
print '</div>';
|
||||
|
||||
<?php if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) { ?>
|
||||
<div class="formelementrow"><input type="checkbox" name="disable_fk"
|
||||
value="yes" id="checkbox_disable_fk" checked /> <label
|
||||
for="checkbox_disable_fk"> <?php echo $langs->trans("CommandsToDisableForeignKeysForImport"); ?> <?php print img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')); ?></label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<label for="select_sql_compat"> <?php echo $langs->trans("ExportCompatibility"); ?></label>
|
||||
|
||||
<select name="sql_compat" id="select_sql_compat" class="flat">
|
||||
<option value="NONE" selected>NONE</option>
|
||||
<option value="ANSI">ANSI</option>
|
||||
<option value="DB2">DB2</option>
|
||||
<option value="MAXDB">MAXDB</option>
|
||||
<option value="MYSQL323">MYSQL323</option>
|
||||
<option value="MYSQL40">MYSQL40</option>
|
||||
<option value="MSSQL">MSSQL</option>
|
||||
<option value="ORACLE">ORACLE</option>
|
||||
<option value="POSTGRESQL">POSTGRESQL</option>
|
||||
</select> <br>
|
||||
<!-- <input type="checkbox" name="drop_database" value="yes"
|
||||
id="checkbox_drop_database" /> <label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
|
||||
-->
|
||||
</fieldset>
|
||||
|
||||
<br>
|
||||
<fieldset><legend> <input type="checkbox" name="sql_structure"
|
||||
value="structure" id="checkbox_sql_structure" checked /> <label
|
||||
for="checkbox_sql_structure"> <?php echo $langs->trans('ExportStructure') ?></label> </legend> <input
|
||||
type="checkbox" name="drop"<?php echo ((! isset($_GET["drop"]) && ! isset($_POST["drop"])) || GETPOST('drop'))?' checked':''; ?> id="checkbox_dump_drop" /> <label
|
||||
for="checkbox_dump_drop"><?php echo $langs->trans("AddDropTable"); ?></label><br>
|
||||
</fieldset>
|
||||
|
||||
<br>
|
||||
<fieldset><legend> <input type="checkbox" name="sql_data" value="data"
|
||||
id="checkbox_sql_data" checked /> <label for="checkbox_sql_data">
|
||||
<?php echo $langs->trans("Datas"); ?></label> </legend> <input
|
||||
type="checkbox" name="showcolumns" value="yes"
|
||||
id="checkbox_dump_showcolumns" checked /> <label
|
||||
for="checkbox_dump_showcolumns"> <?php echo $langs->trans("NameColumn"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="extended_ins" value="yes"
|
||||
id="checkbox_dump_extended_ins" checked /> <label
|
||||
for="checkbox_dump_extended_ins"> <?php echo $langs->trans("ExtendedInsert"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="disable-add-locks" value="no"
|
||||
id="checkbox_dump_disable-add-locks" /> <label
|
||||
for="checkbox_dump_disable-add-locks"> <?php echo $langs->trans("NoLockBeforeInsert"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="delayed" value="yes"
|
||||
id="checkbox_dump_delayed" /> <label for="checkbox_dump_delayed"> <?php echo $langs->trans("DelayedInsert"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="sql_ignore" value="yes"
|
||||
id="checkbox_dump_ignore" /> <label for="checkbox_dump_ignore"> <?php echo $langs->trans("IgnoreDuplicateRecords"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="hexforbinary" value="yes"
|
||||
id="checkbox_hexforbinary" checked /> <label
|
||||
for="checkbox_hexforbinary"> <?php echo $langs->trans("EncodeBinariesInHexa"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="charset_utf8" value="yes"
|
||||
id="checkbox_charset_utf8" checked disabled /> <label
|
||||
for="checkbox_charset_utf8"> <?php echo $langs->trans("UTF8"); ?></label><br>
|
||||
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<!-- Fieldset mysql_nobin -->
|
||||
<fieldset id="mysql_nobin_options"><legend><?php echo $langs->trans("MySqlExportParameters"); ?></legend>
|
||||
<fieldset>
|
||||
<legend><?php echo $langs->trans("ExportOptions"); ?></legend>
|
||||
<div class="formelementrow"><input type="checkbox"
|
||||
name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" /> <label
|
||||
for="checkbox_use_transaction"> <?php echo $langs->trans("UseTransactionnalMode"); ?></label>
|
||||
|
||||
</div>
|
||||
<?php if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) { ?>
|
||||
<div class="formelementrow"><input type="checkbox" name="nobin_disable_fk"
|
||||
value="yes" id="checkbox_disable_fk" checked /> <label
|
||||
for="checkbox_disable_fk"> <?php echo $langs->trans("CommandsToDisableForeignKeysForImport"); ?> <?php print img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')); ?></label>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</fieldset>
|
||||
|
||||
<br>
|
||||
<fieldset><legend><?php echo $langs->trans('ExportStructure') ?></legend> <input
|
||||
type="checkbox" name="nobin_drop"<?php echo ((! isset($_GET["nobin_drop"]) && ! isset($_POST["nobin_drop"])) || GETPOST('nobin_drop'))?' checked':''; ?> id="checkbox_dump_drop" /> <label
|
||||
for="checkbox_dump_drop"><?php echo $langs->trans("AddDropTable"); ?></label><br>
|
||||
</fieldset>
|
||||
|
||||
<br>
|
||||
<fieldset>
|
||||
<legend><?php echo $langs->trans("Datas"); ?></legend>
|
||||
|
||||
<input type="checkbox" name="nobin_nolocks" value="no"
|
||||
id="checkbox_dump_disable-add-locks" /> <label
|
||||
for="checkbox_dump_disable-add-locks"> <?php echo $langs->trans("NoLockBeforeInsert"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="nobin_delayed" value="yes"
|
||||
id="checkbox_dump_delayed" /> <label for="checkbox_dump_delayed"> <?php echo $langs->trans("DelayedInsert"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="nobin_sql_ignore" value="yes"
|
||||
id="checkbox_dump_ignore" /> <label for="checkbox_dump_ignore"> <?php echo $langs->trans("IgnoreDuplicateRecords"); ?></label><br>
|
||||
|
||||
<input type="checkbox" name="nobin_charset_utf8" value="yes"
|
||||
id="checkbox_charset_utf8" checked disabled /> <label
|
||||
for="checkbox_charset_utf8"> <?php echo $langs->trans("UTF8"); ?></label><br>
|
||||
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<?php
|
||||
if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) {
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="disable_fk" value="yes" id="checkbox_disable_fk" checked />';
|
||||
print '<label for="checkbox_disable_fk">'.$langs->trans("CommandsToDisableForeignKeysForImport").' '.img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')).'</label>';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if (in_array($type, array('pgsql')))
|
||||
{
|
||||
?> <!-- Fieldset pg_dump -->
|
||||
<fieldset id="postgresql_options"><legend><?php echo $langs->trans("PostgreSqlExportParameters"); ?></legend>
|
||||
print '<label for="select_sql_compat">'.$langs->trans("ExportCompatibility").'</label>';
|
||||
|
||||
<div class="formelementrow"><?php echo $langs->trans("FullPathToPostgreSQLdumpCommand");
|
||||
if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP))
|
||||
{
|
||||
print '<select name="sql_compat" id="select_sql_compat" class="flat">';
|
||||
print '<option value="NONE" selected>NONE</option>';
|
||||
print '<option value="ANSI">ANSI</option>';
|
||||
print '<option value="DB2">DB2</option>';
|
||||
print '<option value="MAXDB">MAXDB</option>';
|
||||
print '<option value="MYSQL323">MYSQL323</option>';
|
||||
print '<option value="MYSQL40">MYSQL40</option>';
|
||||
print '<option value="MSSQL">MSSQL</option>';
|
||||
print '<option value="ORACLE">ORACLE</option>';
|
||||
print '<option value="POSTGRESQL">POSTGRESQL</option>';
|
||||
print '</select>';
|
||||
print '<br>';
|
||||
print '<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
|
||||
print '<label for="checkbox_drop_database">'.$langs->trans("AddDropDatabase").'</label>';
|
||||
print '-->';
|
||||
print '</fieldset>';
|
||||
|
||||
print '<br>';
|
||||
print '<fieldset>';
|
||||
print '<legend>';
|
||||
print '<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
|
||||
print '<label for="checkbox_sql_structure">'.$langs->trans('ExportStructure').'</label>';
|
||||
print '</legend>';
|
||||
print '<input type="checkbox" name="drop"'.((! isset($_GET["drop"]) && ! isset($_POST["drop"])) || GETPOST('drop'))?' checked':''.' id="checkbox_dump_drop" />';
|
||||
print '<label for="checkbox_dump_drop">'.$langs->trans("AddDropTable").'</label>';
|
||||
print '<br>';
|
||||
print '</fieldset>';
|
||||
|
||||
print '<br>';
|
||||
print '<fieldset>';
|
||||
print '<legend>';
|
||||
print '<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
|
||||
print '<label for="checkbox_sql_data">'.$langs->trans("Datas").'</label>';
|
||||
print '</legend>';
|
||||
print '<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
|
||||
print '<label for="checkbox_dump_showcolumns">'.$langs->trans("NameColumn").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="extended_ins" value="yes" id="checkbox_dump_extended_ins" checked />';
|
||||
print '<label for="checkbox_dump_extended_ins">'.$langs->trans("ExtendedInsert").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="disable-add-locks" value="no" id="checkbox_dump_disable-add-locks" />';
|
||||
print '<label for="checkbox_dump_disable-add-locks">'.$langs->trans("NoLockBeforeInsert").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="delayed" value="yes" id="checkbox_dump_delayed" />';
|
||||
print '<label for="checkbox_dump_delayed">'.$langs->trans("DelayedInsert").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="sql_ignore" value="yes" id="checkbox_dump_ignore" />';
|
||||
print '<label for="checkbox_dump_ignore">'.$langs->trans("IgnoreDuplicateRecords").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="hexforbinary" value="yes" id="checkbox_hexforbinary" checked />';
|
||||
print '<label for="checkbox_hexforbinary">'.$langs->trans("EncodeBinariesInHexa").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
|
||||
print '<label for="checkbox_charset_utf8">'.$langs->trans("UTF8").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '</fieldset>';
|
||||
print '</fieldset>';
|
||||
print "<!-- Fieldset mysql_nobin -->\n";
|
||||
print '<fieldset id="mysql_nobin_options">';
|
||||
print '<legend>'.$langs->trans("MySqlExportParameters").'</legend>';
|
||||
print '<fieldset>';
|
||||
print '<legend>'.$langs->trans("ExportOptions").'</legend>';
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="nobin_use_transaction" value="yes" id="checkbox_use_transaction" />';
|
||||
print '<label for="checkbox_use_transaction">'.$langs->trans("UseTransactionnalMode").'</label>';
|
||||
|
||||
print '</div>';
|
||||
if (! empty($conf->global->MYSQL_OLD_OPTION_DISABLE_FK)) {
|
||||
print '<div class="formelementrow">';
|
||||
print '<input type="checkbox" name="nobin_disable_fk" value="yes" id="checkbox_disable_fk" checked />';
|
||||
print '<label for="checkbox_disable_fk">'.$langs->trans("CommandsToDisableForeignKeysForImport").' '.img_info($langs->trans('CommandsToDisableForeignKeysForImportWarning')).'</label>';
|
||||
print '</div>';
|
||||
}
|
||||
print '</fieldset>';
|
||||
|
||||
print '<br>';
|
||||
print '<fieldset><legend>'.$langs->trans('ExportStructure').'</legend>';
|
||||
print '<input type="checkbox" name="nobin_drop"'.((! isset($_GET["nobin_drop"]) && ! isset($_POST["nobin_drop"])) || GETPOST('nobin_drop'))?' checked':''.' id="checkbox_dump_drop" />';
|
||||
print '<label for="checkbox_dump_drop">'.$langs->trans("AddDropTable").'</label>';
|
||||
print '<br>';
|
||||
print '</fieldset>';
|
||||
|
||||
print '<br>';
|
||||
print '<fieldset>';
|
||||
print '<legend>'.$langs->trans("Datas").'</legend>';
|
||||
|
||||
print '<input type="checkbox" name="nobin_nolocks" value="no" id="checkbox_dump_disable-add-locks" />';
|
||||
print '<label for="checkbox_dump_disable-add-locks">'.$langs->trans("NoLockBeforeInsert").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="nobin_delayed" value="yes" id="checkbox_dump_delayed" />';
|
||||
print '<label for="checkbox_dump_delayed">'.$langs->trans("DelayedInsert").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="nobin_sql_ignore" value="yes" id="checkbox_dump_ignore" />';
|
||||
print '<label for="checkbox_dump_ignore">'.$langs->trans("IgnoreDuplicateRecords").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '<input type="checkbox" name="nobin_charset_utf8" value="yes" id="checkbox_charset_utf8" checked disabled />';
|
||||
print '<label for="checkbox_charset_utf8">'.$langs->trans("UTF8").'</label>';
|
||||
print '<br>';
|
||||
|
||||
print '</fieldset>';
|
||||
print '</fieldset>';
|
||||
}
|
||||
|
||||
if (in_array($type, array('pgsql'))) {
|
||||
print "<!-- Fieldset pg_dump -->\n";
|
||||
print '<fieldset id="postgresql_options"><legend>'.$langs->trans("PostgreSqlExportParameters").'</legend>';
|
||||
|
||||
print '<div class="formelementrow">'.$langs->trans("FullPathToPostgreSQLdumpCommand");
|
||||
if (empty($conf->global->SYSTEMTOOLS_POSTGRESQLDUMP)) {
|
||||
$fullpathofpgdump=$db->getPathOfDump();
|
||||
}
|
||||
else
|
||||
{
|
||||
$fullpathofpgdump=$conf->global->SYSTEMTOOLS_POSTGRESQLDUMP;
|
||||
}
|
||||
?><br>
|
||||
<input type="text" name="postgresqldump" style="width: 80%"
|
||||
value="<?php echo $fullpathofpgdump; ?>" /></div>
|
||||
print '<br>';
|
||||
print '<input type="text" name="postgresqldump" style="width: 80%" value="'.$fullpathofpgdump.'" /></div>';
|
||||
|
||||
|
||||
<br>
|
||||
<fieldset><legend><?php echo $langs->trans("ExportOptions"); ?></legend>
|
||||
<label for="select_sql_compat"> <?php echo $langs->trans("ExportCompatibility"); ?></label>
|
||||
<select name="sql_compat" id="select_sql_compat" class="flat">
|
||||
<option value="POSTGRESQL" selected>POSTGRESQL</option>
|
||||
<option value="ANSI">ANSI</option>
|
||||
</select><br>
|
||||
<!-- <input type="checkbox" name="drop_database" value="yes"
|
||||
id="checkbox_drop_database" /> <label for="checkbox_drop_database"><?php echo $langs->trans("AddDropDatabase"); ?></label>
|
||||
-->
|
||||
</fieldset>
|
||||
|
||||
<br>
|
||||
<fieldset><legend> <input type="checkbox" name="sql_structure"
|
||||
value="structure" id="checkbox_sql_structure" checked /> <label
|
||||
for="checkbox_sql_structure"> <?php echo $langs->trans('ExportStructure') ?></label> </legend></fieldset>
|
||||
|
||||
<br>
|
||||
<fieldset><legend> <input type="checkbox" name="sql_data" value="data"
|
||||
id="checkbox_sql_data" checked /> <label for="checkbox_sql_data">
|
||||
<?php echo $langs->trans("Datas"); ?></label> </legend> <input
|
||||
type="checkbox" name="showcolumns" value="yes"
|
||||
id="checkbox_dump_showcolumns" checked /> <label
|
||||
for="checkbox_dump_showcolumns"> <?php echo $langs->trans("NameColumn"); ?></label><br>
|
||||
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<?php
|
||||
print '<br>';
|
||||
print '<fieldset>';
|
||||
print '<legend>'.$langs->trans("ExportOptions").'</legend>';
|
||||
print '<label for="select_sql_compat">'.$langs->trans("ExportCompatibility").'</label>';
|
||||
print '<select name="sql_compat" id="select_sql_compat" class="flat">';
|
||||
print '<option value="POSTGRESQL" selected>POSTGRESQL</option>';
|
||||
print '<option value="ANSI">ANSI</option>';
|
||||
print '</select>';
|
||||
print '<br>';
|
||||
print '<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
|
||||
print '<label for="checkbox_drop_database">'.$langs->trans("AddDropDatabase").'</label>';
|
||||
print '-->';
|
||||
print '</fieldset>';
|
||||
print '<br>';
|
||||
print '<fieldset>';
|
||||
print '<legend>';
|
||||
print '<input type="checkbox" name="sql_structure" value="structure" id="checkbox_sql_structure" checked />';
|
||||
print '<label for="checkbox_sql_structure">'.$langs->trans('ExportStructure').'</label>';
|
||||
print '</legend>';
|
||||
print '</fieldset>';
|
||||
print '<br>';
|
||||
print '<fieldset>';
|
||||
print '<legend>';
|
||||
print '<input type="checkbox" name="sql_data" value="data" id="checkbox_sql_data" checked />';
|
||||
print '<label for="checkbox_sql_data">'.$langs->trans("Datas").'</label>';
|
||||
print '</legend>';
|
||||
print '<input type="checkbox" name="showcolumns" value="yes" id="checkbox_dump_showcolumns" checked />';
|
||||
print '<label for="checkbox_dump_showcolumns">'.$langs->trans("NameColumn").'</label>';
|
||||
print '<br>';
|
||||
print '</fieldset>';
|
||||
print '</fieldset>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
print '</div>';
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
<!--<fieldset>
|
||||
<legend><?php echo $langs->trans("Destination"); ?></legend> -->
|
||||
<br>
|
||||
<label for="filename_template"> <?php echo $langs->trans("FileNameToGenerate"); ?></label><br>
|
||||
<input type="text" name="filename_template" style="width: 90%"
|
||||
id="filename_template"
|
||||
value="<?php
|
||||
print '<!--<fieldset>';
|
||||
print '<legend>'.$langs->trans("Destination").'</legend> -->';
|
||||
print '<br>';
|
||||
print '<label for="filename_template">'.$langs->trans("FileNameToGenerate").'</label>';
|
||||
print '<br>';
|
||||
$prefix='dump';
|
||||
$ext='.sql';
|
||||
if (in_array($type, array('mysql', 'mysqli'))) { $prefix='mysqldump'; $ext='sql'; }
|
||||
//if ($label == 'PostgreSQL') { $prefix='pg_dump'; $ext='dump'; }
|
||||
if (in_array($type, array('pgsql'))) { $prefix='pg_dump'; $ext='sql'; }
|
||||
if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
$prefix='mysqldump';
|
||||
$ext='sql';
|
||||
}
|
||||
//if ($label == 'PostgreSQL') {
|
||||
// $prefix='pg_dump';
|
||||
// $ext='dump';
|
||||
//}
|
||||
if (in_array($type, array('pgsql'))) {
|
||||
$prefix='pg_dump';
|
||||
$ext='sql';
|
||||
}
|
||||
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.'.$ext;
|
||||
echo $file;
|
||||
?>" /> <br>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
print '<input type="text" name="filename_template" style="width: 90%" id="filename_template" value="'.$file.'" />';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
// Define compressions array
|
||||
$compression=array();
|
||||
if (in_array($type, array('mysql', 'mysqli')))
|
||||
{
|
||||
$compression['none'] = array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("None"));
|
||||
$compression['gz'] = array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip"));
|
||||
// $compression['zip']= array('function' => 'dol_compress', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip")); // Not open source format. Must implement dol_compress function
|
||||
$compression['bz'] = array('function' => 'bzopen', 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2"));
|
||||
if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
$compression['none'] = array(
|
||||
'function' => '',
|
||||
'id' => 'radio_compression_none',
|
||||
'label' => $langs->trans("None")
|
||||
);
|
||||
$compression['gz'] = array(
|
||||
'function' => 'gzopen',
|
||||
'id' => 'radio_compression_gzip',
|
||||
'label' => $langs->trans("Gzip")
|
||||
);
|
||||
// Not open source format. Must implement dol_compress function
|
||||
// $compression['zip']= array(
|
||||
// 'function' => 'dol_compress',
|
||||
// 'id' => 'radio_compression_zip',
|
||||
// 'label' => $langs->trans("FormatZip")
|
||||
// );
|
||||
$compression['bz'] = array(
|
||||
'function' => 'bzopen',
|
||||
'id' => 'radio_compression_bzip',
|
||||
'label' => $langs->trans("Bzip2")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$compression['none'] = array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("Default"));
|
||||
$compression['gz'] = array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip"));
|
||||
$compression['none'] = array(
|
||||
'function' => '',
|
||||
'id' => 'radio_compression_none',
|
||||
'label' => $langs->trans("Default")
|
||||
);
|
||||
$compression['gz'] = array(
|
||||
'function' => 'gzopen',
|
||||
'id' => 'radio_compression_gzip',
|
||||
'label' => $langs->trans("Gzip")
|
||||
);
|
||||
}
|
||||
|
||||
// Show compression choices
|
||||
@@ -434,13 +450,14 @@ print $langs->trans("Compression").': ';
|
||||
|
||||
foreach($compression as $key => $val)
|
||||
{
|
||||
if (! $val['function'] || function_exists($val['function'])) // Enabled export format
|
||||
{
|
||||
if (! $val['function'] || function_exists($val['function'])) {
|
||||
// Enabled export format
|
||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'" checked>';
|
||||
print ' <label for="'.$val['id'].'">'.$val['label'].'</label>';
|
||||
}
|
||||
else // Disabled export format
|
||||
else
|
||||
{
|
||||
// Disabled export format
|
||||
print '<input type="radio" name="compression" value="'.$key.'" id="'.$val['id'].'" disabled>';
|
||||
print ' <label for="'.$val['id'].'">'.$val['label'].'</label>';
|
||||
print ' ('.$langs->trans("NotAvailable").')';
|
||||
@@ -451,17 +468,15 @@ foreach($compression as $key => $val)
|
||||
print '</div>';
|
||||
print "\n";
|
||||
|
||||
?><!--</fieldset>--> <!-- End destination -->
|
||||
print "<!--</fieldset>--> <!-- End destination -->\n";
|
||||
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button reposition" value="'.$langs->trans("GenerateBackup").'" id="buttonGo">';
|
||||
print '<input type="hidden" name="page_y" value="'.GETPOST('page_y', 'int').'">';
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
||||
<br>
|
||||
<div class="center">
|
||||
<input type="submit" class="button reposition" value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo">
|
||||
<input type="hidden" name="page_y" value="<?php echo GETPOST('page_y', 'int'); ?>">
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
if (! empty($_SESSION["commandbackuplastdone"]))
|
||||
{
|
||||
print '<br><b>'.$langs->trans("RunCommandSummary").':</b><br>'."\n";
|
||||
@@ -491,71 +506,51 @@ if (! empty($_SESSION["commandbackuptorun"]))
|
||||
$_SESSION["commandbackuptorun"]='';
|
||||
$_SESSION["commandbackupresult"]='';
|
||||
}
|
||||
?>
|
||||
|
||||
</div> <!-- end div center button -->
|
||||
print "</div> <!-- end div center button -->\n";
|
||||
|
||||
<?php
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div> <!-- end div fichehalfleft -->
|
||||
print "</div> <!-- end div fichehalfleft -->\n";
|
||||
|
||||
|
||||
<div id="backupdatabaseright" class="fichehalfright" style="height:480px; overflow: auto;">
|
||||
<div class="ficheaddleft">
|
||||
print '<div id="backupdatabaseright" class="fichehalfright" style="height:480px; overflow: auto;">';
|
||||
print '<div class="ficheaddleft">';
|
||||
|
||||
<?php
|
||||
$filearray=dol_dir_list($conf->admin->dir_output.'/backup', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1);
|
||||
$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'backup/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles"));
|
||||
print '<br>';
|
||||
?>
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
print '</fieldset>';
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
print "<br>\n";
|
||||
print "<!-- Dump of a server -->\n";
|
||||
|
||||
<br>
|
||||
<!-- Dump of a server -->
|
||||
print '<form method="post" action="export_files.php" name="dump">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
print '<input type="hidden" name="export_type" value="server" />';
|
||||
|
||||
<form method="post" action="export_files.php" name="dump">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<input type="hidden" name="export_type" value="server" />
|
||||
print '<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>';
|
||||
|
||||
<fieldset><legend class="legendforfieldsetstep" style="font-size: 3em">2</legend>
|
||||
|
||||
<?php
|
||||
print $langs->trans("BackupDesc2", DOL_DATA_ROOT).'<br>';
|
||||
print $langs->trans("BackupDescX").'<br><br>';
|
||||
|
||||
?>
|
||||
|
||||
<div id="backupfilesleft" class="fichehalfleft">
|
||||
|
||||
<?php
|
||||
print '<div id="backupfilesleft" class="fichehalfleft">';
|
||||
|
||||
print load_fiche_titre($title?$title:$langs->trans("BackupDumpWizard"));
|
||||
?>
|
||||
|
||||
<label for="zipfilename_template"> <?php echo $langs->trans("FileNameToGenerate"); ?></label><br>
|
||||
<input type="text" name="zipfilename_template" style="width: 90%"
|
||||
id="zipfilename_template"
|
||||
value="<?php
|
||||
print '<label for="zipfilename_template">'.$langs->trans("FileNameToGenerate").'</label><br>';
|
||||
$prefix='documents';
|
||||
$ext='zip';
|
||||
|
||||
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.'.$ext;
|
||||
echo $file;
|
||||
?>" /> <br>
|
||||
<br>
|
||||
print '<input type="text" name="zipfilename_template" style="width: 90%" id="zipfilename_template" value="'.$file.'" /> <br>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
<?php
|
||||
// Show compression choices
|
||||
print '<div class="formelementrow">';
|
||||
print "\n";
|
||||
@@ -584,32 +579,26 @@ foreach($filecompression as $key => $val)
|
||||
print '</div>';
|
||||
print "\n";
|
||||
|
||||
?>
|
||||
<br>
|
||||
<div class="center"><input type="submit" class="button reposition"
|
||||
value="<?php echo $langs->trans("GenerateBackup") ?>" id="buttonGo" /><br>
|
||||
<br>
|
||||
</div>
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button reposition" value="'.$langs->trans("GenerateBackup").'" id="buttonGo" /><br>';
|
||||
print '<br>';
|
||||
print '</div>';
|
||||
|
||||
</div>
|
||||
print '</div>';
|
||||
|
||||
<div id="backupdatabaseright" class="fichehalfright" style="height:480px; overflow: auto;">
|
||||
<div class="ficheaddleft">
|
||||
print '<div id="backupdatabaseright" class="fichehalfright" style="height:480px; overflow: auto;">';
|
||||
print '<div class="ficheaddleft">';
|
||||
|
||||
<?php
|
||||
$filearray=dol_dir_list($conf->admin->dir_output.'/documents', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1);
|
||||
$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'documents/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles"));
|
||||
print '<br>';
|
||||
?>
|
||||
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
print '</fieldset>';
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
@@ -131,11 +131,9 @@ print $langs->trans("RestoreDesc3", $dolibarr_main_db_name).'<br><br>';
|
||||
<?php
|
||||
if (in_array($type, array('mysql', 'mysqli')))
|
||||
{
|
||||
?>
|
||||
<fieldset id="mysql_options">
|
||||
<legend><?php echo $langs->trans('RestoreMySQL') ?></legend>
|
||||
<div class="formelementrow centpercent">
|
||||
<?php
|
||||
print '<fieldset id="mysql_options">';
|
||||
print '<legend>'.$langs->trans('RestoreMySQL').'</legend>';
|
||||
print '<div class="formelementrow centpercent">';
|
||||
// Parameteres execution
|
||||
$command=$db->getPathOfRestore();
|
||||
if (preg_match("/\s/", $command)) $command=$command=escapeshellarg($command); // Use quotes on command
|
||||
@@ -157,20 +155,18 @@ if (in_array($type, array('mysql', 'mysqli')))
|
||||
print '<textarea rows="1" id="restorecommand" class="centpercent">'.$langs->trans("ImportMySqlCommand", $command, ($showpass?$paramclear:$paramcrypted)).'</textarea><br>';
|
||||
print ajax_autoselect('restorecommand');
|
||||
|
||||
if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&radio_dump=mysql_options">'.$langs->trans("UnHidePassword").'</a>';
|
||||
if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) {
|
||||
print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&radio_dump=mysql_options">'.$langs->trans("UnHidePassword").'</a>';
|
||||
}
|
||||
//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php
|
||||
print '</div>';
|
||||
print '</fieldset>';
|
||||
}
|
||||
elseif (in_array($type, array('pgsql')))
|
||||
{
|
||||
?>
|
||||
<fieldset id="postgresql_options">
|
||||
<legend>Restore PostgreSQL</legend>
|
||||
<div class="formelementrow">
|
||||
<?php
|
||||
print '<fieldset id="postgresql_options">';
|
||||
print '<legend>Restore PostgreSQL</legend>';
|
||||
print '<div class="formelementrow">';
|
||||
// Parameteres execution
|
||||
$command=$db->getPathOfRestore();
|
||||
if (preg_match("/\s/", $command)) $command=$command=escapeshellarg($command); // Use quotes on command
|
||||
@@ -198,20 +194,16 @@ elseif (in_array($type, array('pgsql')))
|
||||
print ajax_autoselect('restorecommand');
|
||||
//if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&radio_dump=postgresql_options">'.$langs->trans("UnHidePassword").'</a>';
|
||||
//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
|
||||
?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php
|
||||
print '</div>';
|
||||
print '</fieldset>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
print '</div>';
|
||||
|
||||
|
||||
</td></tr></table>
|
||||
</fieldset>
|
||||
print '</td></tr></table>';
|
||||
print '</fieldset>';
|
||||
|
||||
<?php
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@@ -673,7 +673,7 @@ if ($dirins && $action == 'initobject' && $module && $objectname)
|
||||
//'scripts/mymodule.php'=>'scripts/'.strtolower($objectname).'.php',
|
||||
'img/object_myobject.png'=>'img/object_'.strtolower($objectname).'.png',
|
||||
'class/myobject.class.php'=>'class/'.strtolower($objectname).'.class.php',
|
||||
//'class/api_mymodule.class.php'=>'class/api_'.strtolower($module).'.class.php'
|
||||
//'class/api_mymodule.class.php'=>'class/api_'.strtolower($module).'.class.php',
|
||||
);
|
||||
|
||||
foreach($filetogenerate as $srcfile => $destfile)
|
||||
@@ -715,33 +715,46 @@ if ($dirins && $action == 'initobject' && $module && $objectname)
|
||||
|
||||
// Regenerate left menu entry in descriptor for $objectname
|
||||
$stringtoadd = "
|
||||
\t\t\$this->menu[\$r++]=array(
|
||||
'fk_menu'=>'fk_mainmenu=mymodule', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
\$this->menu[\$r++]=array(
|
||||
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'fk_menu'=>'fk_mainmenu=mymodule',
|
||||
// This is a Left menu entry
|
||||
'type'=>'left',
|
||||
'titre'=>'List MyObject',
|
||||
'mainmenu'=>'mymodule',
|
||||
'leftmenu'=>'mymodule_myobject',
|
||||
'url'=>'/mymodule/myobject_list.php',
|
||||
'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'langs'=>'mymodule@mymodule',
|
||||
'position'=>1100+\$r,
|
||||
'enabled'=>'\$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '\$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '\$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'1', // Use 'perms'=>'\$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// Define condition to show or hide menu entry. Use '\$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '\$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'enabled'=>'\$conf->mymodule->enabled',
|
||||
// Use 'perms'=>'\$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'perms'=>'1',
|
||||
'target'=>'',
|
||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
\t\t\$this->menu[\$r++]=array(
|
||||
'fk_menu'=>'fk_mainmenu=mymodule,fk_leftmenu=mymodule_myobject', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'type'=>'left', // This is a Left menu entry
|
||||
// 0=Menu for internal users, 1=external users, 2=both
|
||||
'user'=>2,
|
||||
);
|
||||
\$this->menu[\$r++]=array(
|
||||
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||
'fk_menu'=>'fk_mainmenu=mymodule,fk_leftmenu=mymodule_myobject',
|
||||
// This is a Left menu entry
|
||||
'type'=>'left',
|
||||
'titre'=>'New MyObject',
|
||||
'mainmenu'=>'mymodule',
|
||||
'leftmenu'=>'mymodule_myobject',
|
||||
'url'=>'/mymodule/myobject_card.php?action=create',
|
||||
'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'langs'=>'mymodule@mymodule',
|
||||
'position'=>1100+\$r,
|
||||
'enabled'=>'\$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '\$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '\$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'perms'=>'1', // Use 'perms'=>'\$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// Define condition to show or hide menu entry. Use '\$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '\$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
'enabled'=>'\$conf->mymodule->enabled',
|
||||
// Use 'perms'=>'\$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
'perms'=>'1',
|
||||
'target'=>'',
|
||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
";
|
||||
// 0=Menu for internal users, 1=external users, 2=both
|
||||
'user'=>2
|
||||
);\n";
|
||||
$stringtoadd = preg_replace('/MyObject/', $objectnameloop, $stringtoadd);
|
||||
$stringtoadd = preg_replace('/mymodule/', strtolower($module), $stringtoadd);
|
||||
$stringtoadd = preg_replace('/myobject/', strtolower($objectnameloop), $stringtoadd);
|
||||
@@ -892,7 +905,8 @@ if ($dirins && $action == 'addproperty' && !empty($module) && ! empty($tabobj))
|
||||
'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'none'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}'
|
||||
'visible'=>GETPOST('propvisible', 'int'),'enabled'=>GETPOST('propenabled', 'int'),
|
||||
'position'=>GETPOST('propposition', 'int'),'notnull'=>GETPOST('propnotnull', 'int'),'index'=>GETPOST('propindex', 'int'),'searchall'=>GETPOST('propsearchall', 'int'),
|
||||
'isameasure'=>GETPOST('propisameasure', 'int'), 'comment'=>GETPOST('propcomment', 'alpha'),'help'=>GETPOST('prophelp', 'alpha'));
|
||||
'isameasure'=>GETPOST('propisameasure', 'int'), 'comment'=>GETPOST('propcomment', 'alpha'),'help'=>GETPOST('prophelp', 'alpha')
|
||||
);
|
||||
|
||||
if (! empty($addfieldentry['arrayofkeyval']) && ! is_array($addfieldentry['arrayofkeyval']))
|
||||
{
|
||||
|
||||
@@ -74,8 +74,8 @@ class MyModuleFunctionalTest extends \PHPUnit_Extensions_Selenium2TestCase
|
||||
// 'browserName' => 'firefox',
|
||||
// 'sessionStrategy' => 'shared',
|
||||
// 'desiredCapabilities' => array(
|
||||
// 'marionette' => true
|
||||
// )
|
||||
// 'marionette' => true,
|
||||
// ),
|
||||
//)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user