Author: gmazza
Date: Mon Jan 27 01:53:18 2014
New Revision: 1561580
URL: http://svn.apache.org/r1561580
Log:
Removed rollerconfig table (last used in Roller 1.2)
Modified:
roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/PasswordUtility.java
roller/trunk/app/src/main/resources/sql/310-to-400-migration.vm
roller/trunk/app/src/main/resources/sql/createdb.vm
roller/trunk/app/src/main/resources/sql/droptables.sql
Modified:
roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/PasswordUtility.java
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/PasswordUtility.java?rev=1561580&r1=1561579&r2=1561580&view=diff
==============================================================================
---
roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/PasswordUtility.java
(original)
+++
roller/trunk/app/src/main/java/org/apache/roller/weblogger/util/PasswordUtility.java
Mon Jan 27 01:53:18 2014
@@ -172,8 +172,6 @@ public class PasswordUtility
.prepareStatement("select username,passphrase from rolleruser");
PreparedStatement userUpdate = con
.prepareStatement("update rolleruser set passphrase=? where
username=?");
- PreparedStatement configUpdate = con
- .prepareStatement("update rollerconfig set
encryptpasswords=?");
Properties props = new Properties();
ResultSet users = userQuery.executeQuery();
@@ -194,9 +192,6 @@ public class PasswordUtility
userUpdate.executeUpdate();
System.out.println("Encrypted password for user: " + username);
}
-
- configUpdate.setBoolean(1, true);
- configUpdate.executeUpdate();
}
/**
@@ -207,8 +202,6 @@ public class PasswordUtility
{
PreparedStatement userUpdate = con
.prepareStatement("update rolleruser set passphrase=?
where username=?");
- PreparedStatement configUpdate = con
- .prepareStatement("update rollerconfig set
encryptpasswords=?");
Properties props = new Properties();
props.load(new FileInputStream(fileName));
@@ -222,9 +215,6 @@ public class PasswordUtility
userUpdate.setString(2, username);
userUpdate.executeUpdate();
}
-
- configUpdate.setBoolean(1, false);
- configUpdate.executeUpdate();
}
/**
@@ -234,18 +224,11 @@ public class PasswordUtility
Connection con, String username, String password, String
algorithm)
throws Exception
{
- PreparedStatement encryptionQuery =
- con.prepareStatement("select encryptpasswords from rollerconfig");
- PreparedStatement userUpdate =
+ PreparedStatement userUpdate =
con.prepareStatement("update rolleruser set passphrase=? where
username=?");
- ResultSet rs = encryptionQuery.executeQuery();
- rs.next();
- boolean encryption = rs.getBoolean(1);
-
- String newpassword =
- encryption ? Utilities.encodePassword(password, algorithm)
: password;
- userUpdate.setString(1, newpassword);
+ String newPassword = Utilities.encodePassword(password,
algorithm);
+ userUpdate.setString(1, newPassword);
userUpdate.setString(2, username);
userUpdate.executeUpdate();
}
Modified: roller/trunk/app/src/main/resources/sql/310-to-400-migration.vm
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/sql/310-to-400-migration.vm?rev=1561580&r1=1561579&r2=1561580&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/sql/310-to-400-migration.vm (original)
+++ roller/trunk/app/src/main/resources/sql/310-to-400-migration.vm Mon Jan 27
01:53:18 2014
@@ -154,8 +154,6 @@ create index raggs_sid_idx on rag_group_
-- remove no-longer-used needed tables
-- remove old rollerconfig table which has been deprecated since 1.2
--- NOTE: since this breaks the pre-1.2 -> 4.0+ direct upgrade path then
--- maybe we want to attempt to fix that by doing that upgrade via sql?
#dropTableIfExists('rollerconfig')
-- remove old id column of group subscription table
Modified: roller/trunk/app/src/main/resources/sql/createdb.vm
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/sql/createdb.vm?rev=1561580&r1=1561579&r2=1561580&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/sql/createdb.vm (original)
+++ roller/trunk/app/src/main/resources/sql/createdb.vm Mon Jan 27 01:53:18 2014
@@ -384,40 +384,6 @@ create index ref_datestr_idx on referer(
create index ref_refpermlnk_idx on referer( refpermalink$!db.INDEXSIZE );
create index ref_duplicate_idx on referer( duplicate );
--- Configuration options for Roller, should only ever be one row
--- Deprecated in 1.2: configuration now stored in roller_properties table
-create table rollerconfig (
- id varchar(48) not null primary key,
- sitedescription varchar(255),
- sitename varchar(255),
- emailaddress varchar(255),
- absoluteurl varchar(255),
- adminusers varchar(255),
- encryptpasswords $db.BOOLEAN_SQL_TYPE_TRUE not null,
- algorithm varchar(10),
- newuserallowed $db.BOOLEAN_SQL_TYPE_FALSE not null,
- editorpages varchar(255),
- userthemes varchar(255) not null,
- indexdir varchar(255),
- memdebug $db.BOOLEAN_SQL_TYPE_FALSE not null,
- autoformatcomments $db.BOOLEAN_SQL_TYPE_FALSE not null,
- escapecommenthtml $db.BOOLEAN_SQL_TYPE_TRUE not null,
- emailcomments $db.BOOLEAN_SQL_TYPE_FALSE not null,
- enableaggregator $db.BOOLEAN_SQL_TYPE_FALSE not null,
- enablelinkback $db.BOOLEAN_SQL_TYPE_FALSE not null,
- rsscachetime integer default 3000 not null,
- rssusecache $db.BOOLEAN_SQL_TYPE_TRUE not null,
- uploadallow varchar(255),
- uploadforbid varchar(255),
- uploadenabled $db.BOOLEAN_SQL_TYPE_TRUE not null,
- uploaddir varchar(255) not null,
- uploadpath varchar(255) not null,
- uploadmaxdirmb decimal(5,2) default 4.0 not null,
- uploadmaxfilemb decimal(5,2) default 1.5 not null,
- dbversion varchar(10),
- refspamwords $db.TEXT_SQL_TYPE
-);
-
create table roller_properties (
name varchar(255) not null primary key,
value $db.TEXT_SQL_TYPE
Modified: roller/trunk/app/src/main/resources/sql/droptables.sql
URL:
http://svn.apache.org/viewvc/roller/trunk/app/src/main/resources/sql/droptables.sql?rev=1561580&r1=1561579&r2=1561580&view=diff
==============================================================================
--- roller/trunk/app/src/main/resources/sql/droptables.sql (original)
+++ roller/trunk/app/src/main/resources/sql/droptables.sql Mon Jan 27 01:53:18
2014
@@ -25,7 +25,6 @@ drop table rag_properties;
-- non-associated tables
drop table newsfeed;
drop table usercookie;
-drop table rollerconfig;
drop table roller_properties;
drop table roller_audit_log;
drop table roller_tasklock;