Bugzilla – Attachment 5271 Details for
Bug 6516
koha-create makes assumptions about borrowernumber of staff user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6516 - Make borrowernumber of staff user configurable in koha-create
Bug-6516---Make-borrowernumber-of-staff-user-confi.patch (text/plain), 2.63 KB, created by
Robin Sheat
on 2011-09-02 03:37:29 UTC
(
hide
)
Description:
Bug 6516 - Make borrowernumber of staff user configurable in koha-create
Filename:
MIME Type:
Creator:
Robin Sheat
Created:
2011-09-02 03:37:29 UTC
Size:
2.63 KB
patch
obsolete
>From bdfedc937605e09275acbe88065d6d3022ce8c86 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@enger.priv.no> >Date: Tue, 9 Aug 2011 10:22:20 +0200 >Subject: [PATCH] Bug 6516 - Make borrowernumber of staff user configurable in koha-create > >Sets the default borrowernumber of staff user to 1 and makes it possible >to override this with ADMINUSER in /etc/koha/koha-sites.conf or with the >--adminuser and -a command line options. > >Remember to update the wiki if this gets pushed! > >Signed-off-by: Robin Sheat <robin@catalyst.net.nz> >--- > debian/scripts/koha-create | 15 +++++++++++---- > 1 files changed, 11 insertions(+), 4 deletions(-) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index 018cae5..fee39b7 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -23,7 +23,7 @@ usage="Usage: $0 [--create-db|--request-db|--populate-db] \ > [--marcflavor marc21|normarc|unimarc] \ > [--zebralang en|nb|fr] \ > [--defaultsql /path/to/some.sql] \ >- [--configfile /path/to/config] instancename" >+ [--configfile /path/to/config] [--adminuser n] instancename" > > die() { > echo "$@" 1>&2 >@@ -79,14 +79,15 @@ INTRASUFFIX="" > DEFAULTSQL="" > ZEBRA_MARC_FORMAT="marc21" > ZEBRA_LANGUAGE="en" >+ADMINUSER="1" > if [ -e /etc/koha/koha-sites.conf ] > then > . /etc/koha/koha-sites.conf > fi > >-[ $# -ge 2 ] && [ $# -le 10 ] || die $usage >+[ $# -ge 2 ] && [ $# -le 12 ] || die $usage > >-TEMP=`getopt -o crpm:l:d:f: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile: \ >+TEMP=`getopt -o crpm:l:d:f:a: -l create-db,request-db,populate-db,marcflavor:,zebralang:,defaultsql:,configfile:,adminuser: \ > -n "$0" -- "$@"` > > # Note the quotes around `$TEMP': they are essential! >@@ -96,6 +97,7 @@ eval set -- "$TEMP" > CLO_ZEBRA_MARC_FORMAT="" > CLO_ZEBRA_LANGUAGE="" > CLO_DEFAULTSQL="" >+CLO_ADMINUSER="" > > while true ; do > case "$1" in >@@ -106,6 +108,7 @@ while true ; do > -l|--zebralang) CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;; > -d|--defaultsql) CLO_DEFAULTSQL="$2" ; shift 2 ;; > -f|--configfile) configfile="$2" ; shift 2 ;; >+ -a|--adminuser) CLO_ADMINUSER="$2" ; shift 2 ;; > --) shift ; break ;; > *) die "Internal error processing command line arguments" ;; > esac >@@ -135,6 +138,10 @@ if [ "$CLO_DEFAULTSQL" != "" ] > then > DEFAULTSQL="$CLO_DEFAULTSQL" > fi >+if [ "$CLO_ADMINUSER" != "" ] >+then >+ ADMINUSER="$CLO_ADMINUSER" >+fi > > name="$1" > >@@ -264,7 +271,7 @@ then > USE \`$mysqldb\`; > UPDATE borrowers > SET password = '$staffdigest' >-WHERE borrowernumber = 3; >+WHERE borrowernumber = $ADMINUSER; > eof > #` > echo "staff user password is '$staffpass' but keep that secret" >-- >1.7.4.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6516
:
5040
| 5271