Skip to content

Commit

Permalink
Check in 1.6.18
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlst committed Nov 24, 2020
1 parent 732fc79 commit b655ceb
Show file tree
Hide file tree
Showing 38 changed files with 683 additions and 390 deletions.
2 changes: 1 addition & 1 deletion LSQUICCOMMIT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6eec0a76f7edc4e7c6e6d32305484065f2fa7478
e02bc3157d0de31249300437fa86dd7da1a088f6
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for openlitespeed 1.6.17.
# Generated by GNU Autoconf 2.69 for openlitespeed 1.6.18.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='openlitespeed'
PACKAGE_TARNAME='openlitespeed'
PACKAGE_VERSION='1.6.17'
PACKAGE_STRING='openlitespeed 1.6.17'
PACKAGE_VERSION='1.6.18'
PACKAGE_STRING='openlitespeed 1.6.18'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL='http://www.litespeedtech.com/'

Expand Down Expand Up @@ -1409,7 +1409,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures openlitespeed 1.6.17 to adapt to many kinds of systems.
\`configure' configures openlitespeed 1.6.18 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1480,7 +1480,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of openlitespeed 1.6.17:";;
short | recursive ) echo "Configuration of openlitespeed 1.6.18:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1641,7 +1641,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
openlitespeed configure 1.6.17
openlitespeed configure 1.6.18
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2315,7 +2315,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by openlitespeed $as_me 1.6.17, which was
It was created by openlitespeed $as_me 1.6.18, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -3181,7 +3181,7 @@ fi

# Define the identity of the package.
PACKAGE='openlitespeed'
VERSION='1.6.17'
VERSION='1.6.18'


# Some tools Automake needs.
Expand Down Expand Up @@ -19624,7 +19624,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by openlitespeed $as_me 1.6.17, which was
This file was extended by openlitespeed $as_me 1.6.18, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -19691,7 +19691,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
openlitespeed config.status 1.6.17
openlitespeed config.status 1.6.18
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ m4_include(ax_check_libudns.m4)
m4_include(ax_check_ip2location.m4)

dnl Process this file with autoconf to produce a configure script.
AC_INIT([openlitespeed],[1.6.17],[[email protected]],[openlitespeed],[http://www.litespeedtech.com/])
AC_INIT([openlitespeed],[1.6.18],[[email protected]],[openlitespeed],[http://www.litespeedtech.com/])
AM_INIT_AUTOMAKE([1.0 foreign no-define subdir-objects])


Expand Down
2 changes: 1 addition & 1 deletion dist/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.17
1.6.18
2 changes: 1 addition & 1 deletion dist/add-ons/webcachemgr/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.13.3.1
1.13.4.1
98 changes: 51 additions & 47 deletions dist/add-ons/webcachemgr/src/CliController.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function __construct()
private function checkDataFile( $action,
WPInstallStorage $wpInstallStorage) {

if ( $action == 'scan' ) {
if ( $action == WPInstallStorage::CMD_SCAN ) {
/**
* Always allowed.
*/
Expand All @@ -112,13 +112,13 @@ private function checkDataFile( $action,
case WPInstallStorage::ERR_CORRUPTED:
case WPInstallStorage::ERR_VERSION_HIGH:
$msg = 'Scan data could not be read! Please scan again '
. '(without the \'-n\' flag) before attempting any '
. "cache operations.\n";
. '(without the \'-n\' flag) before attempting any '
. "cache operations.\n";
break;
case WPInstallStorage::ERR_VERSION_LOW:
$msg = 'Scan data file format has been changed for this '
. 'version. Please scan again (without the \'-n\' '
. "flag) before attempting any cache operations.\n";
. 'version. Please scan again (without the \'-n\' '
. "flag) before attempting any cache operations.\n";
break;
//no default
}
Expand All @@ -127,9 +127,9 @@ private function checkDataFile( $action,
&& $wpInstallStorage->getCount() == 0 ) {

$msg = 'No WordPress installations discovered in the previous '
. 'scan. If you have any newly installed WordPress '
. 'installations, please scan again or add them with'
. "command 'addinstalls'.\n";
. 'scan. If you have any newly installed WordPress '
. 'installations, please scan again or add them with command '
. "'addinstalls'.\n";
}

if ( $msg != '' ) {
Expand Down Expand Up @@ -168,12 +168,12 @@ private function printStatusMsg( WPInstall $wpInstall )
}
elseif ( $status & WPInstall::ST_ERR_DOCROOT ) {
$msg .= 'Could not match WordPress siteURL to a known control '
. 'panel docroot.';
. 'panel docroot.';
}
elseif ( $status & WPInstall::ST_ERR_EXECMD ) {
$msg .= 'WordPress fatal error encountered during action '
. 'execution. This is most likely caused by custom code in '
. 'this WordPress installation.';
. 'execution. This is most likely caused by custom code in '
. 'this WordPress installation.';
}
elseif ( $status & WPInstall::ST_ERR_EXECMD_DB ) {
$msg .= 'Error establishing WordPress database connection.';
Expand Down Expand Up @@ -322,15 +322,15 @@ private function handleScanInput( &$args )
{
if ( ($key = array_search('-n', $args)) !== false ) {
unset($args[$key]);
$this->commands[] = 'discoverNew';
$this->commands[] = WPInstallStorage::CMD_DISCOVER_NEW;
}
else {
$this->commands[] = 'scan';
$this->commands[] = WPInstallStorage::CMD_SCAN;
}

if ( ($key = array_search('-e', $args)) !== false ) {
unset($args[$key]);
$this->commands[] = 'mass_enable';
$this->commands[] = UserCommand::CMD_MASS_ENABLE;
}
}

Expand Down Expand Up @@ -385,7 +385,7 @@ private function handleDashNotifyInput( $cmdType, &$args )

if ( ($key = array_search('-m', $args)) !== false ) {
unset($args[$key]);
$this->commands[] = 'mass_dash_notify';
$this->commands[] = UserCommand::CMD_MASS_DASH_NOTIFY;
}
else {

Expand All @@ -410,7 +410,7 @@ private function handleDashNotifyInput( $cmdType, &$args )
throw new LSCMException("Invalid WP Path: {$path}.");
}

$this->commands[] = 'dash_notify';
$this->commands[] = UserCommand::CMD_DASH_NOTIFY;
$this->currWpPath = rtrim($path, '/');

unset($args[$key], $args[$key + 1]);
Expand All @@ -422,7 +422,8 @@ private function handleDashNotifyInput( $cmdType, &$args )

if ( empty($args[$key + 1]) ) {
throw new LSCMException(
'Invalid Command, missing \'-msgfile\' value.');
'Invalid Command, missing \'-msgfile\' value.'
);
}

$msgFilePath = $args[$key + 1];
Expand Down Expand Up @@ -495,7 +496,7 @@ private function handleDashNotifyInput( $cmdType, &$args )
$arg1 = array_shift($args);

if ( $arg1 == '-m' ) {
$this->commands[] = 'mass_dash_disable';
$this->commands[] = UserCommand::CMD_MASS_DASH_DISABLE;
}
else {
$path = $arg1;
Expand All @@ -512,7 +513,7 @@ private function handleDashNotifyInput( $cmdType, &$args )
throw new LSCMException("Invalid WP Path: {$path}.");
}

$this->commands[] = 'dash_disable';
$this->commands[] = UserCommand::CMD_DASH_DISABLE;
$this->currWpPath = rtrim($path, '/');
}
}
Expand Down Expand Up @@ -695,6 +696,7 @@ private function parseCommands( $args )

switch ($cmd) {
case 'setcacheroot':

if ( $panelClassName == 'custom' ) {
throw new LSCMException(
'Command \'setcacheroot\' cannot be used in the '
Expand Down Expand Up @@ -813,12 +815,12 @@ private function doSpecialCommand()

case 'update':
echo 'Updated LiteSpeed cPanel plugin to current '
. "version\n\n";
. "version\n\n";
break;

case 'new':
echo 'LiteSpeed cPanel plugin installed, auto install '
. "turned on.\n\n";
. "turned on.\n\n";
break;

//no default
Expand All @@ -831,27 +833,27 @@ private function doSpecialCommand()
CPanel::uninstallCpanelPlugin();

echo 'LiteSpeed cPanel plugin uninstalled successfully, auto '
. "install turned off.\n\n";
. "install turned off.\n\n";
break;

case 'cpanelPluginAutoInstallStatus':
$state = (CPanel::isCpanelPluginAutoInstallOn()) ? 'On' : 'Off';

echo "Auto install is currently {$state} for the LiteSpeed "
. "cPanel plugin.\n";
. "cPanel plugin.\n";
echo 'Use command \'cpanelplugin -autoinstall {0 | 1}\' to '
. "turn auto install off/on respectively.\n\n";
. "turn auto install off/on respectively.\n\n";
break;

case 'cpanelPluginAutoInstallOn':

if ( CPanel::turnOnCpanelPluginAutoInstall() ) {
echo 'Auto install is now On for LiteSpeed cPanel plugin.'
. "\n\n";
. "\n\n";
}
else {
echo 'Failed to turn off auto install for LiteSpeed cPanel '
. "plugin.\n\n";
. "plugin.\n\n";
}

break;
Expand All @@ -860,11 +862,11 @@ private function doSpecialCommand()

if ( CPanel::turnOffCpanelPluginAutoInstall() ) {
echo 'Auto install is now Off for LiteSpeed cPanel plugin.'
. "\n\n";
. "\n\n";
}
else {
echo 'Failed to turn on auto install for LiteSpeed cPanel '
. "plugin.\n\n";
. "plugin.\n\n";
}

break;
Expand All @@ -887,7 +889,7 @@ private function doVersionCommand()
$allowedVers = $pluginVerInstance->getAllowedVersions();

echo "Available versions are: \n" . implode("\n",$allowedVers)
. "\n";
. "\n";
break;

case 'latest':
Expand All @@ -902,7 +904,7 @@ private function doVersionCommand()

if ( $latest == $currVer ) {
echo "Current version, {$latest}, is already the latest "
. "version.\n";
. "version.\n";
}
else {
$pluginVerInstance->setActiveVersion($latest);
Expand Down Expand Up @@ -932,9 +934,10 @@ private function doWPInstallStorageAction()

$lscmDataFiles = Context::getLSCMDataFiles();

$wpInstallStorage =
new WPInstallStorage($lscmDataFiles['dataFile'],
$lscmDataFiles['custDataFile']);
$wpInstallStorage = new WPInstallStorage(
$lscmDataFiles['dataFile'],
$lscmDataFiles['custDataFile']
);

if ($this->currWpPath) {
$list = array( $this->currWpPath );
Expand All @@ -947,17 +950,19 @@ private function doWPInstallStorageAction()

switch ( $action ) {

case 'upgrade':
case 'mass_upgrade':
case UserCommand::CMD_UPGRADE:
case UserCommand::CMD_MASS_UPGRADE:
$pluginVerInstance = PluginVersion::getInstance();

$extraArgs[] = implode(',',
$pluginVerInstance->getKnownVersions(true));
$extraArgs[] = implode(
',',
$pluginVerInstance->getShortVersions()
);
$extraArgs[] = $pluginVerInstance->getCurrentVersion();
break;

case 'dash_notify':
case 'mass_dash_notify':
case UserCommand::CMD_DASH_NOTIFY:
case UserCommand::CMD_MASS_DASH_NOTIFY:
DashNotifier::prepLocalDashPluginFiles();

$slug = '';
Expand All @@ -967,11 +972,11 @@ private function doWPInstallStorageAction()
}

$msgInfoJSON = json_encode(
array(
'msg' => $this->input['msg'],
'plugin' => $slug,
'plugin_name' => ''
)
array(
'msg' => $this->input['msg'],
'plugin' => $slug,
'plugin_name' => ''
)
);

$extraArgs[] = base64_encode($msgInfoJSON);
Expand All @@ -987,9 +992,8 @@ private function doWPInstallStorageAction()

$wpInstallStorage->doAction($action, $list, $extraArgs);

if ( $action == 'status' ) {
$wpInstall =
$wpInstallStorage->getWPInstall($this->currWpPath);
if ( $action == UserCommand::CMD_STATUS ) {
$wpInstall = $wpInstallStorage->getWPInstall($this->currWpPath);

$this->printStatusMsg($wpInstall);
}
Expand Down
Loading

0 comments on commit b655ceb

Please sign in to comment.