Bug 12856: koha-disable fails without disabling site

To test:
Package up a branch with this patch
install that package
create a site - sudo koha-create --create-db testdisable
enable a site - sudo koha-enable testdisable
check it's enabled - sudo koha-list --enabled
* it should show up
disable a site - sudo koha-disable testdisable
Do this for both debian squeeze/wheezy and ubuntu 12.04 and 14.04, if you can. I'd like to see a sign off from a debian (sq/wh)eez(e/y) or ubuntu 12 user, because I could only test reliably on ubuntu 14.04.
* make sure apache restarts and no errors are produced
check it's disabled - sudo koha-list --enabled
* it should not show up
check the site is still there - sudo koha-list
* it should still be there
check that the config file has the Include for disabling uncommented
* the line Include /etc/koha/apache-shared-disable.conf should not have a # in front.
Re-enable the site - sudo koha-enable testdisable
* the line Include /etc/koha/apache-shared-disable.conf should have a # in front.

And the final question - does the site work? All other functions unchanged?

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected. code reads better too.
Edit: I added a missing space in one line.
Bug 13215: The same letter code can be used for several libraries

This patch fixes a major issue introduced by the
commit 5c4fdcf Bug 11742: A letter code should be unique.

The interface should let the possibility to create a default template
letter and some specific ones, with the same letter code (letter.code).

The patches submitted on bug 11742 tried to fix an issue based on a
(very bad) assumption: letter.code should be considered as a primary key and
should be uniq.

This patch reintroduces this behavior.
Note that the interface will block a letter code used in different
module (this is consistent not to have the same letter code used for different
needs).

This patch is absolutely not perfect, it just tries to change as less
change as possible and to use new tested subroutines.

Test plan:
1/ Verify that the problem raised on bug 11742 does not appears anymore.
2/ Verify there are no regression on adding, editing, copying, deleting
letters.
3/ Verify you are allowed to create a default letter template with a letter
code and to reuse for a specific letter (i.e. for a given library).

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13215: Fix notice edition

C4::Letters::getletter does not set mtt in value ( i.e. { email => "my
email notice} ) at the contrary of the get_letter routine defined in
tools/letters.pl.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13215: Fix notice deletion

This patch could have only been
-        name => $values[0]->{name},
+        name => $letter->{name},

Other changes are just indentation and variable names (send an hashref
$letter to the template and use the Branches TT plugin to display the
branch name)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13215: (follow-up) Fix notice edition

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Bug 13215: Fix GetLetterTemplates should return default templates if branchcode is not defined

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>