<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -190,9 +190,8 @@ function style_editor_form_submit($form, &amp;$form_state) {
     $style = drupal_load_stylesheet($full_filename, FALSE);
 
     // Fill the replace function with our static variables
-    // (Full CSS Path . Filename + Submitted form information)
-    // The $full_filename to the CSS file to used in retreiving and editing
-    // form values.
+    // (CSS File [path+filename] + Submitted form information)
+    // The $full_filename is treated as a key and used in form values.
     _style_editor_replace('', $full_filename, $form['#post'][$theme_name][$full_filename]);
 
     // This regular expression matches:
@@ -207,8 +206,7 @@ function style_editor_form_submit($form, &amp;$form_state) {
     // Every match found is individually put through the _style_editor_replace callback
     $style = preg_replace_callback($regex, &quot;_style_editor_replace&quot;, $style);
 
-      // TO SAVE
-      // 1.) see if its different
+      // Is the submitted values different in anyway?
       if (_style_editor_file_diff($full_filename)) {
         // Change detected
         drupal_set_message('Changes have been detected in your stylesheet.');
@@ -275,6 +273,25 @@ function style_editor_rm_dir($directory, $theme = NULL) {
   }
 }
 
+/**
+ * Check if destination directory exists. If not, pave a way.
+ */
+function _style_check_dirs($theme_name, $style_name) {
+  $dir = style_get_files_skin_dir($theme_name) . $style_name . '/';
+
+  if (!file_exists($dir)) mk_dir($dir);
+}
+
+/**
+ * Carve out a path to the entered directory
+ *
+ * @param string $path
+ *  Path to directory
+ * @param integer $rights (optional)
+ *  CHMOD permissions
+ *
+ * @return none
+ */
 function mk_dir($path, $rights = 0777) {
   //$folder_path = array(strstr($path, '.') ? dirname($path) : $path);
   if (!@is_dir($path)) {
@@ -300,17 +317,6 @@ function mk_dir($path, $rights = 0777) {
   }
 }
 
-/**
- * Check if destination directory exists. If not, pave a way.
- *
- *
- */
-function _style_check_dirs($theme_name, $style_name) {
-  $dir = style_get_files_skin_dir($theme_name) . $style_name . '/';
-
-  if (!file_exists($dir)) mk_dir($dir);
-}
-
 // ****************************************************************************
 //  FILE READING **************************************************************
 // ****************************************************************************
@@ -331,10 +337,11 @@ function style_style_scope($enter_scope = NULL) {
   }
 }
 
-
 /*
   ATM this acts as the model and control for stylesheet editing
 
+  It determines which styleset to load (if name the same)
+
   It determines a 'scope' based upon the order of
    1.) files scope
    2.) local scope
@@ -387,6 +394,23 @@ function style_get_stylesheets($theme_name, $style_name) {
   return $full_style_list;
 }
 
+/**
+ * Enter a full filename, return the filename respective
+ * to the root of a module/theme.
+ *
+ * This is to ensure support for people who place CSS
+ * in subdirectories.
+ *
+ * @param string $theme_name
+ *  Machine readable drupal theme name.
+ * @param string $style_name
+ *  Machine readable style name for the theme
+ * @param string $full_filename
+ *  The full filename of the file
+ *
+ * @return string
+ *  The filename and path in relation to the root of the module/theme.
+ */
 function style_to_filename($theme_name, $style_name, $full_filename) {
   $dir = array();
   $dir[] = drupal_get_path('theme', $theme_name) . '/';</diff>
      <filename>modules/style_editor/style_editor.module</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1606855af7a782bc02ced22ee5a98a7c04ae2805</id>
    </parent>
  </parents>
  <author>
    <name>Tony Narlock</name>
    <email>kiwi@kiwi.(none)</email>
  </author>
  <url>http://github.com/skiquel/drupal-style/commit/5980320579d4ac0d6b2cfd70b559059916db400b</url>
  <id>5980320579d4ac0d6b2cfd70b559059916db400b</id>
  <committed-date>2009-03-28T11:09:29-07:00</committed-date>
  <authored-date>2009-03-28T11:09:29-07:00</authored-date>
  <message>more code comments</message>
  <tree>8b2fcd4fb907b305d6c9e5a8b4873bbc98244b90</tree>
  <committer>
    <name>Tony Narlock</name>
    <email>kiwi@kiwi.(none)</email>
  </committer>
</commit>
