Restore changes after 27 may due to from savannah Crash.
This commit is contained in:
parent
087208b7fa
commit
d4a3038240
@ -145,6 +145,7 @@ class modMyModule extends DolibarrModules
|
|||||||
// 'url'=>'/mymodule/pagetop.php',
|
// 'url'=>'/mymodule/pagetop.php',
|
||||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
// 'position'=>100,
|
// 'position'=>100,
|
||||||
|
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||||
// 'target'=>'',
|
// 'target'=>'',
|
||||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
@ -158,6 +159,7 @@ class modMyModule extends DolibarrModules
|
|||||||
// 'url'=>'/mymodule/pagelevel1.php',
|
// 'url'=>'/mymodule/pagelevel1.php',
|
||||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
// 'position'=>100,
|
// 'position'=>100,
|
||||||
|
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||||
// 'target'=>'',
|
// 'target'=>'',
|
||||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
@ -171,6 +173,7 @@ class modMyModule extends DolibarrModules
|
|||||||
// 'url'=>'/mymodule/pagelevel2.php',
|
// 'url'=>'/mymodule/pagelevel2.php',
|
||||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
// 'position'=>100,
|
// 'position'=>100,
|
||||||
|
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||||
// 'target'=>'',
|
// 'target'=>'',
|
||||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
@ -224,9 +227,9 @@ class modMyModule extends DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Create tables and keys required by module
|
* \brief Create tables, keys and data required by module
|
||||||
* Files mymodule.sql and mymodule.key.sql with create table and create keys
|
* Files llx_table1.sql, llx_table1.key.sql llx_data.sql with create table, create keys
|
||||||
* commands must be stored in directory /mymodule/sql/
|
* and create data commands must be stored in directory /mymodule/sql/
|
||||||
* This function is called by this->init.
|
* This function is called by this->init.
|
||||||
* \return int <=0 if KO, >0 if OK
|
* \return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -463,7 +463,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_COMMANDE_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_COMMANDE_FREE_TEXT">';
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
print $langs->trans("FreeLegalTextOnOrders").'<br>';
|
print $langs->trans("FreeLegalTextOnOrders").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||||
print '<textarea name="COMMANDE_FREE_TEXT" class="flat" cols="100">'.$conf->global->COMMANDE_FREE_TEXT.'</textarea>';
|
print '<textarea name="COMMANDE_FREE_TEXT" class="flat" cols="100">'.$conf->global->COMMANDE_FREE_TEXT.'</textarea>';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -615,7 +615,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_FACTURE_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_FACTURE_FREE_TEXT">';
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
print $langs->trans("FreeLegalTextOnInvoices").'<br>';
|
print $langs->trans("FreeLegalTextOnInvoices").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||||
print '<textarea name="FACTURE_FREE_TEXT" class="flat" cols="100">'.$conf->global->FACTURE_FREE_TEXT.'</textarea>';
|
print '<textarea name="FACTURE_FREE_TEXT" class="flat" cols="100">'.$conf->global->FACTURE_FREE_TEXT.'</textarea>';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -423,7 +423,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_DELIVERY_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_DELIVERY_FREE_TEXT">';
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
print $langs->trans("FreeLegalTextOnDeliveryReceipts").'<br>';
|
print $langs->trans("FreeLegalTextOnDeliveryReceipts").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||||
print '<textarea name="DELIVERY_FREE_TEXT" class="flat" cols="100">'.$conf->global->DELIVERY_FREE_TEXT.'</textarea>';
|
print '<textarea name="DELIVERY_FREE_TEXT" class="flat" cols="100">'.$conf->global->DELIVERY_FREE_TEXT.'</textarea>';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -469,7 +469,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="set_PROPALE_FREE_TEXT">';
|
print '<input type="hidden" name="action" value="set_PROPALE_FREE_TEXT">';
|
||||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||||
print $langs->trans("FreeLegalTextOnProposal").'<br>';
|
print $langs->trans("FreeLegalTextOnProposal").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||||
print '<textarea name="PROPALE_FREE_TEXT" class="flat" cols="100">'.$conf->global->PROPALE_FREE_TEXT.'</textarea>';
|
print '<textarea name="PROPALE_FREE_TEXT" class="flat" cols="100">'.$conf->global->PROPALE_FREE_TEXT.'</textarea>';
|
||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -72,7 +72,7 @@ function printBookmarksList ($aDb, $aLangs)
|
|||||||
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
|
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>';
|
$ret.='<div class="menu_contenu"><a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>';
|
||||||
$ret.=' '.img_object($langs->trans("BookmarkThisPage"),'bookmark').' ';
|
$ret.=' '.img_object('','bookmark').' ';
|
||||||
$ret.= dol_trunc($obj->title, 20).'</a><br></div>';
|
$ret.= dol_trunc($obj->title, 20).'</a><br></div>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,6 +51,7 @@ if (isset($_GET["msg"])) { $mesg=urldecode($_GET["mesg"]); }
|
|||||||
$year=isset($_GET["year"])?$_GET["year"]:"";
|
$year=isset($_GET["year"])?$_GET["year"]:"";
|
||||||
$month=isset($_GET["month"])?$_GET["month"]:"";
|
$month=isset($_GET["month"])?$_GET["month"]:"";
|
||||||
$socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid'];
|
$socid=isset($_GET['socid'])?$_GET['socid']:$_POST['socid'];
|
||||||
|
$mesg=isset($_GET['mesg'])?urldecode($_GET['mesg']):'';
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$module='propale';
|
$module='propale';
|
||||||
@ -505,7 +506,7 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['cancel'])
|
|||||||
{
|
{
|
||||||
// Redirect here
|
// Redirect here
|
||||||
// This avoid sending mail twice if going out and then back to page
|
// This avoid sending mail twice if going out and then back to page
|
||||||
Header('Location: '.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&msg='.urlencode($mesg));
|
Header('Location: '.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&mesg='.urlencode($mesg));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -441,8 +441,8 @@ class Account extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db.' sql='.$sql;
|
$this->error=$this->db->lasterror();
|
||||||
dol_print_error($this->error, LOG_ERR);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -450,12 +450,12 @@ class Account extends CommonObject
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief Update BBAN (RIB) account fields
|
* \brief Update BBAN (RIB) account fields
|
||||||
* \param user Object utilisateur qui modifie
|
* \param user Object user making update
|
||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update_bban($user='')
|
function update_bban($user='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
// Chargement librairie pour acces fonction controle RIB
|
// Chargement librairie pour acces fonction controle RIB
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/lib/bank.lib.php');
|
require_once(DOL_DOCUMENT_ROOT.'/lib/bank.lib.php');
|
||||||
@ -492,8 +492,8 @@ class Account extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db.' sql='.$sql;
|
$this->error=$this->db->lasterror();
|
||||||
dol_print_error($this->error, LOG_ERR);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1004,9 +1004,9 @@ class AccountLine
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Met a jour en base la ligne
|
* \brief Update bank account record in database
|
||||||
* \param user Objet user qui met a jour
|
* \param user Object user making update
|
||||||
* \param notrigger 0=Desactive les triggers
|
* \param notrigger 0=Disable all triggers
|
||||||
* \param int <0 if KO, >0 if OK
|
* \param int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update($user,$notrigger=0)
|
function update($user,$notrigger=0)
|
||||||
|
|||||||
@ -42,9 +42,6 @@ if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT.'/propal.class.php'
|
|||||||
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php');
|
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php');
|
||||||
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php');
|
||||||
|
|
||||||
if (! $user->rights->facture->lire)
|
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
$langs->load('products');
|
$langs->load('products');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user