diff -urp orginal/ftp.backend.inc plugin_manager/ftp.backend.inc
--- orginal/ftp.backend.inc 2008-12-15 21:09:29.000000000 +0100
+++ plugin_manager/ftp.backend.inc 2008-12-21 03:24:15.000000000 +0100
@@ -116,7 +116,8 @@ function ftp_plugin_manager_copy_library
if (empty($ftp_path)) {
foreach ($local_path AS $index => $value) {
unset($local_path[$index]);
- if (ftp_nlist($connect, implode('/', $local_path) .'/'. $dir)) {
+ // jenot: imo critical improvement, else it get mess on the screen
+ if (@ftp_nlist($connect, implode('/', $local_path) .'/'. $dir)) {
$ftp_path = implode('/', $local_path) .'/'. $dir;
drupal_set_message(t('A drupal install was automatically located on ftp at @ftp_path.', array('@ftp_path' => $ftp_path)));
break;
@@ -126,6 +127,9 @@ function ftp_plugin_manager_copy_library
else {
$ftp_path = $ftp_path .'/'. $dir;
if (!@ftp_chdir($connect, $ftp_path)) {
+ // simple jenots improvement ;p
+ // user is human...
+ // we can help and put link to change path, it is faster than searching where i must change path ? :P
drupal_set_message(t('Your provided drupal install directory is invalid.') . l(t('Change it here.'), 'admin/plugin_manager/settings'), 'error');
return FALSE;
}
@@ -133,7 +137,7 @@ function ftp_plugin_manager_copy_library
// If we couldn't guess it, then quit.
if (!isset($ftp_path) || !@ftp_chdir($connect, $ftp_path)) {
- drupal_set_message(t('Could not guess the ftp directory for drupal.'), 'error');
+ drupal_set_message(t('Could not guess the ftp directory for drupal.' . l(t('Set it here.'), 'admin/plugin_manager/settings')), 'error');
return FALSE;
}
diff -urp orginal/plugin_manager.admin.inc plugin_manager/plugin_manager.admin.inc
--- orginal/plugin_manager.admin.inc 2008-12-19 00:31:10.000000000 +0100
+++ plugin_manager/plugin_manager.admin.inc 2008-12-21 03:20:08.000000000 +0100
@@ -143,21 +143,28 @@ function plugin_manager_page_1() {
function plugin_manager_page_2($form_state) {
// On to page two.
$queue_info = variable_get("plugin_manager_queue_info", array());
-
- $link_attr['attributes']['target'] = 'blank';
-
- // Make each one of the md5sum boxes.
+
foreach ($queue_info AS $name => $plugin) {
$version = $form_state['storage'][1][$name .'_version'];
$link = $plugin['release'][$version]['release_link'];
+
+ // simple jenot's hack
+ $handle = fopen($link, "rb");
+ // we are using php5 ;)
+ $md5sum = stream_get_contents($handle);
+ fclose($handle);
+ // get md5 sum from $md5sum
+ // hmm it is quite fast, but can be improved
+ $md5sum = explode("md5_file hash: ",$md5sum);
+ $md5sum = explode("
",$md5sum[1]);
+ $md5sum = $md5sum[0];
+
$form[$name .'_md5sum'] = array(
- '#title' => t('%plugin_title md5_file hash (copy/paste from above or available here)', array('%plugin_title' => $plugin['title'], '!uri' => url($link, $link_attr))),
- '#type' => 'textfield',
- '#size' => 32,
- '#prefix' => "",
+ '#type' => 'hidden',
+ '#value' => $md5sum,
'#required' => TRUE,
);
- }
+}
// Put the continue button up.
$form['submit'] = array(
diff -urp orginal/plugin_manager.module plugin_manager/plugin_manager.module
--- orginal/plugin_manager.module 2008-12-19 00:31:10.000000000 +0100
+++ plugin_manager/plugin_manager.module 2008-12-21 02:43:20.000000000 +0100
@@ -392,12 +392,12 @@ function plugin_manager_get_release_hist
function plugin_manager_runnable() {
// See if we have a way to untar the files.
@include_once("Archive/Tar.php");
- $handle = popen("tar --version", "r");
- if (!fgets($handle) AND !class_exists("Archive_Tar")) {
+ $handle = @popen("tar --version", "r");
+ if (!@fgets($handle) AND !class_exists("Archive_Tar")) {
drupal_set_message(t('The plugin manager cannot run because neither the tar executable nor the Archive/Tar package could be located.'), "error");
return FALSE;
}
- pclose($handle);
+ @pclose($handle);
// See if we have any available backends.
$backends = plugin_manager_backends();