DrupalBin
Submit Code
About
Recent Posts
How do i make this work in D6 (I have to clear the cache everytime to see the tabs)
2 hours 18 min
ago
Code
3 hours 13 min
ago
Code
7 hours 12 min
ago
oopsie in modules/taxonomy/taxonomy.test
9 hours 10 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for fix permissions
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
<?php file_fix_directory(dirname(__FILE__)); function file_fix_directory($dir, $nomask = array('.', '..', 'CVS')) { if (is_dir($dir)) { // Try to make each directory world writable. if (@chmod($dir, 0777)) { echo "<P>Made writable: " . $dir . "</p>"; } } if (is_dir($dir) && $handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if (!in_array($file, $nomask) && $file[0] != '.') { if (is_dir("$dir/$file")) { // Recurse into subdirectories file_fix_directory("$dir/$file", $nomask); } else { $filename = "$dir/$file"; // Try to make each file world writable. if (@chmod($filename, 0666)) { echo "<P>Made writable: " . $filename . "</p>"; } } } } closedir($handle); } } ?>
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.