diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-06-24 23:40:57 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-06-24 23:40:57 -0600 |
commit | f70517a8e88b280c2b380f2bde7ff9d85146506f (patch) | |
tree | a8e86434282eab242009e9cda145c5b5764a39d5 | |
parent | 043469587ed03a2a4e05aa2fddcebe53f04b0ce4 (diff) | |
parent | 766de009090cd1a49b6726e79bce7a69392491be (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
-rw-r--r-- | .htaccess | 38 | ||||
-rw-r--r-- | application/config/config.php | 2 | ||||
-rw-r--r-- | modules/comment/views/admin_comments.html.php | 2 | ||||
-rw-r--r-- | modules/digibug/helpers/digibug_menu.php | 18 | ||||
-rw-r--r-- | modules/digibug/js/digibug.js | 4 | ||||
-rw-r--r-- | modules/gallery/helpers/MY_url.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/graphics.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/movie.php | 2 | ||||
-rw-r--r-- | themes/default/css/screen.css | 4 | ||||
-rw-r--r-- | themes/default/images/ico-print.png | bin | 0 -> 4411 bytes |
10 files changed, 53 insertions, 21 deletions
@@ -1,8 +1,34 @@ <IfModule mod_php5.c> - php_value short_open_tag 1 - php_value magic_quotes_gpc 0 - php_value register_globals 0 - php_value session.auto_start 0 - php_value upload_max_filesize 20M - php_value post_max_size 100M + php_value short_open_tag 1 + php_value magic_quotes_gpc 0 + php_value magic_quotes_sybase 0 + php_value magic_quotes_runtime 0 + php_value register_globals 0 + php_value session.auto_start 0 + php_value upload_max_filesize 20M + php_value post_max_size 100M </IfModule> + +# You can use mod_rewrite to enable short urls in Gallery 3 (which +# gets rid of the "index.php" from your urls). To do this, you must +# uncomment the block below that starts with <IfModule> and ends with +# </IfModule> then properly configure the RewriteBase line in the +# block below. You just need to change RewriteBase line to match your +# Gallery 3 URL. Here are some examples: +# +# Gallery3 URL RewriteBase line +# ============= ==================== +# http://example.com/gallery3 RewriteBase /gallery3 +# http://example.com/~bob/photos RewriteBase /~bob/photos +# http://gallery3.example.com/ RewriteBase / +# +# Then just use your Gallery 3 without the index.php in the url. +# +# <IfModule mod_rewrite.c> +# RewriteEngine On +# RewriteBase / +# RewriteCond %{REQUEST_FILENAME} !-f +# RewriteCond %{REQUEST_FILENAME} !-d +# RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L] +# RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L] +# </IfModule> diff --git a/application/config/config.php b/application/config/config.php index 2d66d1c0..e88958ed 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -54,7 +54,7 @@ $config["site_protocol"] = ""; * * This can be removed by using URL rewriting. */ -$config["index_page"] = "index.php"; +$config["index_page"] = isset($_GET["kohana_uri"]) ? "" : "index.php"; /** * Fake file extension that will be added to all generated URLs. Example: .html diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index e749fde0..86585c65 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -163,6 +163,7 @@ </a> </li> <? endif ?> + <!-- <li> <a href="javascript:reply(<?=$comment->id?>)" class="gButtonLink ui-state-default ui-icon-left"> @@ -177,6 +178,7 @@ <?= t("Edit") ?> </a> </li> + --> <li> <a href="javascript:set_state('deleted',<?=$comment->id?>)" class="gButtonLink ui-state-default ui-icon-left"> diff --git a/modules/digibug/helpers/digibug_menu.php b/modules/digibug/helpers/digibug_menu.php index 1ff0f6bf..6c466031 100644 --- a/modules/digibug/helpers/digibug_menu.php +++ b/modules/digibug/helpers/digibug_menu.php @@ -27,17 +27,13 @@ class digibug_menu { } static function photo($menu, $theme) { - } - - static function site($menu, $theme) { $item = $theme->item(); - - if ($item && access::can("edit", $item)) { - $options_menu = $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("digibug") - ->label(t("Peform Digibug Processing")) - ->url(url::site("digibug/index/$item->id"))); - } + $csrf = access::csrf_token(); + $menu + ->append(Menu::factory("link") + ->id("digibug") + ->label(t("Print with Digibug")) + ->url(url::site("digibug/print_photo/{$item->id}?csrf={$csrf}")) + ->css_id("gDigibugLink")); } } diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js index e9e8933e..837c8f7f 100644 --- a/modules/digibug/js/digibug.js +++ b/modules/digibug/js/digibug.js @@ -3,6 +3,10 @@ $(document).ready(function() { e.preventDefault(); queue_print(e); }); + $("#gDigibugLink").click(function(e) { + e.preventDefault(); + return queue_print(e); + }); }); function popUp(url, options) { diff --git a/modules/gallery/helpers/MY_url.php b/modules/gallery/helpers/MY_url.php index 7bee70ca..c4967c52 100644 --- a/modules/gallery/helpers/MY_url.php +++ b/modules/gallery/helpers/MY_url.php @@ -58,7 +58,7 @@ class url extends url_Core { * Return the item that the uri is referencing */ static function get_item_from_uri($uri) { - $current_uri = html_entity_decode($uri); + $current_uri = html_entity_decode($uri, ENT_QUOTES); $item = ORM::factory("item")->where("relative_path_cache", $current_uri)->find(); if (!$item->loaded) { // It's possible that the relative path cache for the item we're looking for is out of date, diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index 3f3317ae..71b8ddd8 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -331,7 +331,7 @@ class graphics_Core { if (!isset($gd["GD Version"])) { $gd["GD Version"] = false; } - putenv("PATH=" . getenv("PATH") . ":/usr/local/bin"); + putenv("PATH=" . getenv("PATH") . ":/usr/local/bin:/opt/local/bin"); return array("gd" => $gd, "imagemagick" => $exec ? dirname(exec("which convert")) : false, "graphicsmagick" => $exec ? dirname(exec("which gm")) : false); diff --git a/modules/gallery/helpers/movie.php b/modules/gallery/helpers/movie.php index 28c15d81..fcf1cc54 100644 --- a/modules/gallery/helpers/movie.php +++ b/modules/gallery/helpers/movie.php @@ -145,7 +145,7 @@ class movie_Core { static function find_ffmpeg() { if (!$ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) { - putenv("PATH=" . getenv("PATH") . ":/usr/local/bin"); + putenv("PATH=" . getenv("PATH") . ":/usr/local/bin:/opt/local/bin"); if (function_exists("exec")) { $ffmpeg_path = exec("which ffmpeg"); } diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index a450356c..8967efdf 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -665,6 +665,10 @@ form .gError, background-image: url('../images/ico-view-comments.png'); } +#gViewMenu #gDigibugLink { + background-image: url('../images/ico-print.png'); +} + /* Breadcrumbs ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ .gBreadcrumbs { diff --git a/themes/default/images/ico-print.png b/themes/default/images/ico-print.png Binary files differnew file mode 100644 index 00000000..087e6694 --- /dev/null +++ b/themes/default/images/ico-print.png |