
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
MacOSX, php4, mysql5, register globals=on
|
|
|
While trying to add an item to the toolbar on top in the admin section I run across a fatal error in the administrator part, editing an admin. The directory listing of files in the directory includes/modules/access is not very particular about the kind of file it finds. On MacOSX it also lists the file .DS_Store which resulted in a fatal error.
I got around it by using this in admin/templates/pages/administrators/edit.php:
{code} foreach ($osC_DirectoryListing->getFiles() as $file) {
$module = substr($file['name'], 0, strrpos($file['name'], '.'));
if (empty($module)) continue; // avoid .DS_Store on MacOSX to be read as a module{code}
Perhaps it would be more elegant to call getFiles with a parameter 'php' to only get php files from that directory.
|
|
Description
|
While trying to add an item to the toolbar on top in the admin section I run across a fatal error in the administrator part, editing an admin. The directory listing of files in the directory includes/modules/access is not very particular about the kind of file it finds. On MacOSX it also lists the file .DS_Store which resulted in a fatal error.
I got around it by using this in admin/templates/pages/administrators/edit.php:
{code} foreach ($osC_DirectoryListing->getFiles() as $file) {
$module = substr($file['name'], 0, strrpos($file['name'], '.'));
if (empty($module)) continue; // avoid .DS_Store on MacOSX to be read as a module{code}
Perhaps it would be more elegant to call getFiles with a parameter 'php' to only get php files from that directory.
|
Show » |
|
Change by Harald Ponce de Leon [12/Jun/07 07:13 PM]
|
| Field |
Original Value |
New Value |
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
|
Fix Version/s
|
|
3.0 Alpha 5
[ 10001
]
|
|
Resolution
|
|
Fixed
[ 1
]
|
|
Assignee
|
|
Harald Ponce de Leon
[ hpdl
]
|
|
|
{code} $osC_DirectoryListing = new osC_DirectoryListing('includes/modules/access');
$osC_DirectoryListing->setIncludeDirectories(false);
$osC_DirectoryListing->setCheckExtension('php'); // avoid .DS_Store on MacOSX to be read as a module{code}