--- acidfree.module.OLD	2005-11-02 20:12:23.000000000 -0500
+++ acidfree.module	2005-11-04 15:23:47.379125800 -0500
@@ -221,7 +221,7 @@
  * Implementation of hook_settings
  */
 function acidfree_settings() {
-    for ($i=3; $i<=10; $i++)
+    for ($i=1; $i<=10; $i++)
         $cols[$i] = $i;
     for ($i=1; $i<10; $i++)
         $rows[$i] = $i;
@@ -657,7 +657,7 @@
      */
     if ($teaser) {
         $node = node_prepare($node, $teaser);
-        $output .= "<div class='block-cell'>";
+        $output .= "<div class=\"block-cell\">";
         $output .= theme("acidfree_print_thumb_{$node->class}", $node);
         $output .= '</div>' . $node->teaser;
         $node->teaser = $output;
@@ -1532,15 +1532,10 @@
 }
 
 function _acidfree_lockfile() {
-    static $file = NULL;
-    global $base_url;       
-    if ($file == NULL) {
-        $subdir = preg_replace("@http(s)?://[^/]*(/)?@i", "", $base_url);
-        if ($subdir != "")
-                $subdir .= '/';
-        $file = $_SERVER['DOCUMENT_ROOT']."/$subdir".
-            variable_get('file_directory_path', 'files').'/'.
-            variable_get('acidfree_dir', 'acidfree').'/tmp/dir.lock';
+    $file = variable_get('file_directory_temp', 'files') . DIRECTORY_SEPARATOR .  'acidfree' . DIRECTORY_SEPARATOR . 'dir.lock';
+    // Check for absolute path.
+    if (!preg_match('/^([a-z]\:[\\\\|\/])|(\/)/i', $file)) {
+        $file = dirname($_SERVER['SCRIPT_FILENAME']). DIRECTORY_SEPARATOR . $file;
     }
     return $file;
 }
