Permalink
Browse files

Item38: Moved from system() to ->sysCommand()

git-svn-id: http://svn.foswiki.org/trunk/PhotoarchivePlugin@476 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
RobManson RobManson
RobManson authored and RobManson committed Nov 9, 2008
1 parent 232faa4 commit 47cf81b299fb527e11975493067f639214d5d914
Showing with 13 additions and 5 deletions.
  1. +13 −5 lib/TWiki/Plugins/PhotoarchivePlugin.pm
@@ -34,7 +34,7 @@ package TWiki::Plugins::PhotoarchivePlugin;
# =========================
#use TWiki::Plugins::PhotoarchivePlugin::;
#use TWiki::Func;
use TWiki::Func;
#use CGI;
# =========================
@@ -388,7 +388,9 @@ sub getDescriptedContent
if $debug;
# create descripted images
system("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
#system("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
# "$bin_pnmscale $pnmwidth $pnmheight | $bin_pnmtojpeg > \"$sourcedescripted\"");
$sandbox->sysCommand("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
"$bin_pnmscale $pnmwidth $pnmheight | $bin_pnmtojpeg > \"$sourcedescripted\"");
}
@@ -566,7 +568,9 @@ sub getDetailedContent
if $debug;
# create image
system("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
#system("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
# "$bin_pnmscale $pnmwidth $pnmheight | $bin_pnmtojpeg > \"$sourcedetailed\"");
$sandbox->sysCommand("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
"$bin_pnmscale $pnmwidth $pnmheight | $bin_pnmtojpeg > \"$sourcedetailed\"");
}
@@ -726,7 +730,9 @@ sub getThumbsContent
if $debug;
# create thumbnails
system("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
#system("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
# "$bin_pnmscale $pnmwidth $pnmheight | $bin_pnmtojpeg > \"$sourcethumb\"");
$sandbox->sysCommand("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
"$bin_pnmscale $pnmwidth $pnmheight | $bin_pnmtojpeg > \"$sourcethumb\"");
}
@@ -1013,7 +1019,9 @@ sub startRandom
if $debug;
# create image
system("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
#system("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
# "$bin_pnmscale $pnmwidth $pnmheight | $bin_pnmtojpeg > \"$destimage\"");
$sandbox->sysCommand("$bin_anytopnm \"$sourceimage\" 2> /dev/null | ".
"$bin_pnmscale $pnmwidth $pnmheight | $bin_pnmtojpeg > \"$destimage\"");
}

0 comments on commit 47cf81b

Please sign in to comment.