projects
/
irspy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ff3ea56
)
read database name from config
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 14 Apr 2010 13:49:41 +0000
(13:49 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 14 Apr 2010 13:49:41 +0000
(13:49 +0000)
web/htdocs/details/ap.mc
patch
|
blob
|
history
web/htdocs/details/check.mc
patch
|
blob
|
history
web/htdocs/details/delete.mc
patch
|
blob
|
history
web/htdocs/details/edit.mc
patch
|
blob
|
history
web/htdocs/details/found.mc
patch
|
blob
|
history
web/htdocs/details/full.mc
patch
|
blob
|
history
web/htdocs/details/stats.mc
patch
|
blob
|
history
web/htdocs/details/upload.mc
patch
|
blob
|
history
web/htdocs/raw.html
patch
|
blob
|
history
diff --git
a/web/htdocs/details/ap.mc
b/web/htdocs/details/ap.mc
index
abec956
..
51ba3ea
100644
(file)
--- a/
web/htdocs/details/ap.mc
+++ b/
web/htdocs/details/ap.mc
@@
-4,7
+4,8
@@
$id
$set
</%args>
<%perl>
$set
</%args>
<%perl>
-my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1");
+my $db = ZOOM::IRSpy::connect_to_registry();
+my $conn = new ZOOM::Connection($db);
$conn->option(elementSetName => "zeerex");
my $query = cql_target($id);
my $rs = $conn->search(new ZOOM::Query::CQL($query));
$conn->option(elementSetName => "zeerex");
my $query = cql_target($id);
my $rs = $conn->search(new ZOOM::Query::CQL($query));
diff --git
a/web/htdocs/details/check.mc
b/web/htdocs/details/check.mc
index
1c23f7a
..
7d22a03
100644
(file)
--- a/
web/htdocs/details/check.mc
+++ b/
web/htdocs/details/check.mc
@@
-33,7
+33,8
@@
$m->flush_buffer();
# on in the HTTP configuration, so we don't even try -- instead,
# having ZOOM::IRSpy::Web::log() explicitly calling $m->flush_buffer()
# on in the HTTP configuration, so we don't even try -- instead,
# having ZOOM::IRSpy::Web::log() explicitly calling $m->flush_buffer()
-my $spy = new ZOOM::IRSpy::Web("localhost:8018/IR-Explain---1",
+my $db = ZOOM::IRSpy::connect_to_registry();
+my $spy = new ZOOM::IRSpy::Web($db,
admin => "fruitbat");
$spy->log_init_level($YAZ_LOG);
$spy->targets(@id) if !$allTargets;
admin => "fruitbat");
$spy->log_init_level($YAZ_LOG);
$spy->targets(@id) if !$allTargets;
diff --git
a/web/htdocs/details/delete.mc
b/web/htdocs/details/delete.mc
index
2b7effd
..
981f8b2
100644
(file)
--- a/
web/htdocs/details/delete.mc
+++ b/
web/htdocs/details/delete.mc
@@
-15,7
+15,8
@@
$really => 0
</p>
% } else {
<%perl>
</p>
% } else {
<%perl>
- my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1", 0,
+ my $db = ZOOM::IRSpy::connect_to_registry();
+ my $conn = new ZOOM::Connection($db, 0,
user => "admin", password => "fruitbat",
elementSetName => "zeerex");
ZOOM::IRSpy::_delete_record($conn, $id);
user => "admin", password => "fruitbat",
elementSetName => "zeerex");
ZOOM::IRSpy::_delete_record($conn, $id);
diff --git
a/web/htdocs/details/edit.mc
b/web/htdocs/details/edit.mc
index
e0403a4
..
3ee62b4
100644
(file)
--- a/
web/htdocs/details/edit.mc
+++ b/
web/htdocs/details/edit.mc
@@
-32,7
+32,8
@@
duplicate ID.
die "op = new but id defined" if $op eq "new" && defined $id;
die "op != new but id undefined" if $op ne "new" && !defined $id;
die "op = new but id defined" if $op eq "new" && defined $id;
die "op != new but id undefined" if $op ne "new" && !defined $id;
-my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1", 0,
+my $db = ZOOM::IRSpy::connect_to_registry();
+my $conn = new ZOOM::Connection($db, 0,
user => "admin", password => "fruitbat",
elementSetName => "zeerex");
user => "admin", password => "fruitbat",
elementSetName => "zeerex");
diff --git
a/web/htdocs/details/found.mc
b/web/htdocs/details/found.mc
index
0f44196
..
443181e
100644
(file)
--- a/
web/htdocs/details/found.mc
+++ b/
web/htdocs/details/found.mc
@@
-54,7
+54,8
@@
if ($sort) {
my $tried_to_open = 0;
if (!defined $conn) {
OPEN:
my $tried_to_open = 0;
if (!defined $conn) {
OPEN:
- $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1");
+ my $db = ZOOM::IRSpy::connect_to_registry();
+ $conn = new ZOOM::Connection($db);
$conn->option(elementSetName => "zeerex");
$conn->option(count => 20);
}
$conn->option(elementSetName => "zeerex");
$conn->option(count => 20);
}
diff --git
a/web/htdocs/details/full.mc
b/web/htdocs/details/full.mc
index
73836a1
..
baec260
100644
(file)
--- a/
web/htdocs/details/full.mc
+++ b/
web/htdocs/details/full.mc
@@
-3,7
+3,8
@@
$id
</%args>
<%perl>
$id
</%args>
<%perl>
-my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1");
+my $db = ZOOM::IRSpy::connect_to_registry();
+my $conn = new ZOOM::Connection($db);
$conn->option(elementSetName => "zeerex");
my $query = cql_target($id);
my $rs = $conn->search(new ZOOM::Query::CQL($query));
$conn->option(elementSetName => "zeerex");
my $query = cql_target($id);
my $rs = $conn->search(new ZOOM::Query::CQL($query));
diff --git
a/web/htdocs/details/stats.mc
b/web/htdocs/details/stats.mc
index
c01c302
..
f44c349
100644
(file)
--- a/
web/htdocs/details/stats.mc
+++ b/
web/htdocs/details/stats.mc
@@
-27,7
+27,8
@@
my $from_cache = 1;
my $stats = $m->cache->get($key);
if (!defined $stats || $reload) {
$from_cache = 0;
my $stats = $m->cache->get($key);
if (!defined $stats || $reload) {
$from_cache = 0;
- $stats = new ZOOM::IRSpy::Stats("localhost:8018/IR-Explain---1", $query);
+ my $db = ZOOM::IRSpy::connect_to_registry();
+ $stats = new ZOOM::IRSpy::Stats($db, $query);
$m->cache->set($key, $stats, "1 day");
}
</%perl>
$m->cache->set($key, $stats, "1 day");
}
</%perl>
diff --git
a/web/htdocs/details/upload.mc
b/web/htdocs/details/upload.mc
index
3809292
..
c32df58
100644
(file)
--- a/
web/htdocs/details/upload.mc
+++ b/
web/htdocs/details/upload.mc
@@
-48,7
+48,8
@@
if (!defined $fin) {
my $xml = join("", <$fin>);
my $xc = irspy_xpath_context($xml);
my $id = irspy_record2identifier($xc);
my $xml = join("", <$fin>);
my $xc = irspy_xpath_context($xml);
my $id = irspy_record2identifier($xc);
-my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1", 0,
+my $db = ZOOM::IRSpy::connect_to_registry();
+my $conn = new ZOOM::Connection($db, 0,
user => "admin", password => "fruitbat",
elementSetName => "zeerex");
ZOOM::IRSpy::_rewrite_zeerex_record($conn, $xc->getContextNode());
user => "admin", password => "fruitbat",
elementSetName => "zeerex");
ZOOM::IRSpy::_rewrite_zeerex_record($conn, $xc->getContextNode());
diff --git
a/web/htdocs/raw.html
b/web/htdocs/raw.html
index
a198880
..
f279843
100644
(file)
--- a/
web/htdocs/raw.html
+++ b/
web/htdocs/raw.html
@@
-7,7
+7,8
@@
use ZOOM;
use ZOOM::IRSpy::Utils qw(cql_target);
</%once>
<%perl>
use ZOOM::IRSpy::Utils qw(cql_target);
</%once>
<%perl>
-my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1");
+my $db = ZOOM::IRSpy::connect_to_registry();
+my $conn = new ZOOM::Connection($db);
$conn->option(elementSetName => "zeerexNoAuth");
my $rs = $conn->search(new ZOOM::Query::CQL(cql_target($id)));
my $n = $rs->size();
$conn->option(elementSetName => "zeerexNoAuth");
my $rs = $conn->search(new ZOOM::Query::CQL(cql_target($id)));
my $n = $rs->size();