mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
0000749: Add an option to add new elements to caddie when synchronize database.
Add a redirection on index.php after "add to caddie action" (like on picture.php) git-svn-id: http://piwigo.org/svn/trunk@2114 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -485,6 +485,8 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
|
||||
'info' => l10n('update_research_added')
|
||||
)
|
||||
);
|
||||
|
||||
$caddiables[] = $insert['id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -530,6 +532,8 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
|
||||
'info' => l10n('update_research_added')
|
||||
)
|
||||
);
|
||||
|
||||
$caddiables[] = $insert['id'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -550,6 +554,12 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
|
||||
array_keys($insert_links[0]),
|
||||
$insert_links
|
||||
);
|
||||
|
||||
// add new elements to caddie
|
||||
if (isset($_POST['add_to_caddie']) and $_POST['add_to_caddie'] == 1)
|
||||
{
|
||||
fill_caddie($caddiables);
|
||||
}
|
||||
}
|
||||
$counts['new_elements'] = count($inserts);
|
||||
}
|
||||
@@ -957,6 +967,12 @@ if (!isset($_POST['submit']) or (isset($simulate) and $simulate))
|
||||
array('DISPLAY_INFO_CHECKED'=>'checked="checked"'));
|
||||
}
|
||||
|
||||
if (isset($_POST['add_to_caddie']) and $_POST['add_to_caddie'] == 1)
|
||||
{
|
||||
$template->assign_vars(
|
||||
array('ADD_TO_CADDIE_CHECKED'=>'checked="checked"'));
|
||||
}
|
||||
|
||||
if (isset($_POST['subcats-included']) and $_POST['subcats-included'] == 1)
|
||||
{
|
||||
$template->assign_vars(
|
||||
|
||||
@@ -86,7 +86,7 @@ else
|
||||
if (isset($_GET['caddie']))
|
||||
{
|
||||
fill_caddie($page['items']);
|
||||
// redirect();
|
||||
redirect(duplicate_index_url());
|
||||
}
|
||||
|
||||
//----------------------------------------------------- template initialization
|
||||
|
||||
@@ -634,6 +634,7 @@ $lang['Waiting page: %s'] = 'Waiting page: %s';
|
||||
$lang['Picture uploaded by %s'] = 'Picture uploaded by %s';
|
||||
// --------- Starting below: New or revised $lang ---- from version 1.7.1
|
||||
$lang['guest_must_be_guest'] = 'Bad status for user "guest", using default status. Please notify the webmaster.';
|
||||
$lang['add new elements to caddie'] = 'add new elements to caddie';
|
||||
// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
|
||||
$lang['Administrator, webmaster and special user cannot use this method'] = 'Administrator, webmaster and special user cannot use this method';
|
||||
?>
|
||||
|
||||
@@ -636,6 +636,7 @@ $lang['c13y_webmaster_non_existent'] = 'L\'utilisateur "webmestre" principal n\'
|
||||
$lang['c13y_bad_webmaster_status'] = 'Le statut de l\'utilisateur "webmestre" principal est incorrect';
|
||||
$lang['c13y_user_created'] = 'Utilisateur "%s" créé avec comme mot de passe "%s"';
|
||||
$lang['c13y_user_status_updated'] = 'Statut de l\'utilisateur "%s" mis à jour';
|
||||
$lang['add new elements to caddie'] = 'ajouter les nouveaux éléments au panier';
|
||||
// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
|
||||
$lang['no_display_thumbnail'] = 'Pas d\'affichage';
|
||||
$lang['display_thumbnail_classic'] = 'Affichage classique';
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<li><label><input type="radio" name="sync" value="dirs" {SYNC_DIRS_CHECKED} /> {lang:update_sync_dirs}</label></li>
|
||||
<li><label><input type="radio" name="sync" value="files" {SYNC_ALL_CHECKED} /> {lang:update_sync_all}</label></li>
|
||||
<li><label><input type="checkbox" name="display_info" value="1" {DISPLAY_INFO_CHECKED} /> {lang:update_display_info}</label></li>
|
||||
<li><label><input type="checkbox" name="add_to_caddie" value="1" {ADD_TO_CADDIE_CHECKED} /> {lang:add new elements to caddie}</label></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user