From: Jens T. <je...@us...> - 2005-10-26 19:53:44
|
Update of /cvsroot/gallery/gallery In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13894 Modified Files: ChangeLog Version.php albums.php index.php Added Files: administer_startpage.php Removed Files: adminster_startpage.php Log Message: 2005-10-26 Jens Tkotz <je...@pe...> 1.5.2-cvs-b27 * Fix: naming in b26 was wrong * Fix: added administer_startpage.php to safe to include list. Thanks to dmolavi for catching this bugs. --- NEW FILE: administer_startpage.php --- <?php /* * Gallery - a web based photo album viewer and editor * Copyright (C) 2000-2005 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. * * $Id: administer_startpage.php,v 1.1 2005/10/26 19:53:32 jenst Exp $ * */ ?> <?php if (!isset($gallery->version)) { require_once(dirname(__FILE__) . '/init.php'); } if (!$gallery->user->isAdmin()) { echo _("You are not allowed to perform this action!"); exit; } list($sort, $order, $fieldname) = getRequestVar(array('sort', 'order', 'fieldname')); $adminOptions[] = array( 'text' => _("Rebuild highlights"), 'url' => doCommand('rebuild_highlights'), 'longtext' => _("rebuild highlights")); $adminOptions[] = array( 'text' => _("Sort albumorder"), 'url' => makeGalleryUrl('administer_startpage.php', array('sort' => 1)), 'longtext' => _("Sort albumorder")); array_sort_by_fields($adminOptions, 'text', 'asc'); doctype(); printPopupStart(_("Administer Startpage")); if(empty($sort)) { echo "\n<table width=\"100%\">"; foreach ($adminOptions as $option) { echo "\n<tr>"; if (isset($option['url'])) { $link = '<a class="admin" href="'. $option['url'] .'">'. $option['text'] .'</a>'; } else { $link = popup_link($option['text'], $option['popupFile'], false, true, 500, 500, 'admin'); } echo "\n<td class=\"adm_options\">$link</td>"; echo "\n<td class=\"adm_options\">". $option['longtext'] ."</td>"; echo "\n</tr>"; } echo "\n</table>"; } elseif (empty($order)) { echo makeFormIntro('administer_startpage.php'); ?> <table> <caption><?php echo _("Sort albums on startpage"); ?></caption> <tr> <td><input checked type="radio" name="fieldname" value="name"><?php echo _("By (physical) name") ?></td> </tr> <tr> <td align="center"> <?php echo _("Sort Order:"); ?> <select name="order"> <option value="asc"><?php echo _("Ascending") ?></option> <option value="desc"><?php echo _("Descending") ?></option> </select> </td> </tr> </table> <br><br> <input type="hidden" name="sort" value="1"> <input type="submit" name="confirm" value="<?php echo _("Sort") ?>"> <input type="button" name="cancel" value="<?php echo _("Cancel") ?>" onclick='parent.close()'> </form> <?php } else { /* Read the album list */ $albumDB = new AlbumDB(FALSE); $albumDB->sortByField($fieldname, $order); dismissAndReload(); ?> <input type="button" name="cancel" value="<?php echo _("Close Window") ?>" onclick='parent.close()'> <?php } ?> </div> </body> </html> Index: ChangeLog =================================================================== RCS file: /cvsroot/gallery/gallery/ChangeLog,v retrieving revision 1.1778 retrieving revision 1.1779 diff -u -d -r1.1778 -r1.1779 --- ChangeLog 26 Oct 2005 19:35:17 -0000 1.1778 +++ ChangeLog 26 Oct 2005 19:53:32 -0000 1.1779 @@ -1,3 +1,11 @@ +2005-10-26 Jens Tkotz <je...@pe...> 1.5.2-cvs-b27 + + * Fix: naming in b26 was wrong + + * Fix: added administer_startpage.php to safe to include list. + + Thanks to dmolavi for catching this bugs. + 2005-10-26 Jens Tkotz <je...@pe...> 1.5.2-cvs-b26 * Change: Changed button for rebuild highlights to "Adminster startpage". Index: index.php =================================================================== RCS file: /cvsroot/gallery/gallery/index.php,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- index.php 11 Oct 2005 16:56:15 -0000 1.76 +++ index.php 26 Oct 2005 19:53:32 -0000 1.77 @@ -110,6 +110,7 @@ "add_photos.php", "add_photos_frame.php", "admin-page.php", + "administer_startpage.php", "album_permissions.php", "albums.php", "block-random.php", Index: albums.php =================================================================== RCS file: /cvsroot/gallery/gallery/albums.php,v retrieving revision 1.210 retrieving revision 1.211 diff -u -d -r1.210 -r1.211 --- albums.php 26 Oct 2005 19:38:19 -0000 1.210 +++ albums.php 26 Oct 2005 19:53:32 -0000 1.211 @@ -191,8 +191,8 @@ if ($gallery->user->isLoggedIn() && !$gallery->session->offline) { if ($gallery->user->isAdmin()) { - $iconText = getIconText('unsortedList.gif', _("Adminster startpage")); - $linkurl = makeGalleryUrl('adminster_startpage.php', array('type' => 'popup')); + $iconText = getIconText('unsortedList.gif', _("Administer startpage")); + $linkurl = makeGalleryUrl('administer_startpage.php', array('type' => 'popup')); $iconElements[] = popup_link($iconText, $linkurl, true); $iconText = getIconText('kdf.gif', _("admin page")); Index: Version.php =================================================================== RCS file: /cvsroot/gallery/gallery/Version.php,v retrieving revision 1.1508 retrieving revision 1.1509 diff -u -d -r1.1508 -r1.1509 --- Version.php 26 Oct 2005 19:35:17 -0000 1.1508 +++ Version.php 26 Oct 2005 19:53:32 -0000 1.1509 @@ -31,7 +31,7 @@ $gallery = new stdClass(); } -$gallery->version = '1.5.2-cvs-b26'; +$gallery->version = '1.5.2-cvs-b27'; $gallery->config_version = 94; $gallery->album_version = 37; $gallery->user_version = 6; --- adminster_startpage.php DELETED --- |