diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-26 06:01:04 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-26 06:01:04 +0000 |
commit | 7e5e70548b52462a2f91f3a06cadde7198ea8f6e (patch) | |
tree | bd18eaf7b642841d4dd320b474140848f9b66eed | |
parent | 7aed9239088b582a065da3fb63796ff66cd357c8 (diff) |
clean up whitespace errors introduced in last commit
-rw-r--r-- | core/controllers/scaffold.php | 12 | ||||
-rw-r--r-- | core/helpers/core_installer.php | 12 | ||||
-rw-r--r-- | core/helpers/graphics.php | 62 | ||||
-rw-r--r-- | core/helpers/log.php | 2 | ||||
-rw-r--r-- | core/helpers/module.php | 4 | ||||
-rw-r--r-- | modules/exif/helpers/exif_installer.php | 4 | ||||
-rw-r--r-- | modules/search/helpers/search_installer.php | 4 |
7 files changed, 50 insertions, 50 deletions
diff --git a/core/controllers/scaffold.php b/core/controllers/scaffold.php index 463a092c..f0063725 100644 --- a/core/controllers/scaffold.php +++ b/core/controllers/scaffold.php @@ -280,7 +280,7 @@ class Scaffold_Controller extends Template_Controller { // Drop all tables foreach ($db->list_tables() as $table) { - $db->query("DROP TABLE IF EXISTS `$table`"); + $db->query("DROP TABLE IF EXISTS `$table`"); } // Clean out data @@ -300,12 +300,12 @@ class Scaffold_Controller extends Template_Controller { srand(0); try { - core_installer::install(true); - module::load_modules(); + core_installer::install(true); + module::load_modules(); - foreach (array("user", "comment", "organize", "info", "rss", - "search", "slideshow", "tag") as $module_name) { - module::install($module_name); + foreach (array("user", "comment", "organize", "info", "rss", + "search", "slideshow", "tag") as $module_name) { + module::install($module_name); module::activate($module_name); } } catch (Exception $e) { diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 81246359..cffcbedb 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -180,12 +180,12 @@ class core_installer { ENGINE=InnoDB DEFAULT CHARSET=utf8;"); $db->query("CREATE TABLE {vars} ( - `id` int(9) NOT NULL auto_increment, - `module_name` varchar(64) NOT NULL, - `name` varchar(64) NOT NULL, - `value` text, - PRIMARY KEY (`id`), - UNIQUE KEY(`module_name`, `name`)) + `id` int(9) NOT NULL auto_increment, + `module_name` varchar(64) NOT NULL, + `name` varchar(64) NOT NULL, + `value` text, + PRIMARY KEY (`id`), + UNIQUE KEY(`module_name`, `name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;"); foreach (array("albums", "logs", "modules", "resizes", "thumbs", "tmp", "uploads") as $dir) { diff --git a/core/helpers/graphics.php b/core/helpers/graphics.php index 6d51e60d..805a95c0 100644 --- a/core/helpers/graphics.php +++ b/core/helpers/graphics.php @@ -127,41 +127,41 @@ class graphics_Core { } try { - foreach ($ops as $target => $output_file) { - if ($input_item->is_movie()) { - // Convert the movie to a JPG first - $output_file = preg_replace("/...$/", "jpg", $output_file); - movie::extract_frame($input_file, $output_file); - $working_file = $output_file; - } else { - $working_file = $input_file; - } - - foreach (ORM::factory("graphics_rule") - ->where("target", $target) + foreach ($ops as $target => $output_file) { + if ($input_item->is_movie()) { + // Convert the movie to a JPG first + $output_file = preg_replace("/...$/", "jpg", $output_file); + movie::extract_frame($input_file, $output_file); + $working_file = $output_file; + } else { + $working_file = $input_file; + } + + foreach (ORM::factory("graphics_rule") + ->where("target", $target) ->where("active", true) - ->orderby("priority", "asc") - ->find_all() as $rule) { - $args = array($working_file, $output_file, unserialize($rule->args)); - call_user_func_array(array("graphics", $rule->operation), $args); - $working_file = $output_file; + ->orderby("priority", "asc") + ->find_all() as $rule) { + $args = array($working_file, $output_file, unserialize($rule->args)); + call_user_func_array(array("graphics", $rule->operation), $args); + $working_file = $output_file; + } } - } - if (!empty($ops["thumb"])) { - $dims = getimagesize($item->thumb_path()); - $item->thumb_width = $dims[0]; - $item->thumb_height = $dims[1]; - $item->thumb_dirty = 0; - } + if (!empty($ops["thumb"])) { + $dims = getimagesize($item->thumb_path()); + $item->thumb_width = $dims[0]; + $item->thumb_height = $dims[1]; + $item->thumb_dirty = 0; + } - if (!empty($ops["resize"])) { - $dims = getimagesize($item->resize_path()); - $item->resize_width = $dims[0]; - $item->resize_height = $dims[1]; - $item->resize_dirty = 0; - } - $item->save(); + if (!empty($ops["resize"])) { + $dims = getimagesize($item->resize_path()); + $item->resize_width = $dims[0]; + $item->resize_height = $dims[1]; + $item->resize_dirty = 0; + } + $item->save(); } catch (Kohana_Exception $e) { // Something went wrong rebuilding the image. Leave it dirty and move on. // @todo we should handle this better. diff --git a/core/helpers/log.php b/core/helpers/log.php index d0581bf3..451f985a 100644 --- a/core/helpers/log.php +++ b/core/helpers/log.php @@ -80,7 +80,7 @@ class log_Core { $log->url = substr(url::abs_current(true), 0, 255); $log->referer = request::referrer(null); $log->timestamp = time(); - $log->user_id = user::active()->id; + $log->user_id = user::active()->id; $log->save(); } diff --git a/core/helpers/module.php b/core/helpers/module.php index 539b003c..a48c89ed 100644 --- a/core/helpers/module.php +++ b/core/helpers/module.php @@ -97,7 +97,7 @@ class module_Core { */ static function active() { return self::$active; - } + } /** * Install a module. This will call <module>_installer::install(), which is responsible for @@ -182,7 +182,7 @@ class module_Core { static function uninstall($module_name) { $installer_class = "{$module_name}_installer"; if (method_exists($installer_class, "uninstall")) { - call_user_func(array($installer_class, "uninstall")); + call_user_func(array($installer_class, "uninstall")); } graphics::remove_rule($module_name); diff --git a/modules/exif/helpers/exif_installer.php b/modules/exif/helpers/exif_installer.php index 77cf3f3d..da49f649 100644 --- a/modules/exif/helpers/exif_installer.php +++ b/modules/exif/helpers/exif_installer.php @@ -37,8 +37,8 @@ class exif_installer { } static function activate() { - exif::check_index(); - } + exif::check_index(); + } static function deactivate() { site_status::clear("exif_index_out_of_date"); diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php index 5fc9b37b..ed4a3a90 100644 --- a/modules/search/helpers/search_installer.php +++ b/modules/search/helpers/search_installer.php @@ -40,8 +40,8 @@ class search_installer { // of the official install, so this way we don't start off with a "your index is out of date" // banner. search::update(model_cache::get("item", 1)); - search::check_index(); - } + search::check_index(); + } static function deactivate() { site_status::clear("search_index_out_of_date"); |