rira-commit Mailing List for RiRa
Brought to you by:
behdad
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(14) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
|
Feb
|
Mar
(72) |
Apr
(22) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(9) |
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(33) |
Nov
|
Dec
(1) |
|
From: <be...@us...> - 2008-12-05 07:49:34
|
Revision: 83
http://rira.svn.sourceforge.net/rira/?rev=83&view=rev
Author: behdad
Date: 2008-12-05 07:49:27 +0000 (Fri, 05 Dec 2008)
Log Message:
-----------
Use relative path
Modified Paths:
--------------
trunk/index.php
Modified: trunk/index.php
===================================================================
--- trunk/index.php 2008-10-23 01:20:44 UTC (rev 82)
+++ trunk/index.php 2008-12-05 07:49:27 UTC (rev 83)
@@ -1,3 +1,3 @@
<?php
- header("Location: http://rira.ir/rira/php?".$_SERVER["QUERY_STRING"]);
+ header("Location: rira/php?".$_SERVER["QUERY_STRING"]);
?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2008-10-23 01:20:52
|
Revision: 82
http://rira.svn.sourceforge.net/rira/?rev=82&view=rev
Author: behdad
Date: 2008-10-23 01:20:44 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
Remove static function modifier so it works with PHP4 again
Modified Paths:
--------------
trunk/rira/php/backend/sqldb/sqldb.php
Modified: trunk/rira/php/backend/sqldb/sqldb.php
===================================================================
--- trunk/rira/php/backend/sqldb/sqldb.php 2008-10-23 01:04:29 UTC (rev 81)
+++ trunk/rira/php/backend/sqldb/sqldb.php 2008-10-23 01:20:44 UTC (rev 82)
@@ -72,7 +72,7 @@
}
class sqldb_backend_factory {
- static function &get_sqldb () {
+ /*static*/ function &get_sqldb () {
static $sqldb = NULL;
if (!$sqldb) {
$sqldb = new sqldb_backend(true);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <be...@us...> - 2008-10-23 01:04:37
|
Revision: 81
http://rira.svn.sourceforge.net/rira/?rev=81&view=rev
Author: behdad
Date: 2008-10-23 01:04:29 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
Remove CVSROOT
Removed Paths:
-------------
trunk/CVSROOT/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Behdad E. <be...@us...> - 2008-10-21 21:54:49
|
Update of /cvsroot/rira/rira/php In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24545/rira/php Modified Files: .htaccess Log Message: Update .htaccess Index: .htaccess =================================================================== RCS file: /cvsroot/rira/rira/php/.htaccess,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .htaccess 21 Oct 2008 06:19:25 -0000 1.3 --- .htaccess 21 Oct 2008 21:54:41 -0000 1.4 *************** *** 1,6 **** ! Options -Indexes ! DirectoryIndex index.php5 index.php ! <Files CVS> ! Order allow,deny Deny from all ! </Files> --- 1,6 ---- ! DirectoryIndex index.php5 index.php index.html ! Options +FollowSymLinks -Indexes ! <FilesMatch "^CVSROOT$|^CVS$|^[.]|^admin$"> ! Order Deny,Allow Deny from all ! </FilesMatch> |
|
From: Behdad E. <be...@us...> - 2008-10-21 21:54:49
|
Update of /cvsroot/rira In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24545 Modified Files: .htaccess Log Message: Update .htaccess Index: .htaccess =================================================================== RCS file: /cvsroot/rira/.htaccess,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .htaccess 20 Mar 2006 22:19:31 -0000 1.3 --- .htaccess 21 Oct 2008 21:54:41 -0000 1.4 *************** *** 1,5 **** ! DirectoryIndex index.php index.html Options +FollowSymLinks -Indexes ! <FilesMatch "Entries|Repository|Root"> Order Deny,Allow Deny from all --- 1,5 ---- ! DirectoryIndex index.php5 index.php index.html Options +FollowSymLinks -Indexes ! <FilesMatch "^CVSROOT$|^CVS$|^[.]|^admin$"> Order Deny,Allow Deny from all |
|
From: Behdad E. <be...@us...> - 2008-10-21 19:33:36
|
Update of /cvsroot/rira/rira/php/backend/luceneindex In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15433 Modified Files: luceneindex.php Log Message: Remove check for PCRE. Lucene does this automatically in the UTF8 analyzers. Index: luceneindex.php =================================================================== RCS file: /cvsroot/rira/rira/php/backend/luceneindex/luceneindex.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** luceneindex.php 21 Oct 2008 19:32:38 -0000 1.2 --- luceneindex.php 21 Oct 2008 19:33:29 -0000 1.3 *************** *** 30,37 **** Zend_Search_Lucene_Search_QueryParser::setDefaultOperator(Zend_Search_Lucene_Search_QueryParser::B_AND); Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num()); - - if (!$silent && @preg_match('/\pL/u', 'a') != 1) { - die ("PCRE unicode support needed for UTF-8 lucene is turned off."); - } } --- 30,33 ---- |
|
From: Behdad E. <be...@us...> - 2008-10-21 19:32:46
|
Update of /cvsroot/rira/rira/php/backend/luceneindex In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15235 Modified Files: luceneindex.php Log Message: Use Utf8Num, not Utf8 analyzer. We depend on numbers being searchable, at least when matching idn's. Though, would be better to simply use the default ASCII analyzer for idn. Index: luceneindex.php =================================================================== RCS file: /cvsroot/rira/rira/php/backend/luceneindex/luceneindex.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** luceneindex.php 21 Oct 2008 06:21:46 -0000 1.1 --- luceneindex.php 21 Oct 2008 19:32:38 -0000 1.2 *************** *** 29,33 **** Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('utf-8'); Zend_Search_Lucene_Search_QueryParser::setDefaultOperator(Zend_Search_Lucene_Search_QueryParser::B_AND); ! Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8()); if (!$silent && @preg_match('/\pL/u', 'a') != 1) { --- 29,33 ---- Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('utf-8'); Zend_Search_Lucene_Search_QueryParser::setDefaultOperator(Zend_Search_Lucene_Search_QueryParser::B_AND); ! Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num()); if (!$silent && @preg_match('/\pL/u', 'a') != 1) { |
|
From: Behdad E. <be...@us...> - 2008-10-21 19:28:29
|
Update of /cvsroot/rira/rira/php/module In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv14680/module Modified Files: rira_obj.php Log Message: Remove "AND" from idn queries as Zend Lucene does not allow mixing "+" and "AND". Index: rira_obj.php =================================================================== RCS file: /cvsroot/rira/rira/php/module/rira_obj.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** rira_obj.php 21 Oct 2008 06:19:25 -0000 1.7 --- rira_obj.php 21 Oct 2008 19:28:21 -0000 1.8 *************** *** 335,341 **** $s = "+\"x $mod\""; if (!empty($h["${me}_id"])) ! $s .= " AND +\"".$h["${me}_id"]." $me\""; if (!empty($leaf_obj)) ! $s .= " AND +\"$leaf_obj x\""; return $s; } --- 335,341 ---- $s = "+\"x $mod\""; if (!empty($h["${me}_id"])) ! $s .= " +\"".$h["${me}_id"]." $me\""; if (!empty($leaf_obj)) ! $s .= " +\"$leaf_obj x\""; return $s; } |
|
From: Behdad E. <be...@us...> - 2008-10-21 07:08:48
|
Update of /cvsroot/rira/rira/php/backend/sqldb In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1257/backend/sqldb Modified Files: rira_sqldb_obj.php Log Message: Make Lucene inclusion lazy. Index: rira_sqldb_obj.php =================================================================== RCS file: /cvsroot/rira/rira/php/backend/sqldb/rira_sqldb_obj.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** rira_sqldb_obj.php 21 Oct 2008 06:21:46 -0000 1.7 --- rira_sqldb_obj.php 21 Oct 2008 07:08:37 -0000 1.8 *************** *** 2,6 **** include_once BASE.'backend/sqldb/sqldb.php'; - include_once BASE.'backend/luceneindex/luceneindex.php'; class __rira_sqldb_obj extends __rira_obj { --- 2,5 ---- *************** *** 161,164 **** --- 160,164 ---- $q = get_search_query($q); $idnq = $this->get_idn_query(); + include_once BASE.'backend/luceneindex/luceneindex.php'; $luceneindex = luceneindex_backend_factory::get_luceneindex (false); return $luceneindex->query ($q, $idnq, $limit); |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:25:29
|
Update of /cvsroot/rira/rira/php/backend/luceneindex In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31558/php/backend/luceneindex Added Files: .cvsignore Log Message: . --- NEW FILE: .cvsignore --- index |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:24:17
|
Update of /cvsroot/rira/rira/lucene-java/java/ir/rira/search In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31430/lucene-java/java/ir/rira/search Removed Files: HighFreqTerms.class HighFreqTerms.java IndexObjects.class IndexObjects.java Makefile SearchObjects.class SearchObjects.java TermInfo.class TermInfoQueue.class Log Message: Remove Lucene-Java-based search engine --- HighFreqTerms.class DELETED --- --- Makefile DELETED --- --- TermInfo.class DELETED --- --- HighFreqTerms.java DELETED --- --- TermInfoQueue.class DELETED --- --- SearchObjects.java DELETED --- --- SearchObjects.class DELETED --- --- IndexObjects.java DELETED --- --- IndexObjects.class DELETED --- |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:24:17
|
Update of /cvsroot/rira/rira In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31430 Removed Files: config Log Message: Remove Lucene-Java-based search engine --- config DELETED --- |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:24:15
|
Update of /cvsroot/rira/rira/lucene-java/jar In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31430/lucene-java/jar Removed Files: lucene-1.2.jar lucene-persian.jar pg73jdbc3.jar Log Message: Remove Lucene-Java-based search engine --- pg73jdbc3.jar DELETED --- --- lucene-persian.jar DELETED --- --- lucene-1.2.jar DELETED --- |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:24:15
|
Update of /cvsroot/rira/rira/php/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31430/php/admin Removed Files: searchindex.php Log Message: Remove Lucene-Java-based search engine --- searchindex.php DELETED --- |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:24:15
|
Update of /cvsroot/rira/rira/lucene-java In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31430/lucene-java Removed Files: .cvsignore classpath makeindex search Log Message: Remove Lucene-Java-based search engine --- .cvsignore DELETED --- --- search DELETED --- --- makeindex DELETED --- --- classpath DELETED --- |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:21:53
|
Update of /cvsroot/rira/rira/php/backend/luceneindex/admin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31242/php/backend/luceneindex/admin Added Files: .htaccess indexobjects.php searchobjects.php Log Message: Port to use Zend Framework Lucene port --- NEW FILE: .htaccess --- Order Deny,Allow Deny from all --- NEW FILE: indexobjects.php --- #!/usr/bin/php -f <?php $base = dirname (__FILE__)."/../../.."; global $base; include_once "$base/script/config.php"; include_once "$base/script/include.php"; include_once "$base/backend/sqldb/sqldb.php"; include_once "$base/backend/luceneindex/luceneindex.php"; function &init_db() { global $SERVER_ADDR, $cfg; if (!empty($SERVER_ADDR)) error('accessdenied'); preg_match("|.*//([^:@]*):?([^@]*)@([^/]*)/(.*)|", $cfg['dsn'], $p); $dbname = $p[4]; $hostname = $p[3]; $username = $p[1]; $password = $p[2]; $sqldb = sqldb_backend_factory::get_sqldb (); if (!$sqldb) { # not connected. # if password is not set, assume ident authentication if ($password === '') { echo "password is empty.\n". "you may want to run this script as user $username.\n"; } } if (!$sqldb) { echo "connection failed\n"; exit; } return $sqldb; } function finish_db($sqldb) { } function &init_index() { global $base; $luceneindex = luceneindex_backend_factory::get_luceneindex (true); if (!$luceneindex) { echo "creating index failed\n"; exit; } $luceneindex->index->setMaxBufferedDocs (1000); return $luceneindex; } function finish_index($luceneindex) { echo "optimizing index\n"; $luceneindex->optimize(); $luceneindex->commit(); } function index_object ($luceneindex, $sqldb, $mod, $obj) { $query = "select idn, text from ".$obj."_index"; $res = $sqldb->query($query); if (DB::isError($res)) { echo "query failed on object $obj, skipping\n"; echo "failed query: $query\n"; return; } $i = 0; while ($row = $res->fetchRow()) { $idn = "$mod ".$row['idn']; $luceneindex->add_document($idn, $row['text']); if (++$i % 100 == 0) { echo $i; } echo '.'; } echo "\n"; $sqldb->freeresult($res); } function index_module ($luceneindex, $sqldb, $mod) { $modbase = BASE."module/$mod/"; echo "module $mod\n"; $query = "set search_path to $mod, public"; $modres = $sqldb->query($query); if (DB::isError($modres)) { echo "query failed on module $mod, skipping module\n"; continue; } $sqldb->freeresult($modres); $obj = 'home'; include_once "$modbase$obj.php"; $class_name = "${mod}__${obj}"; if (!class_exists($class_name)) continue; $o = &new $class_name; do { if ($o->searchindexed) { echo "object $o->me\n"; index_object($luceneindex, $sqldb, $mod, $o->me); } } while ($o = $o->create_child()); } function index_db ($luceneindex, $sqldb) { $query = "select module_id from module"; $res = $sqldb->query($query); if (DB::isError($res)) { echo "query failed\n"; exit; } while ($module = $res->fetchRow()) { $mod = $module['module_id']; index_module ($luceneindex, $sqldb, $mod); } $sqldb->freeresult($res); } ini_set ('memory_limit', -1); $sqldb = init_db(); $luceneindex = init_index(); index_db ($luceneindex, $sqldb); finish_index($luceneindex); finish_db($sqldb); echo "done\n"; ?> --- NEW FILE: searchobjects.php --- #!/usr/bin/php -f <?php $base = dirname (__FILE__)."/../../.."; global $base; include_once "$base/script/config.php"; include_once "$base/script/include.php"; include_once "$base/backend/luceneindex/luceneindex.php"; function &init_index() { global $base; $luceneindex = luceneindex_backend_factory::get_luceneindex (false); if (!$luceneindex) { echo "creating index failed\n"; exit; } return $luceneindex; } $luceneindex = init_index(); $hits = $luceneindex->query("صبØ"); foreach ($hits as $hit) { $idn = $hit->idn; $text = $hit->contents; echo "$idn $text\n"; } ?> |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:21:53
|
Update of /cvsroot/rira/rira/php/backend/luceneindex In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31242/php/backend/luceneindex Added Files: luceneindex.php Log Message: Port to use Zend Framework Lucene port --- NEW FILE: luceneindex.php --- <?php include_once "Zend/Search/Lucene.php"; class luceneindex_backend { var $has_schema; function luceneindex_backend ($silent = false, $create = false) { global $cfg; $this->debug = $cfg['debug']; try { if ($create) $index = Zend_Search_Lucene::create($cfg['luceneindex']); else $index = Zend_Search_Lucene::open($cfg['luceneindex']); } catch (Zend_Search_Lucene_Exception $e) { $this->index = null; if ($silent) return; else die ("opening lucene index failed: ".$e->getMessage()); } $this->index = $index; Zend_Search_Lucene::setDefaultSearchField('contents'); Zend_Search_Lucene_Search_QueryParser::setDefaultEncoding('utf-8'); Zend_Search_Lucene_Search_QueryParser::setDefaultOperator(Zend_Search_Lucene_Search_QueryParser::B_AND); Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8()); if (!$silent && @preg_match('/\pL/u', 'a') != 1) { die ("PCRE unicode support needed for UTF-8 lucene is turned off."); } } function query($text='', $idn='', $limit=0) { $q = null; $textquery = null; $idnquery = null; if ($idn) { $idnquery = Zend_Search_Lucene_Search_QueryParser::parse("idn:($idn)"); $q = $idnquery; } if ($text) { $textquery = Zend_Search_Lucene_Search_QueryParser::parse($text); $q = $textquery; } if ($idnquery != null && $textquery != null) { $q = new Zend_Search_Lucene_Search_Query_Boolean(); $q->addSubquery($idnquery, true /* required */); $q->addSubquery($textquery, true /* required */); } Zend_Search_Lucene::setResultSetLimit($limit); return $this->index->find ($q); } function optimize() { return $this->index->optimize(); } function commit() { return $this->index->commit(); } function add_document($idn, $text) { $doc = new Zend_Search_Lucene_Document(); $doc->addField(Zend_Search_Lucene_Field::Text('idn', "x $idn x", 'utf-8')); $doc->addField(Zend_Search_Lucene_Field::Text('contents', $text, 'utf-8')); $this->index->addDocument($doc); } } class luceneindex_backend_factory { static function &get_luceneindex ($create = false) { static $luceneindex = NULL; if (!$luceneindex) { $luceneindex = new luceneindex_backend(true, $create); if (!$luceneindex->index) { echo "Failed opening lucene index\n"; $luceneindex = NULL; } } return $luceneindex; } } ?> |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:21:53
|
Update of /cvsroot/rira/rira/php/page In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31242/php/page Modified Files: search.php Log Message: Port to use Zend Framework Lucene port Index: search.php =================================================================== RCS file: /cvsroot/rira/rira/php/page/search.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** search.php 21 Mar 2006 00:21:40 -0000 1.2 --- search.php 21 Oct 2008 06:21:46 -0000 1.3 *************** *** 22,39 **** if (!empty($q)) { ! $new_q = get_search_query($q); ! ! $idnq = $o->get_idn_query(); $start = (($pageno-1)*$lim); - $cmd = "echo ".escapeshellarg(($lim+1)."\n$start\n$idnq\n$new_q") - . " | ".BASE."../config search"; - $res = explode("\n", `$cmd`); - $clean_q = $res[0]; $title = "Ø¬Ø³ØªØ¬Ù Ø¨Ø±Ø§Û ${q}‏"; $long_title = "ÙØªØ§ÛØ¬Ù Ø¬Ø³ØªØ¬Ù Ø¨Ø±Ø§Û ".notfound(found($html_q, $clean_q, '+'), $clean_q, '-'); ! $o->total_rows = $res[1]; ! $o->num_rows = $res[2]; if ($o->num_rows > $lim && $o->num_rows != $o->total_rows) { $o->num_rows = $lim; --- 22,36 ---- if (!empty($q)) { ! $hits = $o->search ($q); ! ! //$clean_q = $res[0]; ! $clean_q = $q; $start = (($pageno-1)*$lim); $title = "Ø¬Ø³ØªØ¬Ù Ø¨Ø±Ø§Û ${q}‏"; $long_title = "ÙØªØ§ÛØ¬Ù Ø¬Ø³ØªØ¬Ù Ø¨Ø±Ø§Û ".notfound(found($html_q, $clean_q, '+'), $clean_q, '-'); ! $o->total_rows = count ($hits); ! $o->num_rows = max (0, min ($lim+1, $o->total_rows - $start)); if ($o->num_rows > $lim && $o->num_rows != $o->total_rows) { $o->num_rows = $lim; *************** *** 53,59 **** $body .= $d->body_begin(); for ($i = 0; $i < $o->num_rows; $i++) { $d->row_num = $start + $i + 1; ! $idn = &$res[$i*2+3]; unset($res[($i+1)*2]); ! $text = &$res[$i*2+4]; unset($res[($i+1)*2+1]); if (preg_match("/x ([^ ]+) .* ([0-9]+) ([^ ]+) +x *$/", $idn, $fields)) { --- 50,58 ---- $body .= $d->body_begin(); for ($i = 0; $i < $o->num_rows; $i++) { + $hit = &$hits[$start + $i]; unset($hits[$start + $i]); $d->row_num = $start + $i + 1; ! $idn = $hit->idn; ! $text = $hit->contents; ! unset($hit); if (preg_match("/x ([^ ]+) .* ([0-9]+) ([^ ]+) +x *$/", $idn, $fields)) { |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:21:53
|
Update of /cvsroot/rira/rira/php/backend/sqldb In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31242/php/backend/sqldb Modified Files: rira_sqldb_obj.php Log Message: Port to use Zend Framework Lucene port Index: rira_sqldb_obj.php =================================================================== RCS file: /cvsroot/rira/rira/php/backend/sqldb/rira_sqldb_obj.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rira_sqldb_obj.php 21 Oct 2008 06:19:25 -0000 1.6 --- rira_sqldb_obj.php 21 Oct 2008 06:21:46 -0000 1.7 *************** *** 2,5 **** --- 2,6 ---- include_once BASE.'backend/sqldb/sqldb.php'; + include_once BASE.'backend/luceneindex/luceneindex.php'; class __rira_sqldb_obj extends __rira_obj { *************** *** 130,134 **** if (DB::isError($res)) { $this->num_rows = -1; ! return $this->iterator = null; } if ($res->numRows() < 1) { --- 131,136 ---- if (DB::isError($res)) { $this->num_rows = -1; ! $this->iterator = null; ! return $this->iterator; } if ($res->numRows() < 1) { *************** *** 156,159 **** --- 158,167 ---- } + function search ($q, $limit=0) { + $q = get_search_query($q); + $idnq = $this->get_idn_query(); + $luceneindex = luceneindex_backend_factory::get_luceneindex (false); + return $luceneindex->query ($q, $idnq, $limit); + } } |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:21:53
|
Update of /cvsroot/rira/rira/php/script In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31242/php/script Modified Files: config.php Log Message: Port to use Zend Framework Lucene port Index: config.php =================================================================== RCS file: /cvsroot/rira/rira/php/script/config.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** config.php 21 Mar 2006 04:37:44 -0000 1.7 --- config.php 21 Oct 2008 06:21:46 -0000 1.8 *************** *** 40,43 **** --- 40,46 ---- $cfg['db_debug'] = $cfg['debug']; + /* Lucene backend */ + $cfg['luceneindex'] = dirname (__FILE__)."/../backend/luceneindex/index"; + /* Object engine */ $cfg['max_redirect'] = 5; |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:19:33
|
Update of /cvsroot/rira/rira/php/script In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31032/php/script Modified Files: link.php Log Message: Add navigation meta links Index: link.php =================================================================== RCS file: /cvsroot/rira/rira/php/script/link.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** link.php 22 Mar 2006 01:35:36 -0000 1.2 --- link.php 21 Oct 2008 06:19:25 -0000 1.3 *************** *** 10,14 **** } ! function make_link ($s, $p, $class = '') { global $cfg; $lim = link_get_prop($p, 'lim'); --- 10,14 ---- } ! function make_url ($p) { global $cfg; $lim = link_get_prop($p, 'lim'); *************** *** 18,22 **** $id = link_get_prop($p, 'id'); $q = link_get_prop($p, 'q'); ! $t = "<a href=\"?page=$page"; !empty($mod) && $t .= "&mod=$mod"; !empty($obj) && $t .= "&obj=$obj"; --- 18,22 ---- $id = link_get_prop($p, 'id'); $q = link_get_prop($p, 'q'); ! $t = "?page=$page"; !empty($mod) && $t .= "&mod=$mod"; !empty($obj) && $t .= "&obj=$obj"; *************** *** 27,31 **** (isset($p['ord']) && $p['ord']>0) && $t .= "&ord=$p[ord]"; (isset($p['q']) && !empty($q)) && $t .= "&q=".urlencode($q); ! $t .= '"'; if ($class) $t .= ' class="'.$class.'"'; --- 27,42 ---- (isset($p['ord']) && $p['ord']>0) && $t .= "&ord=$p[ord]"; (isset($p['q']) && !empty($q)) && $t .= "&q=".urlencode($q); ! return $t; ! } ! ! function make_link ($s, $p, $class = '') { ! global $cfg; ! $lim = link_get_prop($p, 'lim'); ! $page = link_get_prop($p, 'page'); ! $mod = link_get_prop($p, 'mod'); ! $obj = link_get_prop($p, 'obj'); ! $id = link_get_prop($p, 'id'); ! $q = link_get_prop($p, 'q'); ! $t = '<a href="'.make_url($p).'"'; if ($class) $t .= ' class="'.$class.'"'; |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:19:33
|
Update of /cvsroot/rira/rira/php/page In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31032/php/page Modified Files: todo.php Log Message: Add navigation meta links Index: todo.php =================================================================== RCS file: /cvsroot/rira/rira/php/page/todo.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** todo.php 22 Mar 2006 01:35:36 -0000 1.4 --- todo.php 21 Oct 2008 06:19:25 -0000 1.5 *************** *** 10,16 **** that? humm, link the numbers, not the text. what about poetry? - add navigation links and icon too. - - add more meta: title should be page title, not "RiRa". set - meta for module, object, id, page?, ... - dynamic "keywords" that features all header (haafez, ghazaliaat...!) - public/module and othermodules/home should share [long_]title. - classicpoems__home should get deeper. --- 10,13 ---- *************** *** 20,24 **** - descending sort order - list pages google style ! - link rel copyright! link rel contents, chapter, section?... rev? - Instead of lists, use slashes or vertical bars to separate items. --- 17,21 ---- - descending sort order - list pages google style ! - link rel contents, chapter, section?... rev? - Instead of lists, use slashes or vertical bars to separate items. *************** *** 47,50 **** - Children module ! - Waw-Hamza doesn't appear in the data. Fix the convertor and reimport the data. */ ?> --- 44,47 ---- - Children module ! - Waw-Hamza doesn't appear in the data. Fix the convertor and reimport the data. Ugh! */ ?> |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:19:33
|
Update of /cvsroot/rira/rira/php/backend/sqldb In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31032/php/backend/sqldb Modified Files: rira_sqldb_obj.php Log Message: Add navigation meta links Index: rira_sqldb_obj.php =================================================================== RCS file: /cvsroot/rira/rira/php/backend/sqldb/rira_sqldb_obj.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rira_sqldb_obj.php 23 Apr 2006 13:00:21 -0000 1.5 --- rira_sqldb_obj.php 21 Oct 2008 06:19:25 -0000 1.6 *************** *** 6,10 **** function __rira_sqldb_obj () { ! $this->db = &sqldb_backend_factory::get_sqldb(); parent::__rira_obj(); } --- 6,10 ---- function __rira_sqldb_obj () { ! $this->db = sqldb_backend_factory::get_sqldb(); parent::__rira_obj(); } *************** *** 30,34 **** } $query .= " limit 1"; ! $res = &$this->db->query($query); if (DB::isError($res) || $res->numRows() < 1) return false; --- 30,34 ---- } $query .= " limit 1"; ! $res = $this->db->query($query); if (DB::isError($res) || $res->numRows() < 1) return false; *************** *** 73,77 **** $query = $q; $moreq = "limit 1"; ! $res = &$this->db->query("$query $moreq"); if (DB::isError($res)) { if (empty($q)) { --- 73,77 ---- $query = $q; $moreq = "limit 1"; ! $res = $this->db->query("$query $moreq"); if (DB::isError($res)) { if (empty($q)) { *************** *** 127,131 **** $query = $q; $moreq = " limit ".($limit+1)." offset ".(($pageno-1)*$limit); ! $res = &$this->db->query("$query $moreq"); if (DB::isError($res)) { $this->num_rows = -1; --- 127,131 ---- $query = $q; $moreq = " limit ".($limit+1)." offset ".(($pageno-1)*$limit); ! $res = $this->db->query("$query $moreq"); if (DB::isError($res)) { $this->num_rows = -1; |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:19:33
|
Update of /cvsroot/rira/rira/php In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31032/php Modified Files: .htaccess Log Message: Add navigation meta links Index: .htaccess =================================================================== RCS file: /cvsroot/rira/rira/php/.htaccess,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .htaccess 5 Aug 2005 19:10:50 -0000 1.2 --- .htaccess 21 Oct 2008 06:19:25 -0000 1.3 *************** *** 1,4 **** Options -Indexes ! DirectoryIndex index.php <Files CVS> Order allow,deny --- 1,4 ---- Options -Indexes ! DirectoryIndex index.php5 index.php <Files CVS> Order allow,deny |
|
From: Behdad E. <be...@us...> - 2008-10-21 06:19:33
|
Update of /cvsroot/rira/rira/php/module In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv31032/php/module Modified Files: rira_obj.php Log Message: Add navigation meta links Index: rira_obj.php =================================================================== RCS file: /cvsroot/rira/rira/php/module/rira_obj.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rira_obj.php 21 Oct 2008 05:01:25 -0000 1.6 --- rira_obj.php 21 Oct 2008 06:19:25 -0000 1.7 *************** *** 43,46 **** --- 43,51 ---- $this->p->c = &$this; } + + $h = $this->header; + $p_id = $this->p->me."_id"; + $this->up_obj = array('mod'=>$this->p->module, 'obj'=>$this->p->me, 'id'=>isset($h[$p_id])?$h[$p_id]:0); + return $this->p; } |