| 1 |
<?php |
<?php |
| 2 |
// $Id: drutex_tools.inc,v 1.2 2007/04/25 14:46:28 darthsteven Exp $ |
// $Id: drutex_tools.inc,v 1.2.2.3 2008/03/31 08:05:50 darthsteven Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 13 |
return (object) array( |
return (object) array( |
| 14 |
'title' => t('Toolbox'), |
'title' => t('Toolbox'), |
| 15 |
'description' => t('Tools for more debugging and error logging.'), |
'description' => t('Tools for more debugging and error logging.'), |
| 16 |
'toggle' => false, |
'toggle' => FALSE, |
| 17 |
'weight' => 20 |
'weight' => 20 |
| 18 |
); |
); |
| 19 |
} |
} |
| 22 |
* Implementation of subhook_defaults(). |
* Implementation of subhook_defaults(). |
| 23 |
*/ |
*/ |
| 24 |
function drutex_tools_defaults() { |
function drutex_tools_defaults() { |
| 25 |
$D['drutex_tools_active'] = true; |
$D['drutex_tools_active'] = TRUE; |
| 26 |
$D['drutex_debug'] = false; |
$D['drutex_debug'] = FALSE; |
| 27 |
|
|
| 28 |
return $D; |
return $D; |
| 29 |
} |
} |
| 51 |
$temporary_dir = drutex_var_get("drutex_dir_temporary_$format"); |
$temporary_dir = drutex_var_get("drutex_dir_temporary_$format"); |
| 52 |
$is_writable = is_writable($temporary_dir); |
$is_writable = is_writable($temporary_dir); |
| 53 |
|
|
| 54 |
if ($is_writable == false) { |
if ($is_writable == FALSE) { |
| 55 |
$form["drutex_check_tmpdir"] = array( |
$form["drutex_check_tmpdir"] = array( |
| 56 |
'#type' => 'markup', |
'#type' => 'markup', |
| 57 |
'#value' => $div_error . t('The temporary directory (') . $temporary_dir .') isn\'t writable.'.'</div>' |
'#value' => $div_error . t('The temporary directory (') . $temporary_dir .') isn\'t writable.'.'</div>' |
| 70 |
$image_dir = drutex_var_get("drutex_dir_images_$format"); |
$image_dir = drutex_var_get("drutex_dir_images_$format"); |
| 71 |
$is_writable = is_writable($image_dir); |
$is_writable = is_writable($image_dir); |
| 72 |
|
|
| 73 |
if ($is_writable == false) { |
if ($is_writable == FALSE) { |
| 74 |
$form["drutex_check_imgdir"] = array( |
$form["drutex_check_imgdir"] = array( |
| 75 |
'#type' => 'markup', |
'#type' => 'markup', |
| 76 |
'#value' => $div_error . t('The image directory (') . $image_dir .') isn\'t writable.'.'</div>' |
'#value' => $div_error . t('The image directory (') . $image_dir .') isn\'t writable.'.'</div>' |
| 84 |
} |
} |
| 85 |
|
|
| 86 |
/* |
/* |
| 87 |
LaTeX check |
LaTeX check - We grab -version which should work on all platforms |
| 88 |
*/ |
*/ |
| 89 |
exec('latex -version', $latex_output, $latex_return_value); //We grab the version which should work on all platforms |
exec('latex -version', $latex_output, $latex_return_value); |
| 90 |
|
|
| 91 |
if ($latex_return_value == 127) { |
if ($latex_return_value == 127) { |
| 92 |
$form["drutex_check_latex"] = array( |
$form["drutex_check_latex"] = array( |