Permalink
Browse files

Update templates/SQL to make prefs work better

  • Loading branch information...
pudge committed Dec 31, 2003
1 parent 6853a4b commit ea034c530f8637393962aae2c5e87da1ff3a1a2d
Showing with 14 additions and 12 deletions.
  1. +0 −2 Slash/DB/MySQL/MySQL.pm
  2. +3 −3 sql/mysql/defaults.sql
  3. +10 −5 sql/mysql/upgrades
  4. +1 −2 themes/slashcode/templates/changePasswd;users;default
View
@@ -6212,8 +6212,6 @@ sub getSlashConf {
$conf{nick_chars} ||= q{ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$_.+!*'(),-};
$conf{nick_maxlen} ||= 20;
$conf{login_temp_minutes} ||= 10;
- $conf{login_temp_minutes} =~ s/\D//;
- $conf{login_temp_minutes} = 10 unless length $conf{login_temp_minutes};
# For all fields that it is safe to default to -1 if their
# values are not present...
for (qw[min_expiry_days max_expiry_days min_expiry_comm max_expiry_comm]) {
View
@@ -48,8 +48,8 @@ INSERT INTO code_param (type, code, name) VALUES ('issuemodes',2,'Issue Based');
INSERT INTO code_param (type, code, name) VALUES ('issuemodes',3,'Both Issue and Article');
INSERT INTO code_param (type, code, name) VALUES ('maillist',0,'Don\'t Email');
INSERT INTO code_param (type, code, name) VALUES ('maillist',1,'Email Headlines Each Night');
-INSERT INTO code_param (type, code, name) VALUES ('session_login',0,'Expires after one year');
-INSERT INTO code_param (type, code, name) VALUES ('session_login',1,'Expires after browser exits');
+INSERT INTO code_param (type, code, name) VALUES ('session_login',0,'In one year');
+INSERT INTO code_param (type, code, name) VALUES ('session_login',1,'When I close my browser');
INSERT INTO code_param (type, code, name) VALUES ('sortcodes',0,'Oldest First');
INSERT INTO code_param (type, code, name) VALUES ('sortcodes',1,'Newest First');
INSERT INTO code_param (type, code, name) VALUES ('sortcodes',3,'Highest Scores First');
@@ -249,7 +249,7 @@ INSERT INTO string_param (type, code, name) VALUES ('commentcodes_extended','fri
INSERT INTO string_param (type, code, name) VALUES ('commentcodes_extended','friends_fof_only','Just Friends and their Friends');
INSERT INTO string_param (type, code, name) VALUES ('commentcodes_extended','no_foe','No Foes');
INSERT INTO string_param (type, code, name) VALUES ('commentcodes_extended','no_foe_eof','No Foes and No Friend\'s Foes');
-INSERT INTO string_param (type, code, name) VALUES ('cookie_location','none','Anywhere');
+INSERT INTO string_param (type, code, name) VALUES ('cookie_location','none','Everywhere');
INSERT INTO string_param (type, code, name) VALUES ('cookie_location','classbid','My Subnet');
INSERT INTO string_param (type, code, name) VALUES ('cookie_location','ipid','My IP Address');
INSERT INTO string_param (type, code, name) VALUES ('section_topic_type','topic_1','Default');
View
@@ -1995,20 +1995,25 @@ CREATE TABLE users_logtokens (
INSERT INTO vars (name, value, description) VALUES ('rss_allow_index', '0', 'Allow RSS feeds to be served from index.pl (1 = admins, 2 = subscribers, 3 = all logged-in users)');
-# USEPERL LAST UPDATED HERE
-
-# SLASHCODE LAST UPDATED HERE
-
# End of T_2_3_0_129, Start of T_2_3_0_130 - 2003/12/29
-INSERT INTO string_param (type, code, name) VALUES ('cookie_location','none','Anywhere');
+INSERT INTO string_param (type, code, name) VALUES ('cookie_location','none','Everywhere');
INSERT INTO string_param (type, code, name) VALUES ('cookie_location','classbid','My Subnet');
INSERT INTO string_param (type, code, name) VALUES ('cookie_location','ipid','My IP Address');
+REPLACE INTO code_param (type, code, name) VALUES ('session_login',0,'In one year');
+REPLACE INTO code_param (type, code, name) VALUES ('session_login',1,'When I close my browser');
+
ALTER TABLE users_info ADD COLUMN cookie_location enum("classbid","subnetid","ipid","none") DEFAULT "classbid" NOT NULL AFTER session_login;
ALTER TABLE users_logtokens ADD COLUMN temp ENUM("yes","no") NOT NULL DEFAULT "no" AFTER locationid;
ALTER TABLE users_logtokens DROP INDEX uid_locationid;
ALTER TABLE users_logtokens ADD UNIQUE uid_locationid_temp (uid, locationid, temp);
ALTER TABLE users_logtokens ADD KEY (temp);
INSERT INTO vars (name, value, description) VALUES ('login_temp_minutes', '10', 'Minutes before a temporary login expires');
+
+# End of T_2_3_0_130, Start of T_2_3_0_131 - 2003/12/31
+
+# USEPERL LAST UPDATED HERE
+
+# SLASHCODE LAST UPDATED HERE
@@ -43,8 +43,7 @@ __template__
[% ELSE %]
<INPUT TYPE="HIDDEN" NAME="uid" VALUE="[% useredit.uid %]">
[% END %]
- <B>Cookie expiration</B> [% session %]<BR>
- <B>Cookie location</B> [% clocation %]<BR>
+ My login cookie <B>expires</B> [% session %] and <B>works from</B> [% clocation %]<BR>
[% IF !admin_flag %]
[% IF got_oldpass %]
<INPUT TYPE="HIDDEN" NAME="oldpass" VALUE="[% form.oldpass | strip_attribute %]">

0 comments on commit ea034c5

Please sign in to comment.