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 
178 
179 
183  function ShowMetaView($Upload, $Item)
184  {
185  $groupId = Auth::getGroupId();
186  $vars = [];
187  if (empty($Item) || empty($Upload)) {
188  return $vars;
189  }
190 
191  /* display mimetype */
192  $sql = "SELECT * FROM uploadtree where uploadtree_pk = $1";
193  $this->dbManager->prepare(__METHOD__ . "DisplayMimetype", $sql);
194  $result = $this->dbManager->execute(__METHOD__ . "DisplayMimetype", array($Item));
195  if (pg_num_rows($result)) {
196  $vars['fileInfo'] = 1;
197  $row = pg_fetch_assoc($result);
198 
199  if (! empty($row['mimetype_pk'])) {
200  $vars['displayMimeTypeName'] = $row['mimetype_name'];
201  }
202  } else {
203  // bad uploadtree_pk
204  $vars['fileInfo'] = 0;
205  return $vars;
206  }
207  $this->dbManager->freeResult($result);
208 
209  /* get mimetype */
210  if (! empty($row['pfile_fk'])) {
211  $sql = "select mimetype_name from pfile, mimetype where pfile_pk = $1 and pfile_mimetypefk=mimetype_pk";
212  $this->dbManager->prepare(__METHOD__ . "GetMimetype", $sql);
213  $result = $this->dbManager->execute(
214  __METHOD__ . "GetMimetype",
215  array($row['pfile_fk'])
216  );
217  if (pg_num_rows($result)) {
218  $pmRow = pg_fetch_assoc($result);
219  $vars['getMimeTypeName'] = $pmRow['mimetype_name'];
220  }
221  $this->dbManager->freeResult($result);
222  }
223  $pmRow = [];
224  // Check if ScanOSS is enabled
225  $sql = "SELECT agent_enabled FROM agent WHERE agent_name ='scanoss' ORDER BY agent_ts LIMIT 1;";
226  $row = $this->dbManager->getSingleRow($sql, [],
227  __METHOD__ . "checkScanOss");
228  if (!empty($row) && $row["agent_enabled"] == 't') {
229  $sql = "SELECT s.purl, s.matchtype, s.lineranges, s.url, s.filepath " .
230  "FROM scanoss_fileinfo s, uploadtree u where u.uploadtree_pk = $1 and s.pfile_fk = u.pfile_fk;";
231  $pmRow = $this->dbManager->getSingleRow($sql, [$Item],
232  __METHOD__ . "GetFileMatchInfo");
233  }
234  if (!empty($pmRow)) {
235  $vars['purl'] = $pmRow['purl'];
236  $vars['matchType'] = $pmRow['matchtype'];
237  $vars['lineRange'] = $pmRow['lineranges'];
238  $vars['url'] = $pmRow['url'];
239  $vars['path'] = $pmRow['filepath'];
240  $vars['scanossInfo'] = 1;
241  } else {
242  $vars['scanossInfo'] = 0;
243  }
244  /* display upload origin */
245  $sql = "select * from upload where upload_pk=$1";
246  $row = $this->dbManager->getSingleRow(
247  $sql,
248  array($row['upload_fk']),
249  __METHOD__ . "getUploadOrigin"
250  );
251  if ($row) {
252  /* upload source */
253  if ($row['upload_mode'] & 1 << 2) {
254  $text = _("Added by URL");
255  } elseif ($row['upload_mode'] & 1 << 3) {
256  $text = _("Added by file upload");
257  } elseif ($row['upload_mode'] & 1 << 4) {
258  $text = _("Added from filesystem");
259  }
260  $vars['fileUploadOriginInfo'] = $text;
261  $vars['fileUploadOrigin'] = $row['upload_origin'];
262 
263  /* upload time */
264  $ts = $row['upload_ts'];
265  $vars['fileUploadDate'] = substr($ts, 0, strrpos($ts, '.'));
266  }
267  /* display where it was uploaded from */
268  /* display upload owner*/
269  $sql = "SELECT user_name from users, upload where user_pk = user_fk and upload_pk = $1";
270  $row = $this->dbManager->getSingleRow($sql, array($Upload), __METHOD__ . "getUploadOwner");
271 
272  $vars['fileUploadUser'] = $row['user_name'];
273  $userId = $this->uploadDao->getAssignee($Upload, $groupId);
274  $vars['fileAssigneeUser'] = ($userId == 1) ? 'Unassigned' : $this->userDao->getUserName($userId);
275  $assignedDate = $this->uploadDao->getAssigneeDate($Upload);
276  $vars['fileAssigneeUserOn'] = empty($assignedDate) ? 'NA' : substr($assignedDate, 0, strrpos($assignedDate, '.'));
277  $vars['fileClearingDuration'] = $this->uploadDao->getClearingDuration($Upload)[0];
278 
279  return $vars;
280  } // ShowMetaView()
281 
286  function ShowPackageInfo($Upload, $Item, $ShowMenu = 0)
287  {
288  $vars = [];
289  $Require = "";
290  $MIMETYPE = "";
291  $Count = 0;
292 
293  $rpm_info = array("Package" => "pkg_name",
294  "Alias" => "pkg_alias",
295  "Architecture" => "pkg_arch",
296  "Version" => "version",
297  "License" => "license",
298  "Group" => "pkg_group",
299  "Packager" => "packager",
300  "Release" => "release",
301  "BuildDate" => "build_date",
302  "Vendor" => "vendor",
303  "URL" => "url",
304  "Summary" => "summary",
305  "Description" => "description",
306  "Source" => "source_rpm");
307 
308  $deb_binary_info = array("Package" => "pkg_name",
309  "Architecture" => "pkg_arch",
310  "Version" => "version",
311  "Section" => "section",
312  "Priority" => "priority",
313  "Installed Size" => "installed_size",
314  "Maintainer" => "maintainer",
315  "Homepage" => "homepage",
316  "Source" => "source",
317  "Summary" => "summary",
318  "Description" => "description");
319 
320  $deb_source_info = array("Format" => "format",
321  "Source" => "source",
322  "Binary" => "pkg_name",
323  "Architecture" => "pkg_arch",
324  "Version" => "version",
325  "Maintainer" => "maintainer",
326  "Uploaders" => "uploaders",
327  "Standards-Version" => "standards_version");
328 
329  if (empty($Item) || empty($Upload)) {
330  return $vars;
331  }
332 
333  /**********************************
334  Check if pkgagent disabled
335  ***********************************/
336  $sql = "SELECT agent_enabled FROM agent WHERE agent_name ='pkgagent' order by agent_ts LIMIT 1;";
337  $row = $this->dbManager->getSingleRow($sql, array(), __METHOD__ . "checkPkgagentDisabled");
338  if (isset($row) && ($row['agent_enabled'] == 'f')) {
339  return $vars;
340  }
341 
342  /* If pkgagent_ars table didn't exists, don't show the result. */
343  $sql = "SELECT typlen FROM pg_type where typname='pkgagent_ars' limit 1;";
344  $this->dbManager->prepare(__METHOD__ . "displayPackageInfo", $sql);
345  $result = $this->dbManager->execute(__METHOD__ . "displayPackageInfo", array());
346  $numrows = pg_num_rows($result);
347  $this->dbManager->freeResult($result);
348  if ($numrows <= 0) {
349  $vars['packageAgentNA'] = 1;
350  return $vars;
351  }
352 
353  /* If pkgagent_ars table didn't have record for this upload, don't show the result. */
354  $agent_status = AgentARSList('pkgagent_ars', $Upload);
355  if (empty($agent_status)) {
356  $vars['packageAgentStatus'] = 1;
357  $vars['trackback_uri'] = Traceback_uri() .
358  "?mod=schedule_agent&upload=$Upload&agent=agent_pkgagent";
359  return ($vars);
360  }
361  $sql = "SELECT mimetype_name
362  FROM uploadtree
363  INNER JOIN pfile ON uploadtree_pk = $1
364  AND pfile_fk = pfile_pk
365  INNER JOIN mimetype ON pfile_mimetypefk = mimetype_pk;";
366  $this->dbManager->prepare(__METHOD__ . "getMimetypeName", $sql);
367  $result = $this->dbManager->execute(__METHOD__ . "getMimetypeName", array($Item));
368  while ($row = pg_fetch_assoc($result)) {
369  if (! empty($row['mimetype_name'])) {
370  $MIMETYPE = $row['mimetype_name'];
371  }
372  }
373  $this->dbManager->freeResult($result);
374 
378  if ($MIMETYPE == "application/x-rpm") {
379  $sql = "SELECT *
380  FROM pkg_rpm
381  INNER JOIN uploadtree ON uploadtree_pk = $1
382  AND uploadtree.pfile_fk = pkg_rpm.pfile_fk;";
383  $R = $this->dbManager->getSingleRow($sql, array($Item), __METHOD__ . "getRPMPackageInfo");
384  if ((! empty($R['source_rpm'])) and (trim($R['source_rpm']) != "(none)")) {
385  $vars['packageType'] = _("RPM Binary Package");
386  } else {
387  $vars['packageType'] = _("RPM Source Package");
388  }
389  $Count = 1;
390 
391  if (! empty($R['pkg_pk'])) {
392  $Require = $R['pkg_pk'];
393  foreach ($rpm_info as $key => $value) {
394  $entry = [];
395  $entry['count'] = $Count;
396  $entry['type'] = _($key);
397  $entry['value'] = htmlentities($R["$value"]);
398  $Count++;
399  $vars['packageEntries'][] = $entry;
400  }
401 
402  $sql = "SELECT * FROM pkg_rpm_req WHERE pkg_fk = $1;";
403  $this->dbManager->prepare(__METHOD__ . "getPkg_rpm_req", $sql);
404  $result = $this->dbManager->execute(__METHOD__ . "getPkg_rpm_req", array($Require));
405 
406  while ($R = pg_fetch_assoc($result) and ! empty($R['req_pk'])) {
407  $entry = [];
408  $entry['count'] = $Count;
409  $entry['type'] = _("Requires");
410  $entry['value'] = htmlentities($R['req_value']);
411  $Count++;
412  $vars['packageRequires'][] = $entry;
413  }
414  $this->dbManager->freeResult($result);
415  }
416  } elseif ($MIMETYPE == "application/x-debian-package") {
417  $vars['packageType'] = _("Debian Binary Package\n");
418 
419  $sql = "SELECT *
420  FROM pkg_deb
421  INNER JOIN uploadtree ON uploadtree_pk = $1
422  AND uploadtree.pfile_fk = pkg_deb.pfile_fk;";
423  $R = $this->dbManager->getSingleRow($sql, array($Item), __METHOD__ . "debianBinaryPackageInfo");
424  $Count = 1;
425 
426  if ($R) {
427  $Require = $R['pkg_pk'];
428  foreach ($deb_binary_info as $key => $value) {
429  $entry = [];
430  $entry['count'] = $Count;
431  $entry['type'] = _($key);
432  $entry['value'] = htmlentities($R["$value"]);
433  $Count++;
434  $vars['packageEntries'][] = $entry;
435  }
436  pg_free_result($result);
437 
438  $sql = "SELECT * FROM pkg_deb_req WHERE pkg_fk = $1;";
439  $this->dbManager->prepare(__METHOD__ . "getPkg_rpm_req", $sql);
440  $result = $this->dbManager->execute(__METHOD__ . "getPkg_rpm_req", array($Require));
441 
442  while ($R = pg_fetch_assoc($result) and ! empty($R['req_pk'])) {
443  $entry = [];
444  $entry['count'] = $Count;
445  $entry['type'] = _("Depends");
446  $entry['value'] = htmlentities($R['req_value']);
447  $Count++;
448  $vars['packageRequires'][] = $entry;
449  }
450  $this->dbManager->freeResult($result);
451  }
452  $V .= "</table>\n";
453  } elseif ($MIMETYPE == "application/x-debian-source") {
454  $vars['packageType'] = _("Debian Source Package\n");
455 
456  $sql = "SELECT *
457  FROM pkg_deb
458  INNER JOIN uploadtree ON uploadtree_pk = $1
459  AND uploadtree.pfile_fk = pkg_deb.pfile_fk;";
460  $R = $this->dbManager->getSingleRow($sql, array($Item), __METHOD__ . "debianSourcePakcageInfo");
461  $Count = 1;
462 
463  if ($R) {
464  $Require = $R['pkg_pk'];
465  foreach ($deb_source_info as $key => $value) {
466  $entry = [];
467  $entry['count'] = $Count;
468  $entry['type'] = _($key);
469  $entry['value'] = htmlentities($R["$value"]);
470  $Count++;
471  $vars['packageEntries'][] = $entry;
472  }
473  pg_free_result($result);
474 
475  $sql = "SELECT * FROM pkg_deb_req WHERE pkg_fk = $1;";
476  $this->dbManager->prepare(__METHOD__ . "getPkg_rpm_req", $sql);
477  $result = $this->dbManager->execute(__METHOD__ . "getPkg_rpm_req", array($Require));
478 
479  while ($R = pg_fetch_assoc($result) and ! empty($R['req_pk'])) {
480  $entry = [];
481  $entry['count'] = $Count;
482  $entry['type'] = _("Build-Depends");
483  $entry['value'] = htmlentities($R['req_value']);
484  $Count++;
485  $vars['packageRequires'][] = $entry;
486  }
487  $this->dbManager->freeResult($result);
488  }
489  } else {
490  /* Not a package */
491  $vars['packageType'] = "";
492  }
493  return $vars;
494  } // ShowPackageInfo()
495 
496 
500  function ShowTagInfo($Upload, $Item)
501  {
502  $vars = [];
503  $groupId = Auth::getGroupId();
504  $row = $this->uploadDao->getUploadEntry($Item);
505  if (empty($row)) {
506  $vars['tagInvalid'] = 1;
507  return $vars;
508  }
509  $lft = $row["lft"];
510  $rgt = $row["rgt"];
511  $upload_pk = $row["upload_fk"];
512 
513  if (empty($lft)) {
514  $vars['tagInvalid'] = 2;
515  return $vars;
516  }
517  $sql = "SELECT * FROM uploadtree INNER JOIN (SELECT * FROM tag_file,tag WHERE tag_pk = tag_fk) T
518  ON uploadtree.pfile_fk = T.pfile_fk WHERE uploadtree.upload_fk = $1
519  AND uploadtree.lft >= $2 AND uploadtree.rgt <= $3 UNION SELECT * FROM uploadtree INNER JOIN
520  (SELECT * FROM tag_uploadtree,tag WHERE tag_pk = tag_fk) T ON uploadtree.uploadtree_pk = T.uploadtree_fk
521  WHERE uploadtree.upload_fk = $1 AND uploadtree.lft >= $2 AND uploadtree.rgt <= $3 ORDER BY ufile_name";
522  $this->dbManager->prepare(__METHOD__, $sql);
523  $result = $this->dbManager->execute(__METHOD__, array($upload_pk, $lft,$rgt));
524  if (pg_num_rows($result) > 0) {
525  while ($row = pg_fetch_assoc($result)) {
526  $entry = [];
527  $entry['ufile_name'] = $row['ufile_name'];
528  $entry['tag'] = $row['tag'];
529  if ($this->uploadDao->isAccessible($upload_pk, $groupId)) {
530  $entry['url'] = Traceback_uri() .
531  "?mod=tag&action=edit&upload=$Upload&item=" . $row['uploadtree_pk'] .
532  "&tag_file_pk=" . $row['tag_file_pk'];
533  } else {
534  $entry['url'] = "";
535  }
536  $vars['tagsEntries'][] = $entry;
537  }
538  }
539  $this->dbManager->freeResult($result);
540 
541  return $vars;
542  }
543 
549  function showReuseInfo($uploadId)
550  {
551  $vars = [];
552  $reusedInfo = $this->uploadDao->getReusedUpload(
553  $uploadId,
554  Auth::getGroupId()
555  );
556  foreach ($reusedInfo as $row) {
557  $entry = [];
558  $reuseUploadFk = $row['reused_upload_fk'];
559  $reuseGroupFk = $row['reused_group_fk'];
560  $reusedUpload = $this->uploadDao->getUpload($reuseUploadFk);
561  $reuseMode = array();
562  if ($row['reuse_mode'] & UploadDao::REUSE_ENHANCED) {
563  $reuseMode[] = "Enhanced";
564  } else {
565  $reuseMode[] = "Normal";
566  }
567  if ($row['reuse_mode'] & UploadDao::REUSE_MAIN) {
568  $reuseMode[] = "Main license";
569  }
570  if ($row['reuse_mode'] & UploadDao::REUSE_CONF) {
571  $reuseMode[] = "Report configuration settings";
572  }
573  $entry['name'] = $reusedUpload->getFilename();
574  $entry['url'] = Traceback_uri() .
575  "?mod=license&upload=$reuseUploadFk&item=" .
576  $this->uploadDao->getUploadParent($reuseUploadFk);
577  $entry['group'] = $this->userDao->getGroupNameById($reuseGroupFk) .
578  " ($reuseGroupFk)";
579  $entry['sha1'] = $this->uploadDao->getUploadHashes($reuseUploadFk)['sha1'];
580  $entry['mode'] = implode(", ", $reuseMode) . " reuse";
581 
582  $vars['reusedPackageList'][] = $entry;
583  }
584  return $vars;
585  }
586 
587  public function Output()
588  {
589  $uploadId = GetParm("upload", PARM_INTEGER);
590  if (!$this->uploadDao->isAccessible($uploadId, Auth::getGroupId())) {
591  return;
592  }
593 
594  $itemId = GetParm("item", PARM_INTEGER);
595  $this->vars['micromenu'] = Dir2Browse("browse", $itemId, null, $showBox = 0, "View-Meta");
596 
597  $this->vars += $this->ShowTagInfo($uploadId, $itemId);
598  $this->vars += $this->ShowPackageinfo($uploadId, $itemId, 1);
599  $this->vars += $this->ShowMetaView($uploadId, $itemId);
600  $this->vars += $this->ShowSightings($uploadId, $itemId);
601  $this->vars += $this->ShowView($uploadId, $itemId);
602  $this->vars += $this->showReuseInfo($uploadId);
603  }
604 
605  public function getTemplateName()
606  {
607  return "ui-view-info.html.twig";
608  }
609 }
610 $NewPlugin = new ui_view_info();
611 $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