Changeset 10988 for extensions/photoWidget/admin.php
- Timestamp:
- May 22, 2011, 1:21:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/photoWidget/admin.php
r6850 r10988 3 3 // | photoWidget - a plugin for Piwigo | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010 Nicolas Roudairehttp://www.nikrou.net |5 // | Copyright(C) 2010-2011 Nicolas Roudaire http://www.nikrou.net | 6 6 // +-----------------------------------------------------------------------+ 7 7 // | This program is free software; you can redistribute it and/or modify | … … 32 32 if (isset($_POST['pw_all_categories'])) { 33 33 if ($_POST['pw_all_categories']==1) { 34 array_push($GLOBALS['page']['infos'], 35 l10n('You choose that mode for').' '.l10n('all categories')); 34 $page['infos'][] = l10n('You choose that mode for').' '.l10n('All categories'); 36 35 $me->pw_all_categories = 1; 37 36 $me->pw_categories = array(); … … 40 39 if (isset($_POST['pw_categories'])) { 41 40 if (count($_POST['pw_categories'])==1 && ($_POST['pw_categories'][0]=='__none__')) { 42 array_push($GLOBALS['page']['errors'], 43 l10n('You must choose at least one category')); 41 $page['errors'][] = l10n('You must choose at least one category'); 44 42 $me->pw_categories = array(); 45 43 $save_config = true; 46 44 } else { 47 array_push($GLOBALS['page']['infos'], 48 l10n('You choose that mode for').' '. 49 l10n_dec('one category',50 'severals categories', 51 count($_POST['pw_categories'])));45 $page['infos'][] = l10n('You choose that mode for').' '. 46 l10n_dec('one category', 47 'severals categories', 48 count($_POST['pw_categories']) 49 ); 52 50 $me->pw_all_categories = 0; 53 51 $me->pw_categories = $_POST['pw_categories']; … … 55 53 } 56 54 } else { 57 array_push($GLOBALS['page']['errors'], 58 l10n('You must choose at least one category')); 55 $page['errors'][] = l10n('You must choose at least one category'); 59 56 } 60 57 } … … 63 60 if (!empty($_POST['pw_width']) && intval($_POST['pw_width'])!=$me->pw_width) { 64 61 $me->pw_width = intval($_POST['pw_width']); 65 array_push($GLOBALS['page']['infos'], l10n('Width has been updated'));62 $page['infos'][] = l10n('Width has been updated'); 66 63 $save_config = true; 67 64 } 68 65 if (!empty($_POST['pw_height']) && intval($_POST['pw_height'])!=$me->pw_height) { 69 66 $me->pw_height = intval($_POST['pw_height']); 70 array_push($GLOBALS['page']['infos'], l10n('Height has been updated'));67 $page['infos'][] = l10n('Height has been updated'); 71 68 $save_config = true; 72 69 } 73 70 if (!empty($_POST['pw_bgcolor']) && trim($_POST['pw_bgcolor'])!=$me->pw_bgcolor) { 74 71 $me->pw_bgcolor = $_POST['pw_bgcolor']; 75 array_push($GLOBALS['page']['infos'], l10n('Background color of animation has been updated'));72 $page['infos'][] = l10n('Background color of animation has been updated'); 76 73 $save_config = true; 77 74 } … … 88 85 $all_categories = simple_hash_from_query($query, 'id', 'name'); 89 86 90 $ GLOBALS['template']->set_filenames(array('plugin_admin_content' => PW_TEMPLATE . '/admin.tpl'));91 $ GLOBALS['template']->assign('PW_CAT_CHOICES', array(1 => l10n('Yes'), 0 => l10n('No')));92 $ GLOBALS['template']->assign('ALL_CATEGORIES', $all_categories);93 $ GLOBALS['template']->assign('PW_CATEGORIES', $me->pw_categories);94 $ GLOBALS['template']->assign('PW_ALL_CATEGORIES', $me->pw_all_categories);95 $ GLOBALS['template']->assign('PWG_PHOTO_WIDGET_PLUGIN_CSS', PW_CSS);96 $ GLOBALS['template']->assign('PWG_PHOTO_WIDGET_PLUGIN_JS', PW_JS);97 $ GLOBALS['template']->assign('PW_BGCOLOR', $me->pw_bgcolor);98 $ GLOBALS['template']->assign('PW_WIDTH', $me->pw_width);99 $ GLOBALS['template']->assign('PW_HEIGHT', $me->pw_height);100 $ GLOBALS['template']->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');87 $template->set_filenames(array('plugin_admin_content' => PW_TEMPLATE . '/admin.tpl')); 88 $template->assign('PW_CAT_CHOICES', array(1 => l10n('Yes'), 0 => l10n('No'))); 89 $template->assign('ALL_CATEGORIES', $all_categories); 90 $template->assign('PW_CATEGORIES', $me->pw_categories); 91 $template->assign('PW_ALL_CATEGORIES', $me->pw_all_categories); 92 $template->assign('PWG_PHOTO_WIDGET_PLUGIN_CSS', PW_CSS); 93 $template->assign('PWG_PHOTO_WIDGET_PLUGIN_JS', PW_JS); 94 $template->assign('PW_BGCOLOR', $me->pw_bgcolor); 95 $template->assign('PW_WIDTH', $me->pw_width); 96 $template->assign('PW_HEIGHT', $me->pw_height); 97 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 101 98 ?>
Note: See TracChangeset
for help on using the changeset viewer.