X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=admin%2Fcities.pl;h=58e33aed17b892ab2354397899c98041e4f668a9;hb=363ea5ce08c6e7c729a3d407b498bf89ea8a9d25;hp=1e7e87759404bbba49f186409314f17d21c59c49;hpb=7bebd743d017442fce72412f55c74fa9da9c8cea;p=koha_gimpoz diff --git a/admin/cities.pl b/admin/cities.pl index 1e7e877594..58e33aed17 100755 --- a/admin/cities.pl +++ b/admin/cities.pl @@ -13,9 +13,9 @@ # 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. use strict; use warnings; @@ -86,15 +86,10 @@ if ($op eq 'add_form') { # called by default form, used to confirm deletion of data in DB } elsif ($op eq 'delete_confirm') { $template->param(delete_confirm => 1); - my $sth=$dbh->prepare("select count(*) as total from borrowers,cities where borrowers.city=cities.city_name and cityid=?"); - # FIXME: this check used to pretend there was a FK "select_city" in borrowers. + my $sth=$dbh->prepare("select cityid,city_name,city_zipcode from cities where cityid=?"); $sth->execute($cityid); - my $total = $sth->fetchrow_hashref; - my $sth2=$dbh->prepare("select cityid,city_name,city_zipcode from cities where cityid=?"); - $sth2->execute($cityid); - my $data=$sth2->fetchrow_hashref; + my $data=$sth->fetchrow_hashref; $template->param( - total => $total->{'total'}, city_name => $data->{'city_name'}, city_zipcode => $data->{'city_zipcode'}, );