PHPDoc and misc fixes for several folders

This commit is contained in:
Marcos García de La Fuente 2015-02-10 11:02:11 +01:00
parent e21681a369
commit ca939bf8a5
10 changed files with 30 additions and 26 deletions

View File

@ -41,7 +41,7 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
/** /**
* Empty header * Empty header
* *
* @return none * @return void
*/ */
function llxHeader() function llxHeader()
{ {
@ -53,7 +53,7 @@ function llxHeader()
/** /**
* Empty footer * Empty footer
* *
* @return none * @return void
*/ */
function llxFooter() function llxFooter()
{ {

View File

@ -210,7 +210,8 @@ if ($conf->societe->enabled)
{ {
$nbno=$nbtotal=0; $nbno=$nbtotal=0;
print_fiche_titre($langs->trans("BarcodeInitForThirdparties"),'','').'<br>'."\n"; print_fiche_titre($langs->trans("BarcodeInitForThirdparties"),'','');
print '<br>'."\n";
$sql="SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."societe where barcode IS NULL or barcode = ''"; $sql="SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."societe where barcode IS NULL or barcode = ''";
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)
@ -250,7 +251,8 @@ if ($conf->product->enabled || $conf->product->service)
$nbno=$nbtotal=0; $nbno=$nbtotal=0;
print_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"),'','').'<br>'."\n"; print_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"),'','');
print '<br>'."\n";
$sql ="SELECT count(rowid) as nb, fk_product_type"; $sql ="SELECT count(rowid) as nb, fk_product_type";
$sql.=" FROM ".MAIN_DB_PREFIX."product"; $sql.=" FROM ".MAIN_DB_PREFIX."product";
$sql.=" WHERE barcode IS NULL OR barcode = ''"; $sql.=" WHERE barcode IS NULL OR barcode = ''";

View File

@ -360,7 +360,7 @@ print '<br>';
print '<input id="fillfromproduct" type="radio" '.((GETPOST("selectorforbarcode")=='fillfromproduct')?'checked="checked" ':'').'name="selectorforbarcode" value="fillfromproduct" class="radiobarcodeselect"> '.$langs->trans("FillBarCodeTypeAndValueFromProduct").' &nbsp; '; print '<input id="fillfromproduct" type="radio" '.((GETPOST("selectorforbarcode")=='fillfromproduct')?'checked="checked" ':'').'name="selectorforbarcode" value="fillfromproduct" class="radiobarcodeselect"> '.$langs->trans("FillBarCodeTypeAndValueFromProduct").' &nbsp; ';
print '<br>'; print '<br>';
print '<div class="showforproductselector">'; print '<div class="showforproductselector">';
print $form->select_produits(GETPOST('productid'), 'productid', ''); $form->select_produits(GETPOST('productid'), 'productid', '');
print ' &nbsp; <input type="submit" id="submitproduct" name="submitproduct" class="button" value="'.(dol_escape_htmltag($langs->trans("GetBarCode"))).'">'; print ' &nbsp; <input type="submit" id="submitproduct" name="submitproduct" class="button" value="'.(dol_escape_htmltag($langs->trans("GetBarCode"))).'">';
print '</div>'; print '</div>';

View File

@ -38,8 +38,6 @@ function printBookmarksList($aDb, $aLangs)
require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
if (! isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) $conf->global->BOOKMARKS_SHOW_IN_MENU=5; if (! isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) $conf->global->BOOKMARKS_SHOW_IN_MENU=5;
$bookm = new Bookmark($db);
$langs->load("bookmarks"); $langs->load("bookmarks");
$url= $_SERVER["PHP_SELF"].(! empty($_SERVER["QUERY_STRING"])?'?'.$_SERVER["QUERY_STRING"]:''); $url= $_SERVER["PHP_SELF"].(! empty($_SERVER["QUERY_STRING"])?'?'.$_SERVER["QUERY_STRING"]:'');

View File

@ -94,9 +94,12 @@ if ($resql)
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
//print "<td>&nbsp;</td>"; //print "<td>&nbsp;</td>";
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bid","","",'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bid","","",'align="left"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Title"),'','')."</td>"; print_liste_field_titre($langs->trans("Title"),'','');
print_liste_field_titre($langs->trans("Link"),'','')."</td>"; print "</td>";
print_liste_field_titre($langs->trans("Target"),'','','','','align="center"')."</td>"; print_liste_field_titre($langs->trans("Link"),'','');
print "</td>";
print_liste_field_titre($langs->trans("Target"),'','','','','align="center"');
print "</td>";
print_liste_field_titre($langs->trans("Owner"),$_SERVER["PHP_SELF"],"u.lastname","","",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Owner"),$_SERVER["PHP_SELF"],"u.lastname","","",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"b.dateb","","",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"b.dateb","","",'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Position"),$_SERVER["PHP_SELF"],"b.position","","",'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Position"),$_SERVER["PHP_SELF"],"b.position","","",'align="right"',$sortfield,$sortorder);

View File

@ -31,7 +31,7 @@ $langs->load("bills");
function popupTicket() function popupTicket()
{ {
largeur = 600; largeur = 600;
hauteur = 500 hauteur = 500;
opt = 'width='+largeur+', height='+hauteur+', left='+(screen.width - largeur)/2+', top='+(screen.height-hauteur)/2+''; opt = 'width='+largeur+', height='+hauteur+', left='+(screen.width - largeur)/2+', top='+(screen.height-hauteur)/2+'';
window.open('validation_ticket.php?facid=<?php echo $_GET['facid']; ?>', '<?php echo $langs->trans('PrintTicket') ?>', opt); window.open('validation_ticket.php?facid=<?php echo $_GET['facid']; ?>', '<?php echo $langs->trans('PrintTicket') ?>', opt);
} }

View File

@ -278,7 +278,7 @@ if ($socid)
// Address // Address
print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3">'; print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3">';
print dol_print_address($soc->address,'gmap','thirdparty',$soc->id); dol_print_address($soc->address,'gmap','thirdparty',$soc->id);
print '</td></tr>'; print '</td></tr>';
// Zip / Town // Zip / Town
@ -609,7 +609,7 @@ else if ($id || $ref)
* @param Object $object Object we want to see categories it can be classified into * @param Object $object Object we want to see categories it can be classified into
* @param int $typeid Type of category (0, 1, 2, 3) * @param int $typeid Type of category (0, 1, 2, 3)
* @param int $socid Id thirdparty * @param int $socid Id thirdparty
* @param string $showclassifyform 1=Add form to 'Classify', 0=Do not show form to 'Classify' * @param int $showclassifyform 1=Add form to 'Classify', 0=Do not show form to 'Classify'
* @return int 0 * @return int 0
*/ */
function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1) function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1)

View File

@ -297,7 +297,6 @@ class Categorie extends CommonObject
// FIXME le hook fait double emploi avec le trigger !! // FIXME le hook fait double emploi avec le trigger !!
$hookmanager->initHooks(array('HookCategorydao')); $hookmanager->initHooks(array('HookCategorydao'));
$parameters=array(); $parameters=array();
$action='update';
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook)) if (empty($reshook))
{ {
@ -334,7 +333,7 @@ class Categorie extends CommonObject
* Delete a category from database * Delete a category from database
* *
* @param User $user Object user that ask to delete * @param User $user Object user that ask to delete
* @return void * @return int <0 KO >0 OK
*/ */
function delete($user) function delete($user)
{ {
@ -689,7 +688,9 @@ class Categorie extends CommonObject
*/ */
function containsObject($type, $object_id) function containsObject($type, $object_id)
{ {
$field = ''; $classname = ''; $category_table = ''; $object_table = ''; $field = '';
$category_table = '';
if ($type == 'product') { if ($type == 'product') {
$field = 'product'; $field = 'product';
} }
@ -726,7 +727,7 @@ class Categorie extends CommonObject
/** /**
* Return childs of a category * Return childs of a category
* *
* @return void * @return array|int <0 KO, array ok
*/ */
function get_filles() function get_filles()
{ {
@ -1045,7 +1046,7 @@ class Categorie extends CommonObject
* Retourne les categories de premier niveau (qui ne sont pas filles) * Retourne les categories de premier niveau (qui ne sont pas filles)
* *
* @param int $type Type of category * @param int $type Type of category
* @return void * @return array
*/ */
function get_main_categories($type=null) function get_main_categories($type=null)
{ {
@ -1058,7 +1059,7 @@ class Categorie extends CommonObject
* *
* @param string $sep Separator * @param string $sep Separator
* @param string $url Url * @param string $url Url
* @return void * @return array
*/ */
function print_all_ways($sep = " &gt;&gt; ", $url='') function print_all_ways($sep = " &gt;&gt; ", $url='')
{ {
@ -1088,7 +1089,7 @@ class Categorie extends CommonObject
/** /**
* Retourne un tableau contenant la liste des categories meres * Retourne un tableau contenant la liste des categories meres
* *
* @return void * @return int|array <0 KO, array OK
*/ */
function get_meres() function get_meres()
{ {
@ -1123,7 +1124,7 @@ class Categorie extends CommonObject
* Retourne dans un tableau tous les chemins possibles pour arriver a la categorie * Retourne dans un tableau tous les chemins possibles pour arriver a la categorie
* en partant des categories principales, representes par des tableaux de categories * en partant des categories principales, representes par des tableaux de categories
* *
* @return void * @return array
*/ */
function get_all_ways() function get_all_ways()
{ {
@ -1315,7 +1316,7 @@ class Categorie extends CommonObject
$originImage = $dir . $file['name']; $originImage = $dir . $file['name'];
// Cree fichier en taille origine // Cree fichier en taille origine
$result=dol_move_uploaded_file($file['tmp_name'], $originImage, 1, 0, 0); dol_move_uploaded_file($file['tmp_name'], $originImage, 1, 0, 0);
if (file_exists($originImage)) if (file_exists($originImage))
{ {
@ -1560,8 +1561,6 @@ class Categorie extends CommonObject
*/ */
function initAsSpecimen() function initAsSpecimen()
{ {
global $user,$langs,$conf;
dol_syslog(get_class($this)."::initAsSpecimen"); dol_syslog(get_class($this)."::initAsSpecimen");
// Initialise parametres // Initialise parametres

View File

@ -66,7 +66,9 @@ if ($id > 0)
if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC)) if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
{ {
if ($object->id) $result = $object->add_photo($upload_dir, $_FILES['userfile']); if ($object->id) {
$object->add_photo($upload_dir, $_FILES['userfile']);
}
} }
if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && $user->rights->categorie->creer) if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && $user->rights->categorie->creer)

View File

@ -2794,7 +2794,7 @@ class Form
* @param string $htmlname HTML field name * @param string $htmlname HTML field name
* @param int $maxlength Maximum length for labels * @param int $maxlength Maximum length for labels
* @param int $excludeafterid Exclude all categories after this leaf in category tree. * @param int $excludeafterid Exclude all categories after this leaf in category tree.
* @return void * @return string
* @see select_categories * @see select_categories
*/ */
function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0) function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0)