]> git.quilime.com - clmpr.git/commitdiff
username exceptions, starting on tag filtering
authorGabriel Dunne <gdunne@quilime.com>
Wed, 21 Dec 2011 02:21:42 +0000 (18:21 -0800)
committerGabriel Dunne <gdunne@quilime.com>
Wed, 21 Dec 2011 02:21:42 +0000 (18:21 -0800)
signup.php
tags.php

index b9eb442d65e66d3226b9a90cf7b5e1e8caaadb55..47025179e6f787501ff439912260cfd26dc9c259 100644 (file)
 
         if ($_SERVER['REQUEST_METHOD'] == 'POST' ) {
 
+            if (!$params['user'] || in_array($params['user'], $username_exceptions)) {
+                throw new Exception("invalid username");
+            }
+            // if (!$params['pass']) {
+            //     throw new Exception("invalid password");
+            // }
+
             $dbh = get_db_connection();
             $dbh->beginTransaction();
 
index ba97f9770cad15cdd0b22739a5cca5e8aedc994c..ffb9d24c03e4b0f1a44f69f8806bef4c534a4706 100644 (file)
--- a/tags.php
+++ b/tags.php
@@ -52,7 +52,7 @@ catch(PDOException $e)
 
 <ul class="tags" id="tags">
 <?php for($i = 0; $row = $q->fetch(); $i++ ): ?>
-    <li><span class="tag"><a href="<?php echo $row['tag'] ?>"><?php echo $row['tag'] ?></a> <?php echo $row['count'] ?></span></li>
+    <li><span class="tag"><a href="/tag/<?php echo $row['tag'] ?>"><?php echo $row['tag'] ?></a> <?php echo $row['count'] ?></span></li>
 <?php endfor; ?>
 </ul>