summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-26 06:01:04 +0000
committerBharat Mediratta <bharat@menalto.com>2009-05-26 06:01:04 +0000
commit7e5e70548b52462a2f91f3a06cadde7198ea8f6e (patch)
treebd18eaf7b642841d4dd320b474140848f9b66eed /core/helpers
parent7aed9239088b582a065da3fb63796ff66cd357c8 (diff)
clean up whitespace errors introduced in last commit
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/core_installer.php12
-rw-r--r--core/helpers/graphics.php62
-rw-r--r--core/helpers/log.php2
-rw-r--r--core/helpers/module.php4
4 files changed, 40 insertions, 40 deletions
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);