public
Description: The ultra-lightweight ultra-flexible blogging engine with a fetish for birds and misspellings.
Homepage: http://chyrp.net/
Clone URL: git://github.com/vito/chyrp.git
Click here to lend your support to: chyrp and make a donation at www.pledgie.com !
Implemented quoting keyword searches for multi-word matching. [#255 
state:resolved]
vito (author)
Fri Oct 31 15:00:59 -0700 2008
commit  d7ecf5d7f6061b55eeb734d58976fafe4981311b
tree    20bc3023493d382e182643b52376fdcbb924a967
parent  9d32ab36792af4ca58dadb965409839efe6adac5
...
1320
1321
1322
 
 
 
 
 
 
 
 
 
 
 
 
 
1323
1324
1325
...
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
0
@@ -1320,6 +1320,19 @@
0
         foreach ($matches as $match) {
0
             list($test, $equals,) = explode(":", $match);
0
 
0
+            if ($equals[0] == '"') {
0
+                foreach ($search as $index => $part) {
0
+                    $equals.= " ".$part;
0
+
0
+                    unset($search[$index]);
0
+
0
+                    if (substr($part, -1) == '"')
0
+                        break;
0
+                }
0
+
0
+                $equals = ltrim(trim($equals, '"'), '"');
0
+            }
0
+
0
             if (in_array($test, $times))
0
                 $where[strtoupper($test)."(created_at)"] = $equals;
0
             elseif ($test == "author") {
...
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 
 
 
 
 
 
 
80
81
82
...
66
67
68
 
 
 
 
 
 
 
 
 
69
70
71
72
73
74
75
76
77
78
79
80
0
@@ -66,17 +66,15 @@
0
         $sql = SQL::current(true);
0
         if ($sql->connect(true) and !empty($config->url) and $sql->count("users"))
0
             error(__("Already Installed"), __("Chyrp is already correctly installed and configured."));
0
-    } else {
0
-        if (# Directory is NOT writable, .htaccess file does NOT already exist.
0
-            (!is_writable(MAIN_DIR) and !file_exists(MAIN_DIR."/.htaccess")) or
0
-            # .htaccess file DOES exist, IS writable, and it does NOT contain the Chyrp htaccess whatnot.
0
-            (file_exists(MAIN_DIR."/.htaccess") and !is_writable(MAIN_DIR."/.htaccess") and !$htaccess_has_chyrp))
0
-            $errors[] = _f("STOP! Before you go any further, you must create a .htaccess file in Chyrp's install directory and put this in it:\n<pre>%s</pre>", array(fix($htaccess)));
0
-
0
-        if (!is_writable(INCLUDES_DIR))
0
-            $errors[] = __("Chyrp's includes directory is not writable by the server. In order for the installer to generate your configuration files, please CHMOD or CHOWN it so that Chyrp can write to it.");
0
     }
0
 
0
+    if ((!is_writable(MAIN_DIR) and !file_exists(MAIN_DIR."/.htaccess")) or
0
+        (file_exists(MAIN_DIR."/.htaccess") and !is_writable(MAIN_DIR."/.htaccess") and !$htaccess_has_chyrp))
0
+        $errors[] = _f("STOP! Before you go any further, you must create a .htaccess file in Chyrp's install directory and put this in it:\n<pre>%s</pre>", array(fix($htaccess)));
0
+
0
+    if (!is_writable(INCLUDES_DIR))
0
+        $errors[] = __("Chyrp's includes directory is not writable by the server. In order for the installer to generate your configuration files, please CHMOD or CHOWN it so that Chyrp can write to it.");
0
+
0
     if (!empty($_POST)) {
0
         if ($_POST['adapter'] == "sqlite" and !is_writable(dirname($_POST['database'])))
0
             $errors[] = __("SQLite database file could not be created. Please make sure your server has write permissions to the location for the database.");

Comments