I have hacked fbconnect.module to run file_scan_directory. Essentially we go from:

$lib_path = drupal_get_path('module', 'fbconnect') .'/facebook-client/';
$lib_files = array(
'facebook.php',
'facebook_desktop.php',
'jsonwrapper/jsonwrapper_inner.php',
'jsonwrapper/jsonwrapper.php',
'jsonwrapper/JSON/JSON.php'
);

foreach ($lib_files as $files) {
if (!file_exists($lib_path.$files)) {
drupal_set_message(t('Fbconnect : Facebook PHP library file @file not found see readme.txt',
array('@file' => $files)), 'status', FALSE);
return;
}
}

to

$lib_path = drupal_get_path('module', 'fbconnect') .'/facebook-client';
$lib_files_raw = array( //sfyn: we do a file scan directory for each of these files to get around changes to the client library file structure
'facebook.php' => file_scan_directory ($lib_path,'facebook.php',array('.', '..', 'CVS'),0,TRUE,'basename'),
'facebook_desktop.php' => file_scan_directory ($lib_path,'facebook_desktop.php',array('.', '..', 'CVS'),0,TRUE,'basename'),
'jsonwrapper_inner.php' => file_scan_directory ($lib_path,'jsonwrapper_inner.php',array('.', '..', 'CVS'),0,TRUE,'basename'),
'jsonwrapper.php' => file_scan_directory ($lib_path,'jsonwrapper.php',array('.', '..', 'CVS'),0,TRUE,'basename'),
'JSON.php' => file_scan_directory ($lib_path,'JSON.php',array('.', '..', 'CVS'),0,TRUE,'basename')
);

$lib_files = array();
foreach ($lib_files_raw as $key => $files) {
if (!file_exists('./'.$files[$key]->filename)) { //sfyn: switched $lib_paths out for the ./ - the ./ is necessary because of how file_exists works
drupal_set_message(t('Fbconnect : Facebook PHP library file @file not found see readme.txt',
array('@file' => $files[$key]->filename)), 'status', FALSE);
return;
} else { //sfyn: we are going to rebuild $lib_files so that it has the appropriate values
$lib_files[$key] = $files[$key]->filename;
}
}

Its kludgy, but it brings the current stable release back into working order.

CommentFileSizeAuthor
fbconnect.module.clientlibraries.d6.patch2.57 KBsfyn

Comments

sfyn’s picture

Before I did this it generated this error:

Fbconnect : Facebook PHP library file facebook.php not found see readme.txt

Which I found fairly obscure, as error messages go.

sfyn’s picture

Assigned: sfyn » Unassigned
sfyn’s picture

Status: Needs work » Closed (fixed)

I am closing this issue, if anyone out there ever actually read it. It is now hopelessly out of date.