# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=head1 systempreferences.pl
-ALGO :
+ALSO :
this script use an $op to know what to do.
if $op is empty or none of the above values,
- the default screen is build (with all records, or filtered datas).
use warnings;
use CGI;
+use MIME::Base64;
use C4::Auth;
use C4::Context;
use C4::Koha;
$tabsysprefs{emailPurchaseSuggestions}="Acquisitions";
$tabsysprefs{RenewSerialAddsSuggestion}="Acquisitions";
$tabsysprefs{AcqCreateItem}="Acquisitions";
- $tabsysprefs{pdfformat}="Acquisitions";
+ $tabsysprefs{OrderPdfFormat}="Acquisitions";
+ $tabsysprefs{OrderPdfTemplate}="Acquisitions";
$tabsysprefs{CurrencyFormat}="Acquisitions";
# Admin
$tabsysprefs{SessionStorage} = "Admin";
$tabsysprefs{noItemTypeImages} = "Admin";
$tabsysprefs{OPACBaseURL} = "Admin";
-$tabsysprefs{GranularPermissions} = "Admin";
# Authorities
$tabsysprefs{authoritysep} = "Authorities";
$tabsysprefs{ReturnToShelvingCart} = "Circulation";
$tabsysprefs{DisplayClearScreenButton} = "Circulation";
$tabsysprefs{AllowAllMessageDeletion} = "Circulation";
+$tabsysprefs{OverdueNoticeBcc} = "Circulation";
+$tabsysprefs{OverduesBlockCirc} = "Circulation";
+
# Staff Client
$tabsysprefs{TemplateEncoding} = "StaffClient";
$tabsysprefs{intranetreadinghistory} = "Patrons";
$tabsysprefs{NotifyBorrowerDeparture} = "Patrons";
$tabsysprefs{memberofinstitution} = "Patrons";
-$tabsysprefs{ReadingHistory} = "Patrons";
$tabsysprefs{BorrowerMandatoryField} = "Patrons";
$tabsysprefs{borrowerRelationship} = "Patrons";
$tabsysprefs{BorrowersTitles} = "Patrons";
$tabsysprefs{QueryAutoTruncate} = "Searching";
$tabsysprefs{QueryRemoveStopwords} = "Searching";
$tabsysprefs{AdvancedSearchTypes} = "Searching";
+$tabsysprefs{DisplayMultiPlaceHold} = "Searching";
# EnhancedContent
$tabsysprefs{AmazonEnabled} = "EnhancedContent";
$tabsysprefs{BakerTaylorUsername} = 'EnhancedContent';
# Library Thing for Libraries
-$tabsysprefs{LibraryThingForLibrariesID} = "EnhancedContent";
-$tabsysprefs{LibraryThingForLibrariesEnabled} = "EnhancedContent";
+$tabsysprefs{LibraryThingForLibrariesID} = "EnhancedContent";
+$tabsysprefs{LibraryThingForLibrariesEnabled} = "EnhancedContent";
$tabsysprefs{LibraryThingForLibrariesTabbedView} = "EnhancedContent";
# Syndetics
$tabsysprefs{XISBN} = "EnhancedContent";
$tabsysprefs{OCLCAffiliateID} = "EnhancedContent";
$tabsysprefs{XISBNDailyLimit} = "EnhancedContent";
-$tabsysprefs{PINESISBN} = "EnhancedContent";
$tabsysprefs{ThingISBN} = "EnhancedContent";
$tabsysprefs{OPACFRBRizeEditions} = "EnhancedContent";
$tabsysprefs{OPACPatronDetails} = "OPAC";
$tabsysprefs{OPACFinesTab} = "OPAC";
$tabsysprefs{DisplayOPACiconsXSLT} = "OPAC";
+$tabsysprefs{AutoSelfCheckAllowed} = "OPAC";
+$tabsysprefs{AutoSelfCheckID} = "OPAC";
+$tabsysprefs{AutoSelfCheckPass} = "OPAC";
# OPAC
$tabsysprefs{SearchMyLibraryFirst} = "OPAC";
# ILS-DI variables
$tabsysprefs{'ILS-DI'} = "ILS-DI";
+
+# Creator variables
+
+$tabsysprefs{'ImageLimit'} = "Creators";
+
sub StringSearch {
my ( $searchstring, $type ) = @_;
my $dbh = C4::Context->dbh;
if ( $type and $type eq 'all' ) {
$sth = $dbh->prepare( "
SELECT *
- FROM systempreferences
- WHERE variable LIKE ? OR explanation LIKE ?
+ FROM systempreferences
+ WHERE variable LIKE ? OR explanation LIKE ?
ORDER BY VARIABLE" );
$sth->execute( "%$searchstring%", "%$searchstring%" );
} else {
if ( not defined( $data->{'type'} ) ) {
$params->{'type-free'} = 1;
$params->{'fieldlength'} = ( defined( $data->{'options'} ) and $data->{'options'} and $data->{'options'} > 0 );
+ } elsif ( $data->{'type'} eq 'Upload' ) {
+ $params->{'type-upload'} = 1;
} elsif ( $data->{'type'} eq 'Choice' ) {
$params->{'type-choice'} = 1;
} elsif ( $data->{'type'} eq 'YesNo' ) {
$value = $params->{'value'};
}
}
+
+ if ( $input->param('preftype') eq 'Upload' ) {
+ my $lgtfh = $input->upload('value');
+ $value = join '', <$lgtfh>;
+ $value = encode_base64($value);
+ }
+
if ( $sth->rows ) {
unless ( C4::Context->config('demo') ) {
my $sth = $dbh->prepare("update systempreferences set value=?,explanation=?,type=?,options=? where variable=?");