mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2011-08-31 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php: fixed in function "string2image" when generate a image in other location, now have one more parameter, $homeurl, by default empty string. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4860 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
581fd71017
commit
8fed37b228
@ -1,3 +1,9 @@
|
|||||||
|
2011-08-31 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions.php: fixed in function "string2image" when generate a
|
||||||
|
image in other location, now have one more parameter, $homeurl, by default
|
||||||
|
empty string.
|
||||||
|
|
||||||
2011-08-31 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-08-31 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* operation/users/user_edit.php: Reload page to update skin.
|
* operation/users/user_edit.php: Reload page to update skin.
|
||||||
|
@ -1205,7 +1205,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', $snmp3_au
|
|||||||
*/
|
*/
|
||||||
function string2image($string, $width, $height, $fontsize = 3,
|
function string2image($string, $width, $height, $fontsize = 3,
|
||||||
$degrees = '0', $bgcolor = '#FFFFFF', $textcolor = '#000000',
|
$degrees = '0', $bgcolor = '#FFFFFF', $textcolor = '#000000',
|
||||||
$padding_left = 4, $padding_top = 1) {
|
$padding_left = 4, $padding_top = 1, $home_url = '') {
|
||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -1222,12 +1222,14 @@ function string2image($string, $width, $height, $fontsize = 3,
|
|||||||
$stringFile = str_replace('/', '___', $string);
|
$stringFile = str_replace('/', '___', $string);
|
||||||
|
|
||||||
// Generate the image
|
// Generate the image
|
||||||
$file_url = 'attachment/string2image-'.$stringFile.'.gif';
|
$file_url = $config['attachment_store'] . '/string2image-'.$stringFile.'.gif';
|
||||||
imagegif($rotated, $file_url);
|
imagegif($rotated, $file_url);
|
||||||
imagedestroy($rotated);
|
imagedestroy($rotated);
|
||||||
|
|
||||||
$file_url = str_replace('#','%23',$file_url);
|
$file_url = str_replace('#','%23',$file_url);
|
||||||
$file_url = str_replace('%','%25',$file_url);
|
$file_url = str_replace('%','%25',$file_url);
|
||||||
|
$file_url = str_replace($config['attachment_store'], $home_url . 'attachment', $file_url);
|
||||||
|
|
||||||
return $file_url;
|
return $file_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user