3 set_include_path(get_include_path() . PATH_SEPARATOR
. '../lib');
5 include_once("aur.inc.php");
6 include_once("pkgfuncs.inc.php");
11 html_header(__("Package Merging"));
13 if (has_credential(CRED_PKGBASE_DELETE
)): ?
>
15 <h2
><?
= __('Merge Package: %s', htmlspecialchars($pkgbase_name)) ?
></h2
>
17 <?
= __('Use this form to merge the package base %s%s%s into another package. ',
18 '<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?
>
19 <?
= __('The following packages will be deleted: '); ?
>
22 <?php
foreach(pkgbase_get_pkgnames($base_id) as $pkgname): ?
>
23 <li
><?
= htmlspecialchars($pkgname) ?
></li
>
27 <?
= __('Once the package has been merged it cannot be reversed. '); ?
>
28 <?
= __('Enter the package name you wish to merge the package into. '); ?
>
29 <?
= __('Select the checkbox to confirm action.') ?
>
31 <form action
="<?= get_uri('/pkgbase/'); ?>" method
="post">
33 <input type
="hidden" name
="IDs[<?= $base_id ?>]" value
="1" />
34 <input type
="hidden" name
="ID" value
="<?= $base_id ?>" />
35 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
36 <?php
if (isset($_GET['via'])): ?
>
37 <input type
="hidden" name
="via" value
="<?= intval($_GET['via']) ?>" />
39 <script type
="text/javascript" src
="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script
>
40 <script type
="text/javascript" src
="/js/bootstrap-typeahead.min.js"></script
>
41 <script type
="text/javascript">
42 $
(document
).ready(function() {
43 $
('#merge_Into').typeahead({
44 source
: function(query
, callback
) {
45 $
.getJSON('<?= get_uri('/rpc
'); ?>', {type
: "suggest-pkgbase", arg
: query
}, function(data
) {
49 matcher
: function(item
) { return true; },
50 sorter
: function(items
) { return items
; },
51 menu
: '<ul class="pkgsearch-typeahead"></ul>',
53 }).attr('autocomplete', 'off');
56 <p
><label
for="merge_Into" ><?
= __("Merge into:") ?
></label
>
57 <input type
="text" id
="merge_Into" name
="merge_Into" value
="<?= isset($_GET['into']) ? $_GET['into'] : '' ?>" /></p
>
58 <p
><input type
="checkbox" name
="confirm_Delete" value
="1" />
59 <?
= __("Confirm package merge") ?
></p
>
60 <p
><input type
="submit" class="button" name
="do_Delete" value
="<?= __("Merge
") ?>" /></p
>
66 print __("Only Trusted Users and Developers can merge packages.");
69 html_footer(AURWEB_VERSION
);