Removing old PO files, removing clutter
[koha_fer] / C4 / Context.pm
index b76b7ac..e762aa5 100644 (file)
@@ -106,6 +106,19 @@ use constant CONFIG_FNAME => "/etc/koha.xml";
 $context = undef;        # Initially, no context is set
 @context_stack = ();        # Initially, no saved contexts
 
+
+=item KOHAVERSION
+    returns the kohaversion stored in kohaversion.pl file
+=cut
+
+sub KOHAVERSION {
+    my $cgidir = C4::Context->intranetdir ."/cgi-bin";
+    unless (opendir(DIR, "$cgidir/cataloguing/value_builder")) {
+            $cgidir = C4::Context->intranetdir;
+    }
+    do $cgidir."/kohaversion.pl" || die "NO $cgidir/kohaversion.pl";
+    return kohaversion();
+}
 =item read_config_file
 
 =over 4
@@ -138,7 +151,7 @@ Returns undef in case of error.
 sub read_config_file {
     my $fname = shift;    # Config file to read
     my $retval = {};    # Return value: ref-to-hash holding the configuration
-    my $koha = XMLin($fname, keyattr => ['id'],forcearray => ['listen']);
+    my $koha = XMLin($fname, keyattr => ['id'],forcearray => ['listen', 'server', 'serverinfo']);
     return $koha;
 }
 
@@ -338,7 +351,7 @@ sub zebraconfig
     # Return the value of the requested config variable
     return $context->{"server"}->{$var};
 }
-sub zebraoptions
+sub ModZebrations
 {
     my $self = shift;
     my $var = shift;        # The config variable to return
@@ -475,7 +488,6 @@ sub _new_Zconn {
     my $user = $context->{"serverinfo"}->{$server}->{"user"};
     my $servername = $context->{"config"}->{$server};
     my $password = $context->{"serverinfo"}->{$server}->{"password"};
-    warn "server:$server servername :$servername host:$host";
     retry:
     eval {
         # set options
@@ -544,7 +556,8 @@ sub _new_dbh
                 $db_user, $db_passwd);
     # Koha 3.0 is utf-8, so force utf8 communication between mySQL and koha, whatever the mysql default config.
     # this is better than modifying my.cnf (and forcing all communications to be in utf8)
-     $dbh->do("set NAMES 'utf8'") if ($dbh);
+    $dbh->do("set NAMES 'utf8'") if ($dbh);
+    $dbh->{'mysql_enable_utf8'}=1; #enable
     return $dbh;
 }
 
@@ -874,6 +887,71 @@ Joshua Ferraro <jmf at liblime dot com>
 =cut
 
 # $Log$
+# Revision 1.57  2007/05/22 09:13:55  tipaul
+# Bugfixes & improvements (various and minor) :
+# - updating templates to have tmpl_process3.pl running without any errors
+# - adding a drupal-like css for prog templates (with 3 small images)
+# - fixing some bugs in circulation & other scripts
+# - updating french translation
+# - fixing some typos in templates
+#
+# Revision 1.56  2007/04/23 15:21:17  tipaul
+# renaming currenttransfers to transferstoreceive
+#
+# Revision 1.55  2007/04/17 08:48:00  tipaul
+# circulation cleaning continued: bufixing
+#
+# Revision 1.54  2007/03/29 16:45:53  tipaul
+# Code cleaning of Biblio.pm (continued)
+#
+# All subs have be cleaned :
+# - removed useless
+# - merged some
+# - reordering Biblio.pm completly
+# - using only naming conventions
+#
+# Seems to have broken nothing, but it still has to be heavily tested.
+# Note that Biblio.pm is now much more efficient than previously & probably more reliable as well.
+#
+# Revision 1.53  2007/03/29 13:30:31  tipaul
+# Code cleaning :
+# == Biblio.pm cleaning (useless) ==
+# * some sub declaration dropped
+# * removed modbiblio sub
+# * removed moditem sub
+# * removed newitems. It was used only in finishrecieve. Replaced by a TransformKohaToMarc+AddItem, that is better.
+# * removed MARCkoha2marcItem
+# * removed MARCdelsubfield declaration
+# * removed MARCkoha2marcBiblio
+#
+# == Biblio.pm cleaning (naming conventions) ==
+# * MARCgettagslib renamed to GetMarcStructure
+# * MARCgetitems renamed to GetMarcItem
+# * MARCfind_frameworkcode renamed to GetFrameworkCode
+# * MARCmarc2koha renamed to TransformMarcToKoha
+# * MARChtml2marc renamed to TransformHtmlToMarc
+# * MARChtml2xml renamed to TranformeHtmlToXml
+# * zebraop renamed to ModZebra
+#
+# == MARC=OFF ==
+# * removing MARC=OFF related scripts (in cataloguing directory)
+# * removed checkitems (function related to MARC=off feature, that is completly broken in head. If someone want to reintroduce it, hard work coming...)
+# * removed getitemsbybiblioitem (used only by MARC=OFF scripts, that is removed as well)
+#
+# Revision 1.52  2007/03/16 01:25:08  kados
+# Using my precrash CVS copy I did the following:
+#
+# cvs -z3 -d:ext:kados@cvs.savannah.nongnu.org:/sources/koha co -P koha
+# find koha.precrash -type d -name "CVS" -exec rm -v {} \;
+# cp -r koha.precrash/* koha/
+# cd koha/
+# cvs commit
+#
+# This should in theory put us right back where we were before the crash
+#
+# Revision 1.52  2007/03/12 21:17:05  rych
+# add server, serverinfo as arrays from config
+#
 # Revision 1.51  2007/03/09 14:31:47  tipaul
 # rel_3_0 moved to HEAD
 #
@@ -889,10 +967,10 @@ Joshua Ferraro <jmf at liblime dot com>
 # In this commit, I created a "fake" user when insecure=ON. It has a fake branch. You may find better to have the 1st branch in branch table instead of a fake one.
 #
 # Revision 1.43.2.8  2006/12/19 16:48:16  alaurin
-# reident programs, and adding branchcode value in reserves2
+# reident programs, and adding branchcode value in reserves
 #
 # Revision 1.43.2.7  2006/12/06 21:55:38  hdl
-# Adding zebraoptions for servers to get serverinfos in Context.pm
+# Adding ModZebrations for servers to get serverinfos in Context.pm
 # Using this function in rebuild_zebra.pl
 #
 # Revision 1.43.2.6  2006/11/24 21:18:31  kados