From 647955fdf07f7b5a2464a2da8a14fde73a887ebc Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Fri, 27 Oct 2017 12:26:47 -0400 Subject: [PATCH] Delete unused files --- install/mods-for-hesk/index.html | 12 - install/mods-for-hesk/installModsForHesk.php | 182 -------------- install/mods-for-hesk/js/ui-scripts.js | 109 --------- install/mods-for-hesk/js/version-scripts.js | 230 ----------------- install/mods-for-hesk/modsForHesk.php | 245 ------------------- 5 files changed, 778 deletions(-) delete mode 100644 install/mods-for-hesk/index.html delete mode 100644 install/mods-for-hesk/installModsForHesk.php delete mode 100644 install/mods-for-hesk/js/ui-scripts.js delete mode 100644 install/mods-for-hesk/js/version-scripts.js delete mode 100644 install/mods-for-hesk/modsForHesk.php diff --git a/install/mods-for-hesk/index.html b/install/mods-for-hesk/index.html deleted file mode 100644 index cf048141..00000000 --- a/install/mods-for-hesk/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/install/mods-for-hesk/installModsForHesk.php b/install/mods-for-hesk/installModsForHesk.php deleted file mode 100644 index cae36a82..00000000 --- a/install/mods-for-hesk/installModsForHesk.php +++ /dev/null @@ -1,182 +0,0 @@ - 'Pre-1.4.0', - 3 => '1.4.0', - 4 => '1.4.1', - 5 => '1.5.0', - 6 => '1.6.0', - 7 => '1.6.1', - 8 => '1.7.0', - 9 => '2.0.0', - 10 => '2.0.1', - 11 => '2.1.0', - 12 => '2.1.1', - 13 => '2.2.0', - 14 => '2.2.1', - 15 => '2.3.0', - 16 => '2.3.1', - 17 => '2.3.2', - 18 => '2.4.0', - 19 => '2.4.1', - 20 => '2.4.2', - 21 => '2.5.0', - 22 => '2.5.1', - 23 => '2.5.2', - 24 => '2.5.3', - 25 => '2.5.4', - 26 => '2.5.5', - 27 => '2.6.0', - 28 => '2.6.1', - 29 => '2.6.2', - 30 => '2.6.3', - 31 => '2.6.4', - 32 => '3.0.0 beta 1', - 33 => '3.0.0 RC 1', - 34 => '3.0.0', - 35 => '3.0.1', - 36 => '3.0.2', - 37 => '3.0.3', - 38 => '3.0.4', - 39 => '3.0.5', - 40 => '3.0.6', - 41 => '3.0.7', - 42 => '3.1.0', - 43 => '3.1.1', -); - -function echoInitialVersionRows($version, $build_to_version_map) -{ - foreach ($build_to_version_map as $build => $display_text) { - if ($version < $build) { - printRow($display_text); - } - } -} - -function printRow($version) -{ - $versionId = str_replace('.', '', $version); - $versionId = str_replace('Pre-', 'p', $versionId); - $versionId = str_replace(' beta ', 'b', $versionId); - $versionId = str_replace(' RC ', 'rc', $versionId); - echo ''; - echo '' . $version . ''; - echo ' Waiting...'; - echo ''; -} - -?> - - - Installing / Updating Mods for HESK - - - - - - - - - - - - - -
Installing / Updating Mods for HESK
-
- -
-
-
-
Installation Progress
-
- - - - - - - - - - -
VersionStatus
- - - - - - - - - - - - - - - - - - - - -
TaskStatus
Migrate IP / Email Bans Waiting...
Initialize Statuses Waiting...
- -
-
-
-
- -
-
-
-
Console
-
- - - - - - - - -
SeverityMessage
-
-
-
-
-
- - - \ No newline at end of file diff --git a/install/mods-for-hesk/js/ui-scripts.js b/install/mods-for-hesk/js/ui-scripts.js deleted file mode 100644 index 2d061c64..00000000 --- a/install/mods-for-hesk/js/ui-scripts.js +++ /dev/null @@ -1,109 +0,0 @@ -function disableAllDisablable(exclusion) { - $('.disablable').attr('disabled', 'disabled'); - $('#' + exclusion).removeAttr('disabled'); -} - -function enableAllDisablable() { - $('.disablable').removeAttr('disabled'); - $('#updateText').hide(); -} - -function updateLink() { - var version = $('select[name="current-version"]').val(); - var format = 'installModsForHesk.php?v={0}'; - - var formattedLink = format.replace('{0}', version); - $('#upgrade-link').attr('href', formattedLink); -} - -function startVersionUpgrade(version) { - $('#spinner-' + version) - .removeClass('fa-exclamation-triangle') - .addClass('fa-spinner') - .addClass('fa-pulse'); - changeRowTo('row', version, 'info'); - changeTextTo('span', version, 'In Progress'); -} - -function markUpdateAsSuccess(version, formattedVersion) { - removeSpinner(version); - $('#spinner-' + version).addClass('fa-check-circle'); - changeTextTo('span', version, 'Completed Successfully'); - changeRowTo('row', version, 'success'); - appendToInstallConsole('SUCCESSUpdates for ' + formattedVersion + ' complete'); -} - -function removeSpinner(version) { - $('#spinner-' + version) - .removeClass('fa-pulse') - .removeClass('fa-spinner'); -} - -function markUpdateAsAttention(version) { - removeSpinner(version); - $('#spinner-' + version).addClass('fa-exclamation-triangle'); - changeRowTo('row', version, 'warning'); - changeTextTo('span', version, 'Attention! See below for more information'); -} - -function markUpdateAsFailure(version) { - removeSpinner(version); - $('#spinner-' + version).addClass('fa-times-circle'); - changeRowTo('row', version, 'danger'); - changeTextTo('span', version, 'Update failed! Check the console for more information'); -} - -function changeTextTo(prefix, version, text) { - $('#' + prefix + '-' + version).text(text); -} - -function changeRowTo(prefix, version, clazz) { - //-- Remove all classes - $('#' + prefix + '-' + version) - .removeClass('info') - .removeClass('warning') - .removeClass('danger') - .removeClass('success'); - - //-- Re-add the requested class - $('#' + prefix + '-' + version).addClass(clazz); -} - -function appendToInstallConsole(text) { - $('#consoleBody').append(text); -} - -function installationFinished() { - appendToInstallConsole('SUCCESSInstallation complete'); - var output = '
' + - '
' + - '

' + - '

Awesome! The installation / upgrade has completed. Please delete the install directory and then proceed to your helpdesk!

' + - '
' + - '
'; - $('#install-information').html(output); -} - -function getContentForMigratePrompt(users) { - var beginningText = '

Migrating IP / E-mail Bans

Mods for HESK has detected that you have added IP address ' + - 'and/or email bans using Mods for HESK. As part of the upgrade process, Mods for HESK will migrate these bans ' + - 'for you to HESK 2.6.0\'s IP/email ban feature. Select the user below that will be the "creator" of the bans, ' + - 'then click "Submit".

'; - var selectMarkup = '
User:
' + - '

'; - var submitMarkup = '
' + - 'Don\'t Migrate
'; - - return beginningText + selectMarkup + submitMarkup; -} - -function prepareAttentionPanel(content) { - $('#attention-body').html(content); - $('#attention-row').show(); -} - -jQuery(document).ready(loadJquery); \ No newline at end of file diff --git a/install/mods-for-hesk/js/version-scripts.js b/install/mods-for-hesk/js/version-scripts.js deleted file mode 100644 index a7a9d1fc..00000000 --- a/install/mods-for-hesk/js/version-scripts.js +++ /dev/null @@ -1,230 +0,0 @@ -function processUpdates(startingVersion) { - if (startingVersion < 2) { - startVersionUpgrade('p140'); - executeUpdate(2, 'p140', 'Pre 1.4.0'); - } else if (startingVersion < 3) { - startVersionUpgrade('140'); - executeUpdate(3, '140', '1.4.0'); - } else if (startingVersion < 4) { - startVersionUpgrade('141'); - executeUpdate(4, '141', '1.4.1'); - } else if (startingVersion < 5) { - startVersionUpgrade('150'); - executeUpdate(5, '150', '1.5.0'); - } else if (startingVersion < 6) { - startVersionUpgrade('160'); - executeUpdate(6, '160', '1.6.0'); - } else if (startingVersion < 7) { - startVersionUpgrade('161'); - executeUpdate(7, '161', '1.6.1'); - } else if (startingVersion < 8) { - startVersionUpgrade('170'); - executeUpdate(8, '170', '1.7.0'); - } else if (startingVersion < 9) { - startVersionUpgrade('200'); - executeUpdate(9, '200', '2.0.0'); - } else if (startingVersion < 10) { - startVersionUpgrade('201'); - executeUpdate(10, '201', '2.0.1'); - } else if (startingVersion < 11) { - startVersionUpgrade('210'); - executeUpdate(11, '210', '2.1.0'); - } else if (startingVersion < 12) { - startVersionUpgrade('211'); - executeUpdate(12, '211', '2.1.1'); - } else if (startingVersion < 13) { - startVersionUpgrade('220'); - executeUpdate(13, '220', '2.2.0'); - } else if (startingVersion < 14) { - startVersionUpgrade('221'); - executeUpdate(14, '221', '2.2.1'); - } else if (startingVersion < 15) { - startVersionUpgrade('230'); - executeUpdate(15, '230', '2.3.0'); - } else if (startingVersion < 16) { - startVersionUpgrade('231'); - executeUpdate(16, '231', '2.3.1'); - } else if (startingVersion < 17) { - startVersionUpgrade('232'); - executeUpdate(17, '232', '2.3.2'); - } else if (startingVersion < 18) { - startVersionUpgrade('240'); - executeUpdate(18, '240', '2.4.0'); - } else if (startingVersion < 19) { - startVersionUpgrade('241'); - executeUpdate(19, '241', '2.4.1'); - } else if (startingVersion < 20) { - startVersionUpgrade('242'); - executeUpdate(20, '242', '2.4.2'); - } else if (startingVersion < 21) { - startVersionUpgrade('250'); - executeUpdate(21, '250', '2.5.0'); - } else if (startingVersion < 22) { - startVersionUpgrade('251'); - executeUpdate(22, '251', '2.5.1'); - } else if (startingVersion < 23) { - startVersionUpgrade('252'); - executeUpdate(23, '252', '2.5.2'); - } else if (startingVersion < 24) { - startVersionUpgrade('253'); - executeUpdate(24, '253', '2.5.3'); - } else if (startingVersion < 25) { - startVersionUpgrade('254'); - executeUpdate(25, '254', '2.5.4'); - } else if (startingVersion < 26) { - startVersionUpgrade('255'); - executeUpdate(26, '255', '2.5.5'); - } else if (startingVersion < 27) { - startVersionUpgrade('260'); - executeUpdate(27, '260', '2.6.0'); - } else if (startingVersion < 28) { - startVersionUpgrade('261'); - executeUpdate(28, '261', '2.6.1'); - } else if (startingVersion < 29) { - startVersionUpgrade('262'); - executeUpdate(29, '262', '2.6.2'); - } else if (startingVersion < 30) { - startVersionUpgrade('263'); - executeUpdate(30, '263', '2.6.3'); - } else if (startingVersion < 31) { - startVersionUpgrade('264'); - executeUpdate(31, '264', '2.6.4'); - } else if (startingVersion < 32) { - startVersionUpgrade('300b1'); - executeUpdate(32, '300b1', '3.0.0 beta 1'); - } else if (startingVersion < 33) { - startVersionUpgrade('300rc1'); - executeUpdate(33, '300rc1', '3.0.0 RC 1'); - } else if (startingVersion < 34) { - startVersionUpgrade('300'); - executeUpdate(34, '300', '3.0.0'); - } else if (startingVersion < 35) { - startVersionUpgrade('301'); - executeUpdate(35, '301', '3.0.1'); - } else if (startingVersion < 36) { - startVersionUpgrade('302'); - executeUpdate(36, '302', '3.0.2'); - } else if (startingVersion < 37) { - startVersionUpgrade('303'); - executeUpdate(37, '303', '3.0.3'); - } else if (startingVersion < 38) { - startVersionUpgrade('304'); - executeUpdate(38, '304', '3.0.4'); - } else if (startingVersion < 39) { - startVersionUpgrade('305'); - executeUpdate(39, '305', '3.0.5'); - } else if (startingVersion < 40) { - startVersionUpgrade('306'); - executeUpdate(40, '306', '3.0.6'); - } else if (startingVersion < 41) { - startVersionUpgrade('307'); - executeUpdate(41, '307', '3.0.7'); - } else if (startingVersion < 42) { - startVersionUpgrade('310'); - executeUpdate(42, '310', '3.1.0'); - } else if (startingVersion < 43) { - startVersionUpgrade('311'); - executeUpdate(43, '311', '3.1.1'); - } else { - installationFinished(); - } -} - - -function executeUpdate(version, cssclass, formattedVersion) { - appendToInstallConsole('INFOStarting updates for ' + formattedVersion + ''); - $.ajax({ - type: 'POST', - url: 'ajax/install-database-ajax.php', - data: {version: version}, - success: function () { - markUpdateAsSuccess(cssclass, formattedVersion); - if (version == 9) { - migrateIpEmailBans('banmigrate', 'banmigrate'); - } else if (version == 18) { - initializeStatuses('initialize-statuses', 'initialize-statuses'); - } else { - processUpdates(version); - } - }, - error: function (data) { - appendToInstallConsole('ERROR' + data.responseText + ''); - markUpdateAsFailure(cssclass); - } - }); -} - -function migrateIpEmailBans(version, cssclass) { - startVersionUpgrade(version); - appendToInstallConsole('INFOChecking for IP / Email address bans to migrate'); - $.ajax({ - type: 'POST', - url: 'ajax/task-ajax.php', - data: {task: 'ip-email-bans'}, - success: function (data) { - var parsedData = $.parseJSON(data); - if (parsedData.status == 'ATTENTION') { - appendToInstallConsole('WARNINGYour response is needed. Please check above.'); - markUpdateAsAttention(version); - prepareAttentionPanel(getContentForMigratePrompt(parsedData.users)); - } else { - migrateComplete(); - } - }, - error: function (data) { - appendToInstallConsole('ERROR' + data.responseText + ''); - markUpdateAsFailure(version); - } - }); -} - -function initializeStatuses(version, cssclass) { - startVersionUpgrade(version); - appendToInstallConsole('INFOInitializing Statuses'); - $.ajax({ - type: 'POST', - url: 'ajax/task-ajax.php', - data: {task: 'initialize-statuses'}, - success: function (data) { - markUpdateAsSuccess(cssclass, 'Initializing Statuses'); - statusesInitialized(); - }, - error: function (data) { - appendToInstallConsole('ERROR' + data.responseText + ''); - markUpdateAsFailure(version); - } - }); -} - -function statusesInitialized() { - processUpdates(18); -} - - -function runMigration() { - // Get user ID that is selected - var userId = $('#user-dropdown').val(); - // Hide the div, switch back to in progress - $('#attention-row').hide(); - startVersionUpgrade('banmigrate'); - $.ajax({ - type: 'POST', - url: 'ajax/task-ajax.php', - data: {task: 'migrate-bans', user: userId}, - success: function (data) { - migrateComplete(); - }, - error: function (data) { - appendToInstallConsole('ERROR: ' + data.responseText); - markUpdateAsFailure('banmigrate'); - } - }) -} - -function migrateComplete() { - $('#attention-row').hide(); - markUpdateAsSuccess('banmigrate', 'IP and Email address bans'); - processUpdates(9); -} - -jQuery(document).ready(loadJquery); \ No newline at end of file diff --git a/install/mods-for-hesk/modsForHesk.php b/install/mods-for-hesk/modsForHesk.php deleted file mode 100644 index 4496bc49..00000000 --- a/install/mods-for-hesk/modsForHesk.php +++ /dev/null @@ -1,245 +0,0 @@ - - - - Mods For HESK <?php echo MODS_FOR_HESK_NEW_VERSION; ?> Install / Upgrade - - - - - - - - - - - - - -
Mods for HESK Install / Upgrade
-
- - -
-
-
-
Database/File Requirements
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Database Information / File Permissions
Database Host:
Database Name:
Database User:
Database Password:
Database Prefix:
-
-
- 0) { - $versionRS = hesk_dbQuery('SELECT `Value` FROM `' . hesk_dbEscape($hesk_settings['db_pfix']) . 'settings` WHERE `Key` = \'modsForHeskVersion\''); - $versionArray = hesk_dbFetchAssoc($versionRS); - $version = $versionArray['Value']; - } - ?> -
-
-
Install / Upgrade
-
- -
-
-

You cannot install/upgrade Mods for HESK until the - requirements on the left have been met.

- -

Refresh

-
-
-
-
-

Make sure that you have updated / installed - HESK first; otherwise installation will fail!

-
-

Select your current Mods for HESK version and click "Upgrade" to upgrade your installation. - If you have never installed Mods for HESK before, click "No previous installation".

-
-
-
- - -
-
- -
-
- Upgrade -
-
-
-
-
-
-
- No - previous installation - - - Validate Database - -
-
-
-
- -
-
- By proceeding, you agree to the terms of the MIT License. -
-
-
-
-
-
-
-
- - -disableAllDisablable(\'' . $disableAllExcept . '\')'; -} -?> - - -