summaryrefslogtreecommitdiff
path: root/buildscripts/index/search.php
diff options
context:
space:
mode:
authorctrlaltca <>2012-07-12 11:21:01 +0000
committerctrlaltca <>2012-07-12 11:21:01 +0000
commit903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch)
treee08bf04f0823650a231227ac3499121270172a23 /buildscripts/index/search.php
parent3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff)
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'buildscripts/index/search.php')
-rw-r--r--buildscripts/index/search.php70
1 files changed, 35 insertions, 35 deletions
diff --git a/buildscripts/index/search.php b/buildscripts/index/search.php
index a34363f4..23948ca5 100644
--- a/buildscripts/index/search.php
+++ b/buildscripts/index/search.php
@@ -1,36 +1,36 @@
-<?php
-
-if(isset($_GET['keyword']))
- $keyword=trim($_GET['keyword']);
-else
- $keyword='';
-
-$zend_path=realpath(dirname(__FILE__).'/../../demos/quickstart/protected/index');
-set_include_path(get_include_path().PATH_SEPARATOR.$zend_path);
-require_once('Zend/Search/Lucene.php');
-
-if($keyword!=='')
-{
- $search=new Zend_Search_Lucene(realpath(dirname(__FILE__)));
- $results=$search->find(strtolower($keyword));
- $content='';
- foreach($results as $entry)
- $content.="<li><a href=\"{$entry->link}\">{$entry->title}</a></li>\n";
- if($content!=='')
- {
- $count=count($results);
- $content="<p>Total <b>$count</b> pages matching keyword <b>".htmlentities($keyword)."</b>.\n<ol>\n$content</ol>\n";
- }
- else
- $content="<p>No page matches <b>".htmlentities($keyword)."</b>.</p>";
-}
-else
- $content="<p>Please specify a keyword to search for.</p>";
-
-$page=file_get_contents(dirname(__FILE__).'/index.html');
-$page=preg_replace('/<!-- content begin -->.*<!-- content end -->/ms',$content,$page);
-if($keyword!=='')
- $page=preg_replace('/<input type="text" name="keyword"/','<input type="text" name="keyword" value="'.htmlentities($keyword).'"',$page);
-echo $page;
-
+<?php
+
+if(isset($_GET['keyword']))
+ $keyword=trim($_GET['keyword']);
+else
+ $keyword='';
+
+$zend_path=realpath(dirname(__FILE__).'/../../demos/quickstart/protected/index');
+set_include_path(get_include_path().PATH_SEPARATOR.$zend_path);
+require_once('Zend/Search/Lucene.php');
+
+if($keyword!=='')
+{
+ $search=new Zend_Search_Lucene(realpath(dirname(__FILE__)));
+ $results=$search->find(strtolower($keyword));
+ $content='';
+ foreach($results as $entry)
+ $content.="<li><a href=\"{$entry->link}\">{$entry->title}</a></li>\n";
+ if($content!=='')
+ {
+ $count=count($results);
+ $content="<p>Total <b>$count</b> pages matching keyword <b>".htmlentities($keyword)."</b>.\n<ol>\n$content</ol>\n";
+ }
+ else
+ $content="<p>No page matches <b>".htmlentities($keyword)."</b>.</p>";
+}
+else
+ $content="<p>Please specify a keyword to search for.</p>";
+
+$page=file_get_contents(dirname(__FILE__).'/index.html');
+$page=preg_replace('/<!-- content begin -->.*<!-- content end -->/ms',$content,$page);
+if($keyword!=='')
+ $page=preg_replace('/<input type="text" name="keyword"/','<input type="text" name="keyword" value="'.htmlentities($keyword).'"',$page);
+echo $page;
+
?> \ No newline at end of file