FOSSology  4.4.0
Open Source License Compliance by Open Source Software
ui-view-info.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2008-2014 Hewlett-Packard Development Company, L.P.
4  SPDX-FileCopyrightText: © 2015, 2018 Siemens AG
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 
13 
14 class ui_view_info extends FO_Plugin
15 {
19  private $uploadDao;
23  private $dbManager;
28  private $userDao;
29 
30  function __construct()
31  {
32  $this->Name = "view_info";
33  $this->Title = _("View File Information");
34  $this->Dependency = array("browse");
35  $this->DBaccess = PLUGIN_DB_READ;
36  $this->LoginFlag = 0;
37  parent::__construct();
38  $this->uploadDao = $GLOBALS['container']->get('dao.upload');
39  $this->dbManager = $GLOBALS['container']->get('db.manager');
40  $this->userDao = $GLOBALS['container']->get('dao.user');
41  }
42 
46  function RegisterMenus()
47  {
48  $tooltipText = _("View file information");
49  menu_insert("Browse-Pfile::Info", 5, $this->Name, $tooltipText);
50  // For the Browse menu, permit switching between detail and summary.
51  $Parm = Traceback_parm_keep(array("upload","item","format"));
52  $URI = $this->Name . $Parm;
53 
54  $menuPosition = 60;
55  $menuText = "Info";
56  if (GetParm("mod", PARM_STRING) == $this->Name) {
57  menu_insert("View::[BREAK]", 61);
58  menu_insert("View::[BREAK]", 50);
59  menu_insert("View::{$menuText}", $menuPosition);
60  menu_insert("View-Meta::[BREAK]", 61);
61  menu_insert("View-Meta::[BREAK]", 50);
62  menu_insert("View-Meta::{$menuText}", $menuPosition);
63 
64  menu_insert("Browse::Info", -3);
65  } else {
66  $tooltipText = _("View information about this file");
67  menu_insert("View::[BREAK]", 61);
68  menu_insert("View::[BREAK]", 50);
69  menu_insert("View::{$menuText}", $menuPosition, $URI, $tooltipText);
70  menu_insert("View-Meta::[BREAK]", 61);
71  menu_insert("View-Meta::[BREAK]", 50);
72  menu_insert("View-Meta::{$menuText}", $menuPosition, $URI, $tooltipText);
73 
74  menu_insert("Browse::Info", -3, $URI, $tooltipText);
75  }
76  } // RegisterMenus()
77 
81  function ShowView($Upload, $Item, $ShowMenu = 0)
82  {
83  $vars = [];
84  if (empty($Upload) || empty($Item)) {
85  return;
86  }
87 
88  $Page = GetParm("page", PARM_INTEGER);
89  if (empty($Page)) {
90  $Page = 0;
91  }
92  $vars['repoLocPage'] = $Page;
93 
99  if ($Page == 0) {
100  $sql = "SELECT * FROM uploadtree
101  INNER JOIN pfile ON uploadtree_pk = $1
102  AND pfile_fk = pfile_pk
103  LIMIT 1;";
104  $row = $this->dbManager->getSingleRow(
105  $sql,
106  array($Item),
107  __METHOD__ . "GetFileDescribingRow"
108  );
109  $bytes = $row['pfile_size'];
110  $bytesH = HumanSize($bytes);
111  $bytes = number_format($bytes, 0, "", ",") . ' B';
112  if ($bytesH == $bytes) {
113  $bytesH = "";
114  } else {
115  $bytesH = '(' . $bytesH . ')';
116  }
117  $vars['sizeInBytes'] = $bytes;
118  $vars['sizeInMB'] = $bytesH;
119  $vars['fileSha1'] = $row['pfile_sha1'];
120  $vars['fileMd5'] = $row['pfile_md5'];
121  $vars['fileSha256'] = $row['pfile_sha256'];
122  $vars['fileSize'] = $row['pfile_size'];
123  $vars['filePfileId'] = $row['pfile_fk'];
124  }
125  return $vars;
126  } // ShowView()
127 
131  function ShowSightings($Upload, $Item)
132  {
133  $v = "";
134  if (empty($Upload) || empty($Item)) {
135  return $vars;
136  }
137 
138  $page = GetParm("page", PARM_INTEGER);
139  if (empty($page)) {
140  $page = 0;
141  }
142  $MAX = 50;
143  $offset = $page * $MAX;
144  /**********************************
145  List the directory locations where this pfile is found
146  **********************************/
147  $sql = "SELECT * FROM pfile,uploadtree
148  WHERE pfile_pk=pfile_fk
149  AND pfile_pk IN
150  (SELECT pfile_fk FROM uploadtree WHERE uploadtree_pk = $1)
151  LIMIT $2 OFFSET $3";
152  $this->dbManager->prepare(__METHOD__ . "getListOfFiles", $sql);
153  $result = $this->dbManager->execute(__METHOD__ . "getListOfFiles", array($Item,$MAX,$offset));
154  $count = pg_num_rows($result);
155  if (($page > 0) || ($count >= $MAX)) {
156  $vMenu = "<p>\n" . MenuEndlessPage($page, ($count >= $MAX)) . "</p>\n";
157  } else {
158  $vMenu = "";
159  }
160  if ($count > 0) {
161  $v .= _("This exact file appears in the following locations:\n");
162  $v .= $vMenu;
163  $offset++;
164  $v .= Dir2FileList($result, "browse", "view", $offset);
165  $v .= $vMenu;
166  } elseif ($page > 0) {
167  $v .= _("End of listing.\n");
168  } else {
169  $v .= _("This file does not appear in any other known location.\n");
170  }
171  pg_free_result($result);
172 
173  $vars = [];
174  $vars['sightingsContent'] = $v;
175  return $vars;
176  } //ShowSightings()
177 
181  function ShowMetaView($Upload, $Item)
182  {
183  $vars = [];
184  if (empty($Item) || empty($Upload)) {
185  return $vars;
186  }
187 
188  /* display mimetype */
189  $sql = "SELECT * FROM uploadtree where uploadtree_pk = $1";
190  $this->dbManager->prepare(__METHOD__ . "DisplayMimetype", $sql);
191  $result = $this->dbManager->execute(__METHOD__ . "DisplayMimetype", array($Item));
192  if (pg_num_rows($result)) {
193  $vars['fileInfo'] = 1;
194  $row = pg_fetch_assoc($result);
195 
196  if (! empty($row['mimetype_pk'])) {
197  $vars['displayMimeTypeName'] = $row['mimetype_name'];
198  }
199  } else {
200  // bad uploadtree_pk
201  $vars['fileInfo'] = 0;
202  return $vars;
203  }
204  $this->dbManager->freeResult($result);
205 
206  /* get mimetype */
207  if (! empty($row['pfile_fk'])) {
208  $sql = "select mimetype_name from pfile, mimetype where pfile_pk = $1 and pfile_mimetypefk=mimetype_pk";
209  $this->dbManager->prepare(__METHOD__ . "GetMimetype", $sql);
210  $result = $this->dbManager->execute(
211  __METHOD__ . "GetMimetype",
212  array($row['pfile_fk'])
213  );
214  if (pg_num_rows($result)) {
215  $pmRow = pg_fetch_assoc($result);
216  $vars['getMimeTypeName'] = $pmRow['mimetype_name'];
217  }
218  $this->dbManager->freeResult($result);
219 
220  $pmRow = [];
221  // Check if ScanOSS is enabled
222  $sql = "SELECT agent_enabled FROM agent WHERE agent_name ='scanoss' ORDER BY agent_ts LIMIT 1;";
223  $row = $this->dbManager->getSingleRow($sql, [],
224  __METHOD__ . "checkScanOss");
225  if (!empty($row) && $row["agent_enabled"] == 't') {
226  $sql = "SELECT s.purl, s.matchtype, s.lineranges, s.url, s.filepath " .
227  "FROM scanoss_fileinfo s WHERE s.pfile_fk = $1;";
228  $pmRow = $this->dbManager->getSingleRow($sql, [$row['pfile_fk']],
229  __METHOD__ . "GetFileMatchInfo");
230  }
231  if (!empty($pmRow)) {
232  $vars['purl'] = $pmRow['purl'];
233  $vars['matchType'] = $pmRow['matchtype'];
234  $vars['lineRange'] = $pmRow['lineranges'];
235  $vars['url'] = $pmRow['url'];
236  $vars['path'] = $pmRow['filepath'];
237  $vars['scanossInfo'] = 1;
238  } else {
239  $vars['scanossInfo'] = 0;
240  }
241  }
242  /* display upload origin */
243  $sql = "select * from upload where upload_pk=$1";
244  $row = $this->dbManager->getSingleRow(
245  $sql,
246  array($row['upload_fk']),
247  __METHOD__ . "getUploadOrigin"
248  );
249  if ($row) {
250  /* upload source */
251  if ($row['upload_mode'] & 1 << 2) {
252  $text = _("Added by URL");
253  } elseif ($row['upload_mode'] & 1 << 3) {
254  $text = _("Added by file upload");
255  } elseif ($row['upload_mode'] & 1 << 4) {
256  $text = _("Added from filesystem");
257  }
258  $vars['fileUploadOriginInfo'] = $text;
259  $vars['fileUploadOrigin'] = $row['upload_origin'];
260 
261  /* upload time */
262  $ts = $row['upload_ts'];
263  $vars['fileUploadDate'] = substr($ts, 0, strrpos($ts, '.'));
264  }
265  /* display where it was uploaded from */
266 
267  /* display upload owner*/
268  $sql = "SELECT user_name from users, upload where user_pk = user_fk and upload_pk = $1";
269  $row = $this->dbManager->getSingleRow($sql, array($Upload), __METHOD__ . "getUploadOwner");
270 
271  $vars['fileUploadUser'] = $row['user_name'];
272 
273  return $vars;
274  } // ShowMetaView()
275 
280  function ShowPackageInfo($Upload, $Item, $ShowMenu = 0)
281  {
282  $vars = [];
283  $Require = "";
284  $MIMETYPE = "";
285  $Count = 0;
286 
287  $rpm_info = array("Package" => "pkg_name",
288  "Alias" => "pkg_alias",
289  "Architecture" => "pkg_arch",
290  "Version" => "version",
291  "License" => "license",
292  "Group" => "pkg_group",
293  "Packager" => "packager",
294  "Release" => "release",
295  "BuildDate" => "build_date",
296  "Vendor" => "vendor",
297  "URL" => "url",
298  "Summary" => "summary",
299  "Description" => "description",
300  "Source" => "source_rpm");
301 
302  $deb_binary_info = array("Package" => "pkg_name",
303  "Architecture" => "pkg_arch",
304  "Version" => "version",
305  "Section" => "section",
306  "Priority" => "priority",
307  "Installed Size" => "installed_size",
308  "Maintainer" => "maintainer",
309  "Homepage" => "homepage",
310  "Source" => "source",
311  "Summary" => "summary",
312  "Description" => "description");
313 
314  $deb_source_info = array("Format" => "format",
315  "Source" => "source",
316  "Binary" => "pkg_name",
317  "Architecture" => "pkg_arch",
318  "Version" => "version",
319  "Maintainer" => "maintainer",
320  "Uploaders" => "uploaders",
321  "Standards-Version" => "standards_version");
322 
323  if (empty($Item) || empty($Upload)) {
324  return $vars;
325  }
326 
327  /**********************************
328  Check if pkgagent disabled
329  ***********************************/
330  $sql = "SELECT agent_enabled FROM agent WHERE agent_name ='pkgagent' order by agent_ts LIMIT 1;";
331  $row = $this->dbManager->getSingleRow($sql, array(), __METHOD__ . "checkPkgagentDisabled");
332  if (isset($row) && ($row['agent_enabled'] == 'f')) {
333  return $vars;
334  }
335 
336  /* If pkgagent_ars table didn't exists, don't show the result. */
337  $sql = "SELECT typlen FROM pg_type where typname='pkgagent_ars' limit 1;";
338  $this->dbManager->prepare(__METHOD__ . "displayPackageInfo", $sql);
339  $result = $this->dbManager->execute(__METHOD__ . "displayPackageInfo", array());
340  $numrows = pg_num_rows($result);
341  $this->dbManager->freeResult($result);
342  if ($numrows <= 0) {
343  $vars['packageAgentNA'] = 1;
344  return $vars;
345  }
346 
347  /* If pkgagent_ars table didn't have record for this upload, don't show the result. */
348  $agent_status = AgentARSList('pkgagent_ars', $Upload);
349  if (empty($agent_status)) {
350  $vars['packageAgentStatus'] = 1;
351  $vars['trackback_uri'] = Traceback_uri() .
352  "?mod=schedule_agent&upload=$Upload&agent=agent_pkgagent";
353  return ($vars);
354  }
355  $sql = "SELECT mimetype_name
356  FROM uploadtree
357  INNER JOIN pfile ON uploadtree_pk = $1
358  AND pfile_fk = pfile_pk
359  INNER JOIN mimetype ON pfile_mimetypefk = mimetype_pk;";
360  $this->dbManager->prepare(__METHOD__ . "getMimetypeName", $sql);
361  $result = $this->dbManager->execute(__METHOD__ . "getMimetypeName", array($Item));
362  while ($row = pg_fetch_assoc($result)) {
363  if (! empty($row['mimetype_name'])) {
364  $MIMETYPE = $row['mimetype_name'];
365  }
366  }
367  $this->dbManager->freeResult($result);
368 
372  if ($MIMETYPE == "application/x-rpm") {
373  $sql = "SELECT *
374  FROM pkg_rpm
375  INNER JOIN uploadtree ON uploadtree_pk = $1
376  AND uploadtree.pfile_fk = pkg_rpm.pfile_fk;";
377  $R = $this->dbManager->getSingleRow($sql, array($Item), __METHOD__ . "getRPMPackageInfo");
378  if ((! empty($R['source_rpm'])) and (trim($R['source_rpm']) != "(none)")) {
379  $vars['packageType'] = _("RPM Binary Package");
380  } else {
381  $vars['packageType'] = _("RPM Source Package");
382  }
383  $Count = 1;
384 
385  if (! empty($R['pkg_pk'])) {
386  $Require = $R['pkg_pk'];
387  foreach ($rpm_info as $key => $value) {
388  $entry = [];
389  $entry['count'] = $Count;
390  $entry['type'] = _($key);
391  $entry['value'] = htmlentities($R["$value"]);
392  $Count++;
393  $vars['packageEntries'][] = $entry;
394  }
395 
396  $sql = "SELECT * FROM pkg_rpm_req WHERE pkg_fk = $1;";
397  $this->dbManager->prepare(__METHOD__ . "getPkg_rpm_req", $sql);
398  $result = $this->dbManager->execute(__METHOD__ . "getPkg_rpm_req", array($Require));
399 
400  while ($R = pg_fetch_assoc($result) and ! empty($R['req_pk'])) {
401  $entry = [];
402  $entry['count'] = $Count;
403  $entry['type'] = _("Requires");
404  $entry['value'] = htmlentities($R['req_value']);
405  $Count++;
406  $vars['packageRequires'][] = $entry;
407  }
408  $this->dbManager->freeResult($result);
409  }
410  } elseif ($MIMETYPE == "application/x-debian-package") {
411  $vars['packageType'] = _("Debian Binary Package\n");
412 
413  $sql = "SELECT *
414  FROM pkg_deb
415  INNER JOIN uploadtree ON uploadtree_pk = $1
416  AND uploadtree.pfile_fk = pkg_deb.pfile_fk;";
417  $R = $this->dbManager->getSingleRow($sql, array($Item), __METHOD__ . "debianBinaryPackageInfo");
418  $Count = 1;
419 
420  if ($R) {
421  $Require = $R['pkg_pk'];
422  foreach ($deb_binary_info as $key => $value) {
423  $entry = [];
424  $entry['count'] = $Count;
425  $entry['type'] = _($key);
426  $entry['value'] = htmlentities($R["$value"]);
427  $Count++;
428  $vars['packageEntries'][] = $entry;
429  }
430  pg_free_result($result);
431 
432  $sql = "SELECT * FROM pkg_deb_req WHERE pkg_fk = $1;";
433  $this->dbManager->prepare(__METHOD__ . "getPkg_rpm_req", $sql);
434  $result = $this->dbManager->execute(__METHOD__ . "getPkg_rpm_req", array($Require));
435 
436  while ($R = pg_fetch_assoc($result) and ! empty($R['req_pk'])) {
437  $entry = [];
438  $entry['count'] = $Count;
439  $entry['type'] = _("Depends");
440  $entry['value'] = htmlentities($R['req_value']);
441  $Count++;
442  $vars['packageRequires'][] = $entry;
443  }
444  $this->dbManager->freeResult($result);
445  }
446  $V .= "</table>\n";
447  } elseif ($MIMETYPE == "application/x-debian-source") {
448  $vars['packageType'] = _("Debian Source Package\n");
449 
450  $sql = "SELECT *
451  FROM pkg_deb
452  INNER JOIN uploadtree ON uploadtree_pk = $1
453  AND uploadtree.pfile_fk = pkg_deb.pfile_fk;";
454  $R = $this->dbManager->getSingleRow($sql, array($Item), __METHOD__ . "debianSourcePakcageInfo");
455  $Count = 1;
456 
457  if ($R) {
458  $Require = $R['pkg_pk'];
459  foreach ($deb_source_info as $key => $value) {
460  $entry = [];
461  $entry['count'] = $Count;
462  $entry['type'] = _($key);
463  $entry['value'] = htmlentities($R["$value"]);
464  $Count++;
465  $vars['packageEntries'][] = $entry;
466  }
467  pg_free_result($result);
468 
469  $sql = "SELECT * FROM pkg_deb_req WHERE pkg_fk = $1;";
470  $this->dbManager->prepare(__METHOD__ . "getPkg_rpm_req", $sql);
471  $result = $this->dbManager->execute(__METHOD__ . "getPkg_rpm_req", array($Require));
472 
473  while ($R = pg_fetch_assoc($result) and ! empty($R['req_pk'])) {
474  $entry = [];
475  $entry['count'] = $Count;
476  $entry['type'] = _("Build-Depends");
477  $entry['value'] = htmlentities($R['req_value']);
478  $Count++;
479  $vars['packageRequires'][] = $entry;
480  }
481  $this->dbManager->freeResult($result);
482  }
483  } else {
484  /* Not a package */
485  $vars['packageType'] = "";
486  }
487  return $vars;
488  } // ShowPackageInfo()
489 
490 
494  function ShowTagInfo($Upload, $Item)
495  {
496  $vars = [];
497  $groupId = Auth::getGroupId();
498  $row = $this->uploadDao->getUploadEntry($Item);
499  if (empty($row)) {
500  $vars['tagInvalid'] = 1;
501  return $vars;
502  }
503  $lft = $row["lft"];
504  $rgt = $row["rgt"];
505  $upload_pk = $row["upload_fk"];
506 
507  if (empty($lft)) {
508  $vars['tagInvalid'] = 2;
509  return $vars;
510  }
511  $sql = "SELECT * FROM uploadtree INNER JOIN (SELECT * FROM tag_file,tag WHERE tag_pk = tag_fk) T
512  ON uploadtree.pfile_fk = T.pfile_fk WHERE uploadtree.upload_fk = $1
513  AND uploadtree.lft >= $2 AND uploadtree.rgt <= $3 UNION SELECT * FROM uploadtree INNER JOIN
514  (SELECT * FROM tag_uploadtree,tag WHERE tag_pk = tag_fk) T ON uploadtree.uploadtree_pk = T.uploadtree_fk
515  WHERE uploadtree.upload_fk = $1 AND uploadtree.lft >= $2 AND uploadtree.rgt <= $3 ORDER BY ufile_name";
516  $this->dbManager->prepare(__METHOD__, $sql);
517  $result = $this->dbManager->execute(__METHOD__, array($upload_pk, $lft,$rgt));
518  if (pg_num_rows($result) > 0) {
519  while ($row = pg_fetch_assoc($result)) {
520  $entry = [];
521  $entry['ufile_name'] = $row['ufile_name'];
522  $entry['tag'] = $row['tag'];
523  if ($this->uploadDao->isAccessible($upload_pk, $groupId)) {
524  $entry['url'] = Traceback_uri() .
525  "?mod=tag&action=edit&upload=$Upload&item=" . $row['uploadtree_pk'] .
526  "&tag_file_pk=" . $row['tag_file_pk'];
527  } else {
528  $entry['url'] = "";
529  }
530  $vars['tagsEntries'][] = $entry;
531  }
532  }
533  $this->dbManager->freeResult($result);
534 
535  return $vars;
536  }
537 
543  function showReuseInfo($uploadId)
544  {
545  $vars = [];
546  $reusedInfo = $this->uploadDao->getReusedUpload(
547  $uploadId,
548  Auth::getGroupId()
549  );
550  foreach ($reusedInfo as $row) {
551  $entry = [];
552  $reuseUploadFk = $row['reused_upload_fk'];
553  $reuseGroupFk = $row['reused_group_fk'];
554  $reusedUpload = $this->uploadDao->getUpload($reuseUploadFk);
555  $reuseMode = array();
556  if ($row['reuse_mode'] & UploadDao::REUSE_ENHANCED) {
557  $reuseMode[] = "Enhanced";
558  } else {
559  $reuseMode[] = "Normal";
560  }
561  if ($row['reuse_mode'] & UploadDao::REUSE_MAIN) {
562  $reuseMode[] = "Main license";
563  }
564  if ($row['reuse_mode'] & UploadDao::REUSE_CONF) {
565  $reuseMode[] = "Report configuration settings";
566  }
567  $entry['name'] = $reusedUpload->getFilename();
568  $entry['url'] = Traceback_uri() .
569  "?mod=license&upload=$reuseUploadFk&item=" .
570  $this->uploadDao->getUploadParent($reuseUploadFk);
571  $entry['group'] = $this->userDao->getGroupNameById($reuseGroupFk) .
572  " ($reuseGroupFk)";
573  $entry['sha1'] = $this->uploadDao->getUploadHashes($reuseUploadFk)['sha1'];
574  $entry['mode'] = implode(", ", $reuseMode) . " reuse";
575 
576  $vars['reusedPackageList'][] = $entry;
577  }
578  return $vars;
579  }
580 
581  public function Output()
582  {
583  $uploadId = GetParm("upload", PARM_INTEGER);
584  if (!$this->uploadDao->isAccessible($uploadId, Auth::getGroupId())) {
585  return;
586  }
587 
588  $itemId = GetParm("item", PARM_INTEGER);
589  $this->vars['micromenu'] = Dir2Browse("browse", $itemId, null, $showBox = 0, "View-Meta");
590 
591  $this->vars += $this->ShowTagInfo($uploadId, $itemId);
592  $this->vars += $this->ShowPackageinfo($uploadId, $itemId, 1);
593  $this->vars += $this->ShowMetaView($uploadId, $itemId);
594  $this->vars += $this->ShowSightings($uploadId, $itemId);
595  $this->vars += $this->ShowView($uploadId, $itemId);
596  $this->vars += $this->showReuseInfo($uploadId);
597  }
598 
599  public function getTemplateName()
600  {
601  return "ui-view-info.html.twig";
602  }
603 }
604 $NewPlugin = new ui_view_info();
605 $NewPlugin->Initialize();
This is the Plugin class. All plugins should:
Definition: FO_Plugin.php:57
Contains the constants and helpers for authentication of user.
Definition: Auth.php:24
ShowMetaView($Upload, $Item)
Display the meta data associated with the file.
ShowPackageInfo($Upload, $Item, $ShowMenu=0)
Display the package info associated with the rpm/debian package.
Output()
This function is called when user output is requested. This function is responsible for content....
ShowView($Upload, $Item, $ShowMenu=0)
Display the info data associated with the file.
ShowTagInfo($Upload, $Item)
Display the tag info data associated with the file.
showReuseInfo($uploadId)
Get the info regarding reused package.
ShowSightings($Upload, $Item)
Show Sightings, List the directory locations where this pfile is found.
RegisterMenus()
Customize submenus.
__construct()
base constructor. Most plugins will just use this
Dir2FileList(&$Listing, $IfDirPlugin, $IfFilePlugin, $Count=-1, $ShowPhrase=0)
Given an array of pfiles/uploadtree, sorted by pfile, list all of the breadcrumbs for each file....
Definition: common-dir.php:403
Dir2Browse($Mod, $UploadtreePk, $LinkLast=NULL, $ShowBox=1, $ShowMicro=NULL, $Enumerate=-1, $PreText='', $PostText='', $uploadtree_tablename="uploadtree")
Get an html linked string of a file browse path.
Definition: common-dir.php:263
MenuEndlessPage($Page, $Next=1, $Uri='')
Create a "First Prev 1 2 ... Next" page links for paged output.
menu_insert($Path, $LastOrder=0, $URI=NULL, $Title=NULL, $Target=NULL, $HTML=NULL)
Given a Path, order level for the last item, and optional plugin name, insert the menu item.
Traceback_uri()
Get the URI without query to this location.
Definition: common-parm.php:97
const PARM_INTEGER
Definition: common-parm.php:14
const PARM_STRING
Definition: common-parm.php:18
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
Definition: common-parm.php:46
Traceback_parm_keep($List)
Create a new URI, keeping only these items.
HumanSize( $bytes)
Translate a byte number to a proper type, xxx bytes to xxx B/KB/MB/GB/TB/PB.
Definition: common-ui.php:100
char * trim(char *ptext)
Trimming whitespace.
Definition: fossconfig.c:690
#define PLUGIN_DB_READ
Plugin requires read permission on DB.
Definition: libfossology.h:37
fo_dbManager * dbManager
fo_dbManager object
Definition: process.c:16