projects
/
srvgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 17600: Standardize our EXPORT_OK
[srvgit]
/
misc
/
cronjobs
/
check-url-quick.pl
diff --git
a/misc/cronjobs/check-url-quick.pl
b/misc/cronjobs/check-url-quick.pl
index
f9b1c32
..
b9108a6
100755
(executable)
--- a/
misc/cronjobs/check-url-quick.pl
+++ b/
misc/cronjobs/check-url-quick.pl
@@
-18,12
+18,15
@@
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
+
+use Koha::Script -cron;
use C4::Context;
use C4::Context;
-use C4::Biblio;
+use C4::Biblio
qw( GetMarcBiblio )
;
use AnyEvent;
use AnyEvent;
-use AnyEvent::HTTP;
+use AnyEvent::HTTP qw( http_request );
+use Encode qw( encode_utf8 );
my ( $verbose, $help, $html ) = ( 0, 0, 0 );
my ( $host, $host_intranet ) = ( '', '' );
my ( $verbose, $help, $html ) = ( 0, 0, 0 );
my ( $host, $host_intranet ) = ( '', '' );
@@
-96,6
+99,7
@@
sub check_all_url {
my $url = $field->subfield('u');
next unless $url;
$url = "$host/$url" unless $url =~ /^http/i;
my $url = $field->subfield('u');
next unless $url;
$url = "$host/$url" unless $url =~ /^http/i;
+ $url = encode_utf8($url);
$count++;
http_request(
HEAD => $url,
$count++;
http_request(
HEAD => $url,