Implement cweb_match_domain by wrapping http_match_host
This commit is contained in:
@@ -55,24 +55,20 @@ static int user_exists(CWEB *cweb, CWEB_String name, CWEB_String pass)
|
||||
CWEB_PasswordHash hash;
|
||||
int ret = cweb_next_query_row(&res, &user_id, &hash);
|
||||
if (ret < 0) {
|
||||
printf("here %s:%d\n", __FILE__, __LINE__); // TODO: remove
|
||||
cweb_free_query_result(&res);
|
||||
return -1;
|
||||
}
|
||||
if (ret == 0) {
|
||||
printf("here %s:%d\n", __FILE__, __LINE__); // TODO: remove
|
||||
cweb_free_query_result(&res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ret = cweb_check_password(pass, hash);
|
||||
if (ret < 0) {
|
||||
printf("here %s:%d\n", __FILE__, __LINE__); // TODO: remove
|
||||
cweb_free_query_result(&res);
|
||||
return -1;
|
||||
}
|
||||
if (ret > 0) {
|
||||
printf("here %s:%d\n", __FILE__, __LINE__); // TODO: remove
|
||||
cweb_free_query_result(&res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
include "page.wl"
|
||||
|
||||
let post_id = $args(0)
|
||||
let posts = $query("SELECT U.username, P.title, P.content FROM Posts as P, Users as U WHERE P.id=? AND U.id=P.author", post_id)
|
||||
let post_id = $args(0)
|
||||
let posts = $query("SELECT U.username, P.title, P.content FROM Posts as P, Users as U WHERE P.id=? AND U.id=P.author", post_id)
|
||||
let comments = $query("SELECT C.id, U.username, C.content, C.parent_post, C.parent_comment FROM Comments as C, Users as U WHERE C.parent_post=? AND U.id=C.author", post_id)
|
||||
|
||||
let lookup = {}
|
||||
|
||||
Reference in New Issue
Block a user