This file is indexed.

/usr/bin/whups-convert-sql-shares-to-sqlng is in php-horde-whups 3.0.0-2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env php
<?php
/**
 * This script migrates Whups's share data from the SQL Horde_Share
 * driver to the next-generation SQL Horde_Share driver.
 *
 * It is supposed to run at any time after migrating Whups to the latest DB
 * schema version. The schema migration already migrates the data once, but
 * this script can be used to migrate the data again, e.g. if starting to use
 * the NG driver at a later time.
 */

/* Set up the CLI environment */
if (file_exists(__DIR__ . '/../../whups/lib/Application.php')) {
    $baseDir = __DIR__ . '/../';
} else {
    require_once 'PEAR/Config.php';
    $baseDir = PEAR_Config::singleton()
        ->get('horde_dir', null, 'pear.horde.org') . '/whups/';
}
require_once $baseDir . 'lib/Application.php';
Horde_Registry::appInit('whups', array('cli' => true));

require_once __DIR__ . '/../../migration/3_whups_upgrade_sqlng.php';

$db = $injector->getInstance('Horde_Db_Adapter');
$migration = new WhupsUpgradeSqlng($db);

$delete = $cli->prompt('Delete existing shares from the NEW backend before migrating the OLD backend? This should be done to avoid duplicate entries or primary key collisions in the storage backend from earlier migrations.', array('y' => 'Yes', 'n' => 'No'), 'n');

if ($delete == 'y' || $delete == 'Y') {
    $db->delete('DELETE FROM whups_sharesng');
    $db->delete('DELETE FROM whups_sharesng_users');
    $db->delete('DELETE FROM whups_sharesng_groups');
}

$migration->dataUp();