Cleanup: package info viewer moved to admin module.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 23 Jan 2015 21:19:46 +0000 (22:19 +0100)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Fri, 23 Jan 2015 21:19:46 +0000 (22:19 +0100)
admin/view/view_package.php [new file with mode: 0644]
includes/ui/ui_view.inc
includes/ui/view_package.php [deleted file]

diff --git a/admin/view/view_package.php b/admin/view/view_package.php
new file mode 100644 (file)
index 0000000..6d95772
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
+$page_security = 'SA_OPEN';
+$path_to_root = "../..";
+include_once($path_to_root . "/includes/session.inc");
+include_once($path_to_root . "/includes/packages.inc");
+
+page(_($help_context = "Package Details"), true);
+
+include_once($path_to_root . "/includes/ui.inc");
+
+if (!isset($_GET['id'])) 
+{
+       /*Script was not passed the correct parameters */
+       display_note(_("The script must be called with a valid package id to review the info for."));
+       end_page();
+}
+
+$filter = array(
+       'Version' => _('Available version'), 
+       'Type' => _('Package type'), 
+       'Name' => _('Package content'),
+       'Description' => _('Description'), 
+       'Author' => _('Author'), 
+       'Homepage' => _('Home page'),
+       'Maintenance' => _('Package maintainer'),
+       'InstallPath' => _('Installation path'),
+       'Depends' => _('Minimal software versions'),
+       'RTLDir' => _('Right to left'),
+       'Encoding' => _('Charset encoding')
+);
+
+$pkg = get_package_info($_GET['id'], null, $filter);
+
+display_heading(sprintf(_("Content information for package '%s'"), $_GET['id']));
+br();
+start_table(TABLESTYLE2, "width=80%");
+$th = array(_("Property"), _("Value"));
+table_header($th);
+
+foreach ($pkg as $field => $value) {
+       if ($value == '')
+               continue;
+       start_row();
+       label_cells($field, nl2br(html_specials_encode(is_array($value) ? implode("\n", $value) :$value)),
+                "class='tableheader2'");
+       end_row();
+}
+end_table(1);
+
+end_page(true);
index 8fee0ae0bf3c9b88a1cf3ea1843c3553ba6ad3f8..daa161be6ae3180436c9afe5791a210aed572179 100644 (file)
@@ -210,7 +210,7 @@ function get_package_view_str($pkg, $label="", $icon=false, $class='', $id='')
                $label = _("Info");
 //             $icon = ICON_GL;
        }
-       return viewer_link($label, "includes/ui/view_package.php?id=$pkg", $class, $id, $icon);
+       return viewer_link($label, "admin/view/view_package.php?id=$pkg", $class, $id, $icon);
 }
 
 
diff --git a/includes/ui/view_package.php b/includes/ui/view_package.php
deleted file mode 100644 (file)
index 6d95772..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/**********************************************************************
-    Copyright (C) FrontAccounting, LLC.
-       Released under the terms of the GNU General Public License, GPL, 
-       as published by the Free Software Foundation, either version 3 
-       of the License, or (at your option) any later version.
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
-    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
-***********************************************************************/
-$page_security = 'SA_OPEN';
-$path_to_root = "../..";
-include_once($path_to_root . "/includes/session.inc");
-include_once($path_to_root . "/includes/packages.inc");
-
-page(_($help_context = "Package Details"), true);
-
-include_once($path_to_root . "/includes/ui.inc");
-
-if (!isset($_GET['id'])) 
-{
-       /*Script was not passed the correct parameters */
-       display_note(_("The script must be called with a valid package id to review the info for."));
-       end_page();
-}
-
-$filter = array(
-       'Version' => _('Available version'), 
-       'Type' => _('Package type'), 
-       'Name' => _('Package content'),
-       'Description' => _('Description'), 
-       'Author' => _('Author'), 
-       'Homepage' => _('Home page'),
-       'Maintenance' => _('Package maintainer'),
-       'InstallPath' => _('Installation path'),
-       'Depends' => _('Minimal software versions'),
-       'RTLDir' => _('Right to left'),
-       'Encoding' => _('Charset encoding')
-);
-
-$pkg = get_package_info($_GET['id'], null, $filter);
-
-display_heading(sprintf(_("Content information for package '%s'"), $_GET['id']));
-br();
-start_table(TABLESTYLE2, "width=80%");
-$th = array(_("Property"), _("Value"));
-table_header($th);
-
-foreach ($pkg as $field => $value) {
-       if ($value == '')
-               continue;
-       start_row();
-       label_cells($field, nl2br(html_specials_encode(is_array($value) ? implode("\n", $value) :$value)),
-                "class='tableheader2'");
-       end_row();
-}
-end_table(1);
-
-end_page(true);