Browse Source

Fixes

Don't allow spaces in nicks.
Fix up redirection.
Change default colours for medium priority.
Nathaniel van Diepen 10 years ago
parent
commit
37d41ac33c
4 changed files with 8 additions and 3 deletions
  1. 2 1
      .htaccess
  2. 1 1
      api.php
  3. 1 1
      install/install.sql
  4. 4 0
      js/index.js

+ 2 - 1
.htaccess

@@ -4,8 +4,9 @@
 	RewriteBase /
 	RewriteCond %{REQUEST_FILENAME} !-d
 	RewriteCond %{REQUEST_FILENAME} !-f
-	RewriteCond %{ENV:REDIRECT_STATUS} 200
+	RewriteCond %{ENV:REDIRECT_STATUS} ^.
 	RewriteRule .* - [L]
+	RewriteRule ^.+/page-([^/]*)$ / [R=301,L]
 	RewriteRule ^\~([^/]*)$ /index.php?type=user&id=$1 [QSA,L]
 	RewriteRule ^\+([^/]*)$ /index.php?type=group&id=$1 [QSA,L]
 	RewriteRule ^\!([^/]*)$ /index.php?type=issue&id=$1 [QSA,L]

+ 1 - 1
api.php

@@ -266,7 +266,7 @@
 										'id'=>'register'
 									)
 								);
-								if(is_valid('username')&&is_valid('password')&&is_valid('password1')&&is_valid('email')&&is_valid('captcha')){
+								if(is_valid('username')&& strpos($_GET['username'],' ') !== false&&is_valid('password')&&is_valid('password1')&&is_valid('email')&&is_valid('captcha')){
 									if($_GET['password']==$_GET['password1']){
 										if(compare_captcha($_GET['captcha'])){
 											if(addUser($_GET['username'],$_GET['password'],$_GET['email'])){

+ 1 - 1
install/install.sql

@@ -287,7 +287,7 @@ TRUNCATE TABLE `priorities`;
 
 INSERT INTO `priorities` (`id`, `name`, `color`) VALUES
 (1, 'low', 'green'),
-(2, 'medium', 'yellow'),
+(2, 'medium', 'orange'),
 (3, 'high', 'red');
 
 --

+ 4 - 0
js/index.js

@@ -823,6 +823,10 @@
 			}
 		};
 		$('#notification-container').notify();
+		$('body').css('margin-top','48px');
+		setTimeout(function(){
+			$('body').css('margin-top','0px').show();
+		},100);
 	});
 	shortcut.add('f12',function(){
 		debug.firebug();