Revert appid, update.php. Add changelog file
This commit is contained in:
16
CHANGELOG.md
Normal file
16
CHANGELOG.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Changelog
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||||
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [2.4.0] - 2017-12-26
|
||||||
|
### Added
|
||||||
|
- This CHANGELOG.md file
|
||||||
|
- Support for PHP 7
|
||||||
|
- SHA1 hash algorithm support
|
||||||
|
- Groups option
|
||||||
|
- Supervisor option
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Supported version of ownCloud, Nextcloud: ownCloud 10, Nextcloud 12
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<info>
|
<info>
|
||||||
<id>user_sql_2</id>
|
<id>user_sql</id>
|
||||||
<name>SQL user backend 2</name>
|
<name>SQL user backend</name>
|
||||||
<summary>Authenticate users by SQL queries.</summary>
|
<summary>Authenticate users by SQL queries.</summary>
|
||||||
<description>Authenticate users by SQL queries.</description>
|
<description>Authenticate users by SQL queries.</description>
|
||||||
<version>1.0.0</version>
|
<version>2.4.0</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author>Andreas Boehler <dev (at) aboehler (dot) at ></author>
|
<author>Andreas Boehler <dev (at) aboehler (dot) at ></author>
|
||||||
<namespace>user_sql</namespace>
|
<namespace>user_sql</namespace>
|
||||||
<bugs>https://github.com/mlojewski-me/user_sql/issues</bugs>
|
<bugs>https://github.com/mlojewski-me/user_sql/issues</bugs>
|
||||||
<repository>https://github.com/mlojewski-me/user_sql</repository>
|
<repository>https://github.com/mlojewski-me/user_sql</repository>
|
||||||
<screenshot>https://raw.githubusercontent.com/mlojewski-me/user_sql/2_v1.0.0/screenshot.png</screenshot>
|
<screenshot>https://raw.githubusercontent.com/mlojewski-me/user_sql/v2.4.0/screenshot.png</screenshot>
|
||||||
<types>
|
<types>
|
||||||
<authentication/>
|
<authentication/>
|
||||||
</types>
|
</types>
|
||||||
|
|||||||
73
appinfo/update.php
Normal file
73
appinfo/update.php
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ownCloud - user_sql
|
||||||
|
*
|
||||||
|
* @author Andreas Böhler and contributors
|
||||||
|
* @copyright 2012-2015 Andreas Böhler <dev (at) aboehler (dot) at>
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 3 of the License, or any later version.
|
||||||
|
*
|
||||||
|
* This library 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
|
||||||
|
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$installedVersion = \OC::$server->getConfig()->getAppValue('user_sql', 'installed_version');
|
||||||
|
|
||||||
|
$params = array('sql_host' => 'sql_hostname',
|
||||||
|
'sql_user' => 'sql_username',
|
||||||
|
'sql_database' => 'sql_database',
|
||||||
|
'sql_password' => 'sql_password',
|
||||||
|
'sql_table' => 'sql_table',
|
||||||
|
'sql_column_username' => 'col_username',
|
||||||
|
'sql_column_password' => 'col_password',
|
||||||
|
'sql_type' => 'sql_driver',
|
||||||
|
'sql_column_active' => 'col_active',
|
||||||
|
'sql_column_supervisor' => 'supervisor',
|
||||||
|
'sql_supervisor' => 'set_supervisor',
|
||||||
|
'strip_domain' => 'set_strip_domain',
|
||||||
|
'default_domain' => 'set_default_domain',
|
||||||
|
'crypt_type' => 'set_crypt_type',
|
||||||
|
'sql_column_displayname' => 'col_displayname',
|
||||||
|
'allow_password_change' => 'set_allow_pwchange',
|
||||||
|
'sql_column_active_invert' => 'set_active_invert',
|
||||||
|
'sql_column_email' => 'col_email',
|
||||||
|
'mail_sync_mode' => 'set_mail_sync_mode'
|
||||||
|
);
|
||||||
|
|
||||||
|
$delParams = array('domain_settings',
|
||||||
|
'map_array',
|
||||||
|
'domain_array'
|
||||||
|
);
|
||||||
|
|
||||||
|
if(version_compare($installedVersion, '1.99', '<'))
|
||||||
|
{
|
||||||
|
foreach($params as $oldPar => $newPar)
|
||||||
|
{
|
||||||
|
$val = \OC::$server->getConfig()->getAppValue('user_sql', $oldPar);
|
||||||
|
if(($oldPar === 'strip_domain') || ($oldPar === 'allow_password_change') || ($oldPar === 'sql_column_active_invert'))
|
||||||
|
{
|
||||||
|
if($val)
|
||||||
|
$val = 'true';
|
||||||
|
else
|
||||||
|
$val = 'false';
|
||||||
|
}
|
||||||
|
if($val)
|
||||||
|
\OC::$server->getConfig()->setAppValue('user_sql', $newPar.'_default', $val);
|
||||||
|
\OC::$server->getConfig()->deleteAppValue('user_sql', $oldPar);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($delParams as $param)
|
||||||
|
{
|
||||||
|
\OC::$server->getConfig()->deleteAppValue('user_sql', $param);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user