When languages are added or removed when need to flush the caches to
keep the interface consistent
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
PO_DIR="$TRANSLATE_DIR/po"
}
+flush_cache()
+{
+ if [ "$dev" = "" ]; then
+ koha-foreach --enabled "$KOHA_HOME/misc/bin/clear_cache.pl"
+ else
+ koha-shell $dev -c "$KOHA_HOME/misc/bin/clear_cache.pl"
+ fi
+}
+
# Control variables
list_all=""
op=""
"list")
list $list_all ;;
"install")
- install_lang $language ;;
+ install_lang $language
+ flush_cache
+ ;;
"update")
update_lang $language ;;
"remove")
- remove_lang $language ;;
+ remove_lang $language
+ flush_cache
+ ;;
"check")
check_lang_po_files $language ;;
*)
--- /dev/null
+#!/usr/bin/perl -w
+
+use Modern::Perl;
+use Koha::Caches;
+
+# Could take parameters to be less rude
+Koha::Caches->get_instance()->flush_all;
+Koha::Caches->get_instance('config')->flush_all;
+Koha::Caches->get_instance('sysprefs')->flush_all;
use Getopt::Long;
use Pod::Usage;
+use Koha::Caches;
+
my $verbose = 0;
my $pref = 0;
else {
$installer->$cmd(\@files);
}
+
+ Koha::Caches->get_instance()->flush_all if $cmd ne 'update';
}
else {
usage();