OC_App::loadApps();
}
}
+
+ // Check for blacklisted files
+ OC_Hook::connect('OC_Filesystem','write','OC_Filesystem','isBlacklisted');
//make sure temporary files are cleaned up
register_shutdown_function(array('OC_Helper','cleanTmp'));
}
return true;
}
+
+ /**
+ * checks if a file is blacklsited for storage in the filesystem
+ * @param array $data from hook
+ */
+ static public function isBlacklisted($data){
+ $blacklist = array('.htaccess');
+ $filename = strtolower(basename($data['path']));
+ if(in_array($filename,$blacklist)){
+ $data['run'] = false;
+ }
+ }
+
/**
* following functions are equivilent to their php buildin equivilents for arguments/return values.
*/