diff --git a/dev-php/phpcaptcha/files/phpcaptcha-2.0.1-pic.patch b/dev-php/phpcaptcha/files/phpcaptcha-2.0.1-pic.patch new file mode 100644 --- /dev/null +++ b/dev-php/phpcaptcha/files/phpcaptcha-2.0.1-pic.patch @@ -0,0 +1,57 @@ +diff -r aa5e56e0f3bc securimage.php +--- a/securimage/securimage.php Fri Dec 31 16:19:41 2010 -0500 ++++ b/securimage/securimage.php Fri Dec 31 16:24:07 2010 -0500 +@@ -107,6 +107,13 @@ + class Securimage { + + /** ++ * The path which contains securimage.php. ++ * ++ * @var string The path to the securimage installation. ++ */ ++ var $basepath; ++ ++ /** + * The desired width of the CAPTCHA image. + * + * @var int +@@ -513,6 +520,9 @@ + session_start(); + } + ++ // Calculated value ++ $this->basepath = dirname(__FILE__); ++ + // Set Default Values + $this->image_width = 230; + $this->image_height = 80; +@@ -520,7 +530,7 @@ + + $this->code_length = 6; + $this->charset = 'ABCDEFGHKLMNPRSTUVWYZabcdefghklmnprstuvwyz23456789'; +- $this->wordlist_file = './words/words.txt'; ++ $this->wordlist_file = $this->basepath . '/words/words.txt'; + $this->use_wordlist = false; + + $this->gd_font_file = 'gdfonts/automatic.gdf'; +@@ -528,7 +538,7 @@ + $this->gd_font_size = 24; + $this->text_x_start = 15; + +- $this->ttf_file = './AHGBold.ttf'; ++ $this->ttf_file = $this->basepath . '/AHGBold.ttf'; + + $this->perturbation = 0.75; + $this->iscale = 5; +@@ -553,9 +563,9 @@ + + $this->image_signature = ''; + $this->signature_color = new Securimage_Color(0x20, 0x50, 0xCC); +- $this->signature_font = './AHGBold.ttf'; ++ $this->signature_font = $this->basepath . '/AHGBold.ttf'; + +- $this->audio_path = './audio/'; ++ $this->audio_path = $this->basepath . '/audio/'; + $this->audio_format = 'mp3'; + $this->session_name = ''; + $this->expiry_time = 900;