svn://svn.open-ils.org/ILS/trunk
........
r9912 | dbs | 2008-06-22 23:04:30 -0400 (Sun, 22 Jun 2008) | 2 lines
Another constraint that needs to be DEFERRED INITIALLY DEFERRED
........
r9914 | miker | 2008-06-22 23:25:17 -0400 (Sun, 22 Jun 2008) | 1 line
explicit casts to support pg 8.3
........
r9918 | dbs | 2008-06-24 11:25:20 -0400 (Tue, 24 Jun 2008) | 2 lines
Add libmemcache and ncurses dependencies on CentOS/RHEL
........
r9919 | dbs | 2008-06-24 14:35:31 -0400 (Tue, 24 Jun 2008) | 3 lines
Add /usr/local/lib to ldconfig on CentOS/RHEL if not already there;
avoids "missing rpl_malloc" error which is rather difficult to debug
........
r9925 | miker | 2008-06-25 12:33:42 -0400 (Wed, 25 Jun 2008) | 1 line
add item and feed ids where appropriate
........
r9931 | miker | 2008-06-25 20:55:58 -0400 (Wed, 25 Jun 2008) | 1 line
proper support for counting short-duration overdue circs
........
r9934 | miker | 2008-06-26 08:47:09 -0400 (Thu, 26 Jun 2008) | 1 line
array_accum defined in the new aggregate function file
........
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@9936
dcc99617-32d9-48b4-a31d-
7c20da2025e4
FROM biblio.record_entry b
JOIN metabib.metarecord m ON (m.fingerprint = b.fingerprint);
-ALTER TABLE metabib.metarecord_source_map ADD CONSTRAINT metabib_metarecord_source_map_metarecord_fkey FOREIGN KEY (metarecord) REFERENCES metabib.metarecord (id);
+ALTER TABLE metabib.metarecord_source_map ADD CONSTRAINT metabib_metarecord_source_map_metarecord_fkey FOREIGN KEY (metarecord) REFERENCES metabib.metarecord (id) DEFERRABLE INITIALLY DEFERRED;
COMMIT;
EJABBERD_PKG=ejabberd-2.0.1_2-linux-x86-installer.bin
EJABBERD_HOST=http://www.process-one.net/downloads/ejabberd
+# libmemcache is not packaged on CentOS/RHEL
+LIBMEMCACHE=libmemcache-1.4.0.rc2
+LIBMEMCACHE_HOST=http://people.freebsd.org/~seanc/libmemcache/
+
# Business::OnlinePayment is not packaged on CentOS/RHEL
PAY_ONLINE=Business-OnlinePayment-3.00_08.tar.gz
PAY_ONLINE_HOST=http://ftp.perl.org/pub/CPAN/authors/id/I/IV/IVAN/
make \
mod_perl \
mod_ssl \
+ ncurses \
+ ncurses-devel \
ntp \
perl-DBD-Pg \
perl-DBI \
# these should be the same for any distro
install: install_yaz install_cpan install_js_sm install_libdbi
-centos: install_centos_pgsql install_centos_rpms install_ejabberd install install_libxml2 install_libxslt install_centos_perl
+centos: install_centos_pgsql install_centos_rpms install_ejabberd install_libmemcache install install_libxml2 install_libxslt install_centos_perl create_ld_local
+
debian: install_pgsql_debian install_debs install debian_sys_config
gentoo: install_gentoos install_gentoo_rc install_gentoo_perl install
chmod u+x $(EJABBERD_PKG).gz
./$(EJABBERD_PKG) --mode unattended --prefix /opt/ejabberd --adminpw evergreen
+# Install libmemcache from the official project source
+install_libmemcache:
+ if [ ! -d $(LIBMEMCACHE) ]; then wget $(LIBMEMCACHE_HOST)/$(LIBMEMCACHE).tar.bz2; fi;
+ tar xjf $(LIBMEMCACHE).tar.bz2
+ cd $(LIBMEMCACHE) && ./configure && make && make install
+
# Install a newer version of libxslt
install_libxslt:
if [ ! -d $(XSLT) ]; then wget $(XSLT_HOST)/$(XSLT).tar.gz; fi;
for m in $(CENTOS_PERL_NOTEST); do perl -MCPAN -e "CPAN::Shell->notest('install', \"$$m\";"; done
for m in $(CENTOS_PERL_LOCAL); do LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib perl -MCPAN -e "install \"$$m\";"; done
+# We need to add /usr/local/lib to the ldconfig list of directories on CentOS,
+# if it is not already there
+create_ld_local:
+ if [ "$$(ldconfig -v 2> /dev/null | grep '^/usr/local/lib' | wc -l)" -eq 0 ]; then \
+ echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf; \
+ ldconfig; \
+ fi;
SELECT id
FROM action.circulation
WHERE usr = ? AND checkin_time IS NULL AND due_date >= 'today' AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
+ WHERE usr = ?
+ AND checkin_time IS NULL
+ AND ( (fine_interval >= '1 day' AND due_date >= 'today')
+ OR (fine_interval < '1 day' AND due_date > 'now' ))
+ AND (stop_fines IS NULL
+ OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
SQL
my $out = actor::user->db_Main->selectcol_arrayref($out_sql, {}, $usr);
my $od_sql = <<" SQL";
SELECT id
FROM action.circulation
- WHERE usr = ? AND checkin_time IS NULL AND due_date < 'today' AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
+ WHERE usr = ?
+ AND checkin_time IS NULL
+ AND ( (fine_interval >= '1 day' AND due_date < 'today')
+ OR (fine_interval < '1 day' AND due_date < 'now' ))
+ AND (stop_fines IS NULL
+ OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
SQL
my $od = actor::user->db_Main->selectcol_arrayref($od_sql, {}, $usr);
my $sth = metabib::metarecord_source_map->db_Main->prepare(<<" SQL");
SELECT *
FROM search.staged_fts(
- $param_search_ou,
- $param_depth,
- $param_searches,
- $param_statuses,
- $param_locations,
- $param_audience,
- $param_language,
- $param_lit_form,
- $param_types,
- $param_forms,
- $param_vformats,
- $param_bib_level,
- $param_pref_lang,
- $param_pref_lang_multiplier,
- $param_sort,
- $param_sort_desc,
- $metarecord,
- $staff,
- $param_rel_limit,
- $param_chk_limit,
- $param_skip_chk
+ $param_search_ou\:\:INT,
+ $param_depth\:\:INT,
+ $param_searches\:\:TEXT,
+ $param_statuses\:\:INT[],
+ $param_locations\:\:INT[],
+ $param_audience\:\:TEXT[],
+ $param_language\:\:TEXT[],
+ $param_lit_form\:\:TEXT[],
+ $param_types\:\:TEXT[],
+ $param_forms\:\:TEXT[],
+ $param_vformats\:\:TEXT[],
+ $param_bib_level\:\:TEXT[],
+ $param_pref_lang\:\:TEXT,
+ $param_pref_lang_multiplier\:\:REAL,
+ $param_sort\:\:TEXT,
+ $param_sort_desc\:\:BOOL,
+ $metarecord\:\:BOOL,
+ $staff\:\:BOOL,
+ $param_rel_limit\:\:INT,
+ $param_chk_limit\:\:INT,
+ $param_skip_chk\:\:INT
);
SQL
$flesh_feed
);
$feed->root($root);
+ $feed->id($bucket_tag);
$feed->title("Items in Book Bag [".$bucket->name."]");
$feed->creator($host);
$node->add_holdings($xml);
}
- $node->id($item_tag) if ($flesh);
+ $node->id($item_tag);
#$node->update_ts(clense_ISO8601($record->edit_date));
$node->link(alternate => $feed->unapi . "?id=$item_tag&format=htmlholdings-full" => 'text/html') if ($flesh);
$node->link(opac => $feed->unapi . "?id=$item_tag&format=opac") if ($flesh);
my $self = shift;
my $id = shift;
- $self->_create_node( '/atom:feed', 'http://www.w3.org/2005/Atom', 'id', $id );
+ $self->_create_node( $self->{item_xpath}, 'http://www.w3.org/2005/Atom', 'id', $id );
}
package OpenILS::WWW::SuperCat::Feed::atom::item;
);
}
+sub id {
+ my $self = shift;
+ my $id = shift;
+
+ $self->_create_node($self->{item_xpath}, undef,'guid', $id);
+}
+
package OpenILS::WWW::SuperCat::Feed::rss2::item;
use base 'OpenILS::WWW::SuperCat::Feed::rss2';
CREATE OR REPLACE FUNCTION public.call_number_dewey( TEXT ) RETURNS TEXT AS $$
my $txt = shift;
$txt =~ s/^\s+//o;
- $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//o;
+ $txt =~ s/[\[\]\{\}\(\)`'"#<>\*\?\-\+\$\\]+//og;
$txt =~ s/\s+$//o;
if ($txt =~ /(\d{3}(?:\.\d+)?)/o) {
return $1;
) z;
$$ LANGUAGE SQL STABLE;
-CREATE AGGREGATE array_accum (
- sfunc = array_append,
- basetype = anyelement,
- stype = anyarray,
- initcond = '{}'
-);