Permalink
Browse files

Merge branch 'master' of git@github.com:gallery/gallery3

  • Loading branch information...
2 parents f369b8f + 67c8108 commit fcddeefa59e3db8ebc0b394b38e9aef2ddf00371 @talmdal talmdal committed Jun 12, 2009
@@ -92,7 +92,7 @@ static function get_add_block_form() {
$form = new Forge("admin/dashboard/add_block", "", "post",
array("id" => "gAddDashboardBlockForm"));
$group = $form->group("add_block")->label(t("Add Block"));
- $group->dropdown("id")->label("Available Blocks")->options(block_manager::get_available());
+ $group->dropdown("id")->label(t("Available Blocks"))->options(block_manager::get_available());
$group->submit("center")->value(t("Add to center"));
$group->submit("sidebar")->value(t("Add to sidebar"));
return $form;
@@ -326,6 +326,7 @@ static function detect_toolkits() {
if (!isset($gd["GD Version"])) {
$gd["GD Version"] = false;
}
+ putenv("PATH=" . getenv("PATH") . ":/usr/local/bin");
return array("gd" => $gd,
"imagemagick" => $exec ? dirname(exec("which convert")) : false,
"graphicsmagick" => $exec ? dirname(exec("which gm")) : false);
@@ -140,13 +140,11 @@ static function extract_frame($input_file, $output_file) {
static function find_ffmpeg() {
if (!$ffmpeg_path = module::get_var("gallery", "ffmpeg_path")) {
+ putenv("PATH=" . getenv("PATH") . ":/usr/local/bin");
if (function_exists("exec")) {
$ffmpeg_path = exec("which ffmpeg");
}
- if (empty($ffmpeg) && @file_exists("/usr/local/bin/ffmpeg")) {
- $ffmpeg_path = "/usr/local/bin/ffmpeg";
- }
module::set_var("gallery", "ffmpeg_path", $ffmpeg_path);
}
return $ffmpeg_path;
@@ -69,7 +69,7 @@
<? elseif ($intent === access::ALLOW): ?>
<td class="gAllowed">
<? if ($item->id == 1): ?>
- <img src="<?= url::file('themes/default/images/ico-success.png') ?>" title="allowed" alt="<?= t('allowed icon') ?>" />
+ <img src="<?= url::file('themes/default/images/ico-success.png') ?>" title="<?= t("allowed") ?>" alt="<?= t('allowed icon') ?>" />
<? else: ?>
<a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
title="<?= t('allowed, click to reset') ?>">
@@ -56,11 +56,12 @@ static function add_from_server($task) {
} else {
$extension = strtolower(substr(strrchr($name, '.'), 1));
$source_path = "$path{$file['path']}/$name";
+ $title = item::convert_filename_to_title($name);
if (in_array($extension, array("flv", "mp4"))) {
- $movie = movie::create($parent, $source_path, $name, $name,
+ $movie = movie::create($parent, $source_path, $name, $title,
null, user::active()->id);
} else {
- $photo = photo::create($parent, $source_path, $name, $name,
+ $photo = photo::create($parent, $source_path, $name, $title,
null, user::active()->id);
}
}

0 comments on commit fcddeef

Please sign in to comment.