clean code

This commit is contained in:
Frédéric FRANCE 2021-06-06 21:40:47 +02:00
parent a586afd8b3
commit a06fb441d3
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
3 changed files with 11 additions and 15 deletions

View File

@ -19,7 +19,7 @@
*/
/**
* \file knowledgemanagement/knowledgemanagementindex.php
* \file htdocs/knowledgemanagement/knowledgemanagementindex.php
* \ingroup knowledgemanagement
* \brief Home page of knowledgemanagement top menu
*/
@ -148,13 +148,12 @@ END MODULEBUILDER DRAFT MYOBJECT */
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
$NBMAX = (empty($conf->global->MAIN_SIZE_SHORTLIST_LIMIT) ? 25 : $conf->global->MAIN_SIZE_SHORTLIST_LIMIT);
$max = $NBMAX;
/* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT
// Last modified myobject
if (! empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemanagement->read)
{
if (! empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemanagement->read) {
$sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms";
$sql.= " FROM ".MAIN_DB_PREFIX."knowledgemanagement_myobject as s";
//if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
@ -165,8 +164,7 @@ if (! empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemana
$sql .= $db->plimit($max, 0);
$resql = $db->query($sql);
if ($resql)
{
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
@ -177,10 +175,8 @@ if (! empty($conf->knowledgemanagement->enabled) && $user->rights->knowledgemana
print '</th>';
print '<th class="right">'.$langs->trans("DateModificationShort").'</th>';
print '</tr>';
if ($num)
{
while ($i < $num)
{
if ($num) {
while ($i < $num) {
$objp = $db->fetch_object($resql);
$myobjectstatic->id=$objp->rowid;

View File

@ -17,7 +17,7 @@
*/
/**
* \file knowledgerecord_note.php
* \file htdocs/knowledgemanagement/knowledgerecord_note.php
* \ingroup knowledgemanagement
* \brief Tab for notes on KnowledgeRecord
*/
@ -33,9 +33,9 @@ $langs->loadLangs(array("knowledgemanagement", "companies"));
// Get parameters
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'aZ09');
$cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
// Initialize technical objects

View File

@ -16,7 +16,7 @@
*/
/**
* \file knowledgemanagement/lib/knowledgemanagement.lib.php
* \file htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php
* \ingroup knowledgemanagement
* \brief Library files with common functions for KnowledgeManagement
*/