Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
  • Loading branch information
bharat committed Dec 6, 2009
2 parents c7b934b + fcbf824 commit 62693db
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/gallery.common.css
Expand Up @@ -621,10 +621,12 @@ div#g-action-status {

#g-add-photos-status li.g-success {
background: #d9efc2 url('images/ico-success.png') no-repeat .4em 50%;
width: 429px;
}

#g-add-photos-status li.g-error {
background: #f6cbca url('images/ico-error.png') no-repeat .4em 50%;
width: 429px;
/* color: #f00;*/
}

Expand Down Expand Up @@ -818,4 +820,4 @@ div#g-action-status {

.rtl .g-paginator .ui-icon-seek-first {
background-position: -64px -160px;
}
}
3 changes: 2 additions & 1 deletion modules/gallery/controllers/admin_theme_options.php
Expand Up @@ -64,7 +64,8 @@ public function save() {
url::redirect("admin/theme_options");
} else {
$view = new Admin_View("admin.html");
$view->content = $form;
$view->content = new View("admin_theme_options.html");
$view->content->form = $form;
print $view;
}
}
Expand Down
7 changes: 7 additions & 0 deletions modules/gallery/helpers/gallery_installer.php
Expand Up @@ -432,6 +432,13 @@ static function upgrade($version) {
module::clear_var("gallery", "blocks_site.sidebar");
module::set_version("gallery", $version = 19);
}

// Set a default for the number of simultaneous uploads
// Version 20 was reverted in 57adefc5baa7a2b0dfcd3e736e80c2fa86d3bfa2, so skip it.
if ($version == 19 || $version == 20) {
module::set_var("gallery", "simultaneous_upload_limit", 5);
module::set_version("gallery", $version = 21);
}
}

static function uninstall() {
Expand Down
1 change: 1 addition & 0 deletions modules/gallery/libraries/Form_Uploadify.php
Expand Up @@ -45,6 +45,7 @@ public function render() {
$v = new View("form_uploadify.html");
$v->album = $this->data["album"];
$v->script_data = $this->data["script_data"];
$v->simultaneous_upload_limit = module::get_var("gallery", "simultaneous_upload_limit");
return $v;
}

Expand Down
4 changes: 4 additions & 0 deletions modules/gallery/libraries/ORM_MPTT.php
Expand Up @@ -48,6 +48,7 @@ function __construct($id=null) {
*/
function add_to_parent($parent) {
$this->lock();
$parent->reload(); // Assume that the prior lock holder may have changed the parent

try {
// Make a hole in the parent for this new item
Expand Down Expand Up @@ -97,6 +98,7 @@ public function delete() {
}

$this->lock();
$this->reload(); // Assume that the prior lock holder may have changed this entry
try {
$this->db_builder
->update($this->table_name)
Expand Down Expand Up @@ -248,6 +250,8 @@ function move_to($target) {
$level_delta = ($target->level + 1) - $this->level;

$this->lock();
$this->reload(); // Assume that the prior lock holder may have changed this entry
$target->reload();
try {
if ($level_delta) {
// Update the levels for the to-be-moved items
Expand Down
3 changes: 1 addition & 2 deletions modules/gallery/module.info
@@ -1,5 +1,4 @@
name = "Gallery 3"
description = "Gallery core application"
; Note: skip version 20, use 21 as the next version
version = 19
version = 21

2 changes: 1 addition & 1 deletion modules/gallery/views/form_uploadify.html.php
Expand Up @@ -24,7 +24,7 @@
fileDesc: <?= t("Photos and movies")->for_js() ?>,
cancelImg: "<?= url::file("lib/uploadify/cancel.png") ?>",
buttonText: <?= t("Select photos...")->for_js() ?>,
simUploadLimit: 10,
simUploadLimit: <?= $simultaneous_upload_limit ?>,
wmode: "transparent",
hideButton: true, /* should be true */
auto: true,
Expand Down
2 changes: 1 addition & 1 deletion modules/rss/views/feed.mrss.php
Expand Up @@ -56,14 +56,14 @@
type="<?= $child->mime_type ?>"
height="<?= $child->resize_height ?>"
width="<?= $child->resize_width ?>"
isDefault="true"
/>
<? if (access::can("view_full", $child)): ?>
<media:content url="<?= $child->file_url(true) ?>"
fileSize="<?= @filesize($child->file_path()) ?>"
type="<?= $child->mime_type ?>"
height="<?= $child->height ?>"
width="<?= $child->width ?>"
isDefault="true"
/>
<? endif ?>
<? else: ?>
Expand Down

0 comments on commit 62693db

Please sign in to comment.