diff options
| author | fisharebest <fisharebest@gmail.com> | 2010-12-31 14:04:14 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2010-12-31 14:04:14 +0000 |
| commit | 14a0f010ab89c7225193f9fcfa8e7ff1e659ac6e (patch) | |
| tree | ea870f4824d63972da7da21b4541e14c4ec3fbeb | |
| parent | f8f02a5089943d6ddceda9510d539297f6f1ff5f (diff) | |
| download | webtrees-14a0f010ab89c7225193f9fcfa8e7ff1e659ac6e.tar.gz webtrees-14a0f010ab89c7225193f9fcfa8e7ff1e659ac6e.tar.bz2 webtrees-14a0f010ab89c7225193f9fcfa8e7ff1e659ac6e.zip | |
| -rw-r--r-- | modules/googlemap/admin_config.php | 6 | ||||
| -rw-r--r-- | modules/googlemap/admin_editconfig.php (renamed from modules/googlemap/editconfig.php) | 4 | ||||
| -rw-r--r-- | modules/googlemap/admin_placecheck.php (renamed from modules/googlemap/placecheck.php) | 2 | ||||
| -rw-r--r-- | modules/googlemap/admin_places.php (renamed from modules/googlemap/places.php) | 18 | ||||
| -rw-r--r-- | modules/googlemap/googlemap.php | 4 | ||||
| -rw-r--r-- | modules/googlemap/module.php | 14 | ||||
| -rw-r--r-- | modules/googlemap/pedigree_map.php | 8 | ||||
| -rw-r--r-- | modules/googlemap/placehierarchy.php | 12 | ||||
| -rw-r--r-- | modules/googlemap/places_edit.php | 2 | ||||
| -rw-r--r-- | modules/sitemap/admin_config.php | 49 | ||||
| -rw-r--r-- | modules/sitemap/admin_index.php (renamed from modules/sitemap/index.php) | 8 | ||||
| -rw-r--r-- | modules/sitemap/module.php | 4 | ||||
| -rw-r--r-- | modules/stories/module.php | 22 |
13 files changed, 52 insertions, 101 deletions
diff --git a/modules/googlemap/admin_config.php b/modules/googlemap/admin_config.php index 9dde2b9915..3ebdcd65d8 100644 --- a/modules/googlemap/admin_config.php +++ b/modules/googlemap/admin_config.php @@ -50,13 +50,13 @@ if (WT_USER_IS_ADMIN) { ?> <td colspan="2" class="topbottombar" style="text-align:center; "><?php echo i18n::translate('GoogleMap Configuration'); ?></td> </tr> <tr> - <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=editconfig"><?php echo i18n::translate('Manage GoogleMap configuration'); ?></a><?php echo help_link('GOOGLEMAP_CONFIG','googlemap'); ?> + <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=admin_editconfig"><?php echo i18n::translate('Manage GoogleMap configuration'); ?></a><?php echo help_link('GOOGLEMAP_CONFIG','googlemap'); ?> </td> - <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=places"><?php echo i18n::translate('Edit geographic place locations'); ?></a><?php echo help_link('PLE_EDIT','googlemap'); ?> + <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=admin_places"><?php echo i18n::translate('Edit geographic place locations'); ?></a><?php echo help_link('PLE_EDIT','googlemap'); ?> </td> </tr> <tr> - <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=placecheck"><?php echo i18n::translate('Place Check'); ?></a><?php echo help_link('GOOGLEMAP_PLACECHECK','googlemap'); ?> + <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=admin_placecheck"><?php echo i18n::translate('Place Check'); ?></a><?php echo help_link('GOOGLEMAP_PLACECHECK','googlemap'); ?> </td> <td class="optionbox"> </td> diff --git a/modules/googlemap/editconfig.php b/modules/googlemap/admin_editconfig.php index 84e7b5eb00..9752946842 100644 --- a/modules/googlemap/editconfig.php +++ b/modules/googlemap/admin_editconfig.php @@ -197,7 +197,7 @@ if ($action=="update" && !isset($security_user)) { //--> </script> -<form method="post" name="configform" action="module.php?mod=googlemap&mod_action=editconfig"> +<form method="post" name="configform" action="module.php?mod=googlemap&mod_action=admin_editconfig"> <input type="hidden" name="action" value="update" /> <table class="facts_table"> @@ -430,7 +430,7 @@ if ($action=="update" && !isset($security_user)) { <table class="facts_table"> <tr> <td class="descriptionbox" colspan="2" align="center"> - <a href="module.php?mod=googlemap&mod_action=places"><?php echo i18n::translate('Edit geographic place locations'); ?></a> + <a href="module.php?mod=googlemap&mod_action=admin_places"><?php echo i18n::translate('Edit geographic place locations'); ?></a> </td> <tr> <td class="descriptionbox" colspan="2" align="center"> diff --git a/modules/googlemap/placecheck.php b/modules/googlemap/admin_placecheck.php index 5897f26700..d4b7bff0d8 100644 --- a/modules/googlemap/placecheck.php +++ b/modules/googlemap/admin_placecheck.php @@ -54,7 +54,7 @@ echo "<div align=\"center\" style=\"width: 99%;\"><h1>", i18n::translate('Place //Start of User Defined options echo "<table border='0' width='100%' height='100px' overflow='auto';>"; -echo "<form method='post' name='placecheck' action='module.php?mod=googlemap&mod_action=placecheck'>"; +echo "<form method='post' name='placecheck' action='module.php?mod=googlemap&mod_action=admin_placecheck'>"; echo "<tr valign='top'>"; echo "<td>"; echo "<table align='left'>"; diff --git a/modules/googlemap/places.php b/modules/googlemap/admin_places.php index 229a4b8402..aba9ca42f3 100644 --- a/modules/googlemap/places.php +++ b/modules/googlemap/admin_places.php @@ -555,7 +555,7 @@ foreach (array_reverse($where_am_i, true) as $id=>$place) { echo i18n::translate('unknown'); } } else { - echo "<a href=\"module.php?mod=googlemap&mod_action=places&parent={$id}&display={$display}\">"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_places&parent={$id}&display={$display}\">"; if ($place != "Unknown") { echo PrintReady($place), "</a>"; } else { @@ -564,8 +564,8 @@ foreach (array_reverse($where_am_i, true) as $id=>$place) { } echo " - "; } -echo "<a href=\"module.php?mod=googlemap&mod_action=places&parent=0&display=$display\">".i18n::translate('Top Level')."</a>"; -echo "<br /><br /><form name=\"active\" method=\"post\" action=\"module.php?mod=googlemap&mod_action=places&parent=$parent&display=$display\">"; +echo "<a href=\"module.php?mod=googlemap&mod_action=admin_places&parent=0&display=$display\">".i18n::translate('Top Level')."</a>"; +echo "<br /><br /><form name=\"active\" method=\"post\" action=\"module.php?mod=googlemap&mod_action=admin_places&parent=$parent&display=$display\">"; echo "\n<table><tr><td class=\"optionbox\">", i18n::translate('Click here to show inactive places'), ": <input type=\"checkbox\" name=\"display\" value=\"inactive\""; if ($display == 'inactive') echo " checked=\"checked\""; echo ">\n<input type=\"submit\" value=\"", i18n::translate('View'), "\" >"; @@ -586,7 +586,7 @@ echo i18n::translate('Edit geographic location'), help_link('PL_EDIT_LOCATION',' if (count($placelist) == 0) echo "<tr><td colspan=\"7\" class=\"facts_value\">", i18n::translate('No places found'), "</td></tr>"; foreach ($placelist as $place) { - echo "<tr><td class=\"optionbox\"><a href=\"module.php?mod=googlemap&mod_action=places&parent={$place['place_id']}&display={$display}\">"; + echo "<tr><td class=\"optionbox\"><a href=\"module.php?mod=googlemap&mod_action=admin_places&parent={$place['place_id']}&display={$display}\">"; if ($place["place"] != "Unknown") echo PrintReady($place["place"]), "</a></td>"; else @@ -630,24 +630,24 @@ foreach ($placelist as $place) { <td class="optionbox" colspan="2"><a href="javascript:;" onclick="add_place_location(<?php echo $parent; ?>);return false;"><?php echo i18n::translate('Add place'); ?></a><?php echo help_link('PL_ADD_LOCATION','googlemap'); ?></td> </tr> <tr> - <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=places&action=ImportGedcom&mode=curr"><?php echo i18n::translate('Import from current GEDCOM'); ?></a><?php echo help_link('PL_IMPORT_GEDCOM','googlemap'); ?></td> - <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=places&action=ImportGedcom&mode=all"><?php echo i18n::translate('Import from all GEDCOMs'); ?></a><?php echo help_link('PL_IMPORT_ALL_GEDCOM','googlemap'); ?></td> + <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=admin_places&action=ImportGedcom&mode=curr"><?php echo i18n::translate('Import from current GEDCOM'); ?></a><?php echo help_link('PL_IMPORT_GEDCOM','googlemap'); ?></td> + <td class="optionbox"><a href="module.php?mod=googlemap&mod_action=admin_places&action=ImportGedcom&mode=all"><?php echo i18n::translate('Import from all GEDCOMs'); ?></a><?php echo help_link('PL_IMPORT_ALL_GEDCOM','googlemap'); ?></td> </tr> <tr> - <td class="optionbox" colspan="2"><a href="module.php?mod=googlemap&mod_action=places&action=ImportFile&mode=add"><?php echo i18n::translate('Import from file'); ?></a><?php echo help_link('PL_IMPORT_FILE','googlemap'); ?></td> + <td class="optionbox" colspan="2"><a href="module.php?mod=googlemap&mod_action=admin_places&action=ImportFile&mode=add"><?php echo i18n::translate('Import from file'); ?></a><?php echo help_link('PL_IMPORT_FILE','googlemap'); ?></td> </tr> <tr> <td class="optionbox"> <?php if (count($where_am_i)<=4) { - echo "<a href=\"module.php?mod=googlemap&mod_action=places&action=ExportFile&parent={$parent}\">"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_places&action=ExportFile&parent={$parent}\">"; echo i18n::translate('Export current view to file'), "</a>"; echo help_link('PL_EXPORT_FILE','googlemap'); } else { echo " "; } echo "</td><td class=\"optionbox\">"; - echo "<a href=\"module.php?mod=googlemap&mod_action=places&action=ExportFile&parent=0\">"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_places&action=ExportFile&parent=0\">"; echo i18n::translate('Export all locations to file'), "</a>"; echo help_link('PL_EXPORT_ALL_FILE','googlemap'); echo "</td></tr></table><br />"; diff --git a/modules/googlemap/googlemap.php b/modules/googlemap/googlemap.php index 6524d50662..072012052d 100644 --- a/modules/googlemap/googlemap.php +++ b/modules/googlemap/googlemap.php @@ -622,7 +622,7 @@ function build_indiv_map($indifacts, $famids) { echo "function ResizeMap() {}</script>"; if (WT_USER_IS_ADMIN) { echo "<tr><td align=\"center\" colspan=\"2\">"; - echo "<a href=\"module.php?mod=googlemap&mod_action=editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; echo "</td></tr>"; } } else { @@ -700,7 +700,7 @@ function build_indiv_map($indifacts, $famids) { if (($markers[$j]["lati"] == NULL) || ($markers[$j]["lng"] == NULL) || (($markers[$j]["lati"] == "0") && ($markers[$j]["lng"] == "0"))) { echo "<br /><br />", i18n::translate('This place has no coordinates'); if (WT_USER_IS_ADMIN) - echo '<br /><a href=\"module.php?mod=googlemap&mod_action=places&display=inactive\">', i18n::translate('Edit geographic location'), '</a>'; + echo '<br /><a href=\"module.php?mod=googlemap&mod_action=admin_places&display=inactive\">', i18n::translate('Edit geographic location'), '</a>'; echo "\");"; } else if (!$GOOGLEMAP_COORD) { diff --git a/modules/googlemap/module.php b/modules/googlemap/module.php index 77c951bcf0..7a55256d93 100644 --- a/modules/googlemap/module.php +++ b/modules/googlemap/module.php @@ -49,11 +49,11 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu public function modAction($mod_action) { switch($mod_action) { case 'admin_config': - case 'editconfig': + case 'admin_editconfig': case 'flags': case 'pedigree_map': - case 'placecheck': - case 'places': + case 'admin_placecheck': + case 'admin_places': case 'places_edit': // TODO: these files should be methods in this class require_once WT_ROOT.'modules/googlemap/googlemap.php'; @@ -107,7 +107,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu echo "<tr><td id=\"no_tab8\" colspan=\"2\" class=\"facts_value\">".i18n::translate('GoogleMap module disabled')."</td></tr>"; if (WT_USER_IS_ADMIN) { echo "<tr><td align=\"center\" colspan=\"2\">"; - echo "<a href=\"module.php?mod=".$this->getName()."&mod_action=editconfig\">".i18n::translate('Manage GoogleMap configuration')."</a>"; + echo "<a href=\"module.php?mod=".$this->getName()."&mod_action=admin_editconfig\">".i18n::translate('Manage GoogleMap configuration')."</a>"; echo "</td>"; echo "</tr>"; } @@ -149,13 +149,13 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu if (WT_USER_IS_ADMIN) { echo "<table width=\"100%\"><tr>"; echo "<td width=\"33%\" align=\"left\">"; - echo "<a href=\"module.php?mod=".$this->getName()."&mod_action=editconfig\">".i18n::translate('Manage GoogleMap configuration')."</a>"; + echo "<a href=\"module.php?mod=".$this->getName()."&mod_action=admin_editconfig\">".i18n::translate('Manage GoogleMap configuration')."</a>"; echo "</td>"; echo "<td width=\"33%\" align=\"center\">"; - echo "<a href=\"module.php?mod=".$this->getName()."&mod_action=places\">".i18n::translate('Edit geographic place locations')."</a>"; + echo "<a href=\"module.php?mod=".$this->getName()."&mod_action=admin_places\">".i18n::translate('Edit geographic place locations')."</a>"; echo "</td>"; echo "<td width=\"33%\" align=\"right\">"; - echo "<a href=\"module.php?mod=".$this->getName()."&mod_action=placecheck\">".i18n::translate('Place Check')."</a>"; + echo "<a href=\"module.php?mod=".$this->getName()."&mod_action=admin_placecheck\">".i18n::translate('Place Check')."</a>"; echo "</td>"; echo "</tr></table>"; } diff --git a/modules/googlemap/pedigree_map.php b/modules/googlemap/pedigree_map.php index 7cd47c5714..5cb8e5704d 100644 --- a/modules/googlemap/pedigree_map.php +++ b/modules/googlemap/pedigree_map.php @@ -78,7 +78,7 @@ if (!$GOOGLEMAP_ENABLED) { echo "<tr><td class=\"facts_value\">", i18n::translate('GoogleMap module disabled'), "</td></tr>\n"; if (WT_USER_IS_ADMIN) { echo "<tr><td align=\"center\">\n"; - echo "<a href=\"module.php?mod=googlemap&mod_action=editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; echo "</td></tr>\n"; } echo "</table><br />"; @@ -251,13 +251,13 @@ echo " background-image: url('images/loading.gif'); background-position: center; if (WT_USER_IS_ADMIN) { echo "<table width=\"100%\">"; echo "<tr><td align=\"left\">\n"; - echo "<a href=\"module.php?mod=googlemap&mod_action=editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; echo "</td>\n"; echo "<td align=\"center\">\n"; - echo "<a href=\"module.php?mod=googlemap&mod_action=places\">", i18n::translate('Edit geographic place locations'), "</a>"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_places\">", i18n::translate('Edit geographic place locations'), "</a>"; echo "</td>\n"; echo "<td align=\"right\">\n"; - echo "<a href=\"module.php?mod=googlemap&mod_action=placecheck\">", i18n::translate('Place Check'), "</a>"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_placecheck\">", i18n::translate('Place Check'), "</a>"; echo "</td></tr>\n"; echo "</table>\n"; } diff --git a/modules/googlemap/placehierarchy.php b/modules/googlemap/placehierarchy.php index 2286a4771e..44abf3abdc 100644 --- a/modules/googlemap/placehierarchy.php +++ b/modules/googlemap/placehierarchy.php @@ -179,13 +179,13 @@ function create_map() { if (WT_USER_IS_ADMIN) { echo "<table style=\"width: ", $GOOGLEMAP_PH_XSIZE, "px\">"; echo "<tr><td align=\"left\">\n"; - echo "<a href=\"module.php?mod=googlemap&mod_action=editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_editconfig\">", i18n::translate('Manage GoogleMap configuration'), "</a>"; echo "</td>\n"; echo "<td align=\"center\">\n"; - echo "<a href=\"module.php?mod=googlemap&mod_action=places\">", i18n::translate('Edit geographic place locations'), "</a>"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_places\">", i18n::translate('Edit geographic place locations'), "</a>"; echo "</td>\n"; echo "<td align=\"right\">\n"; - echo "<a href=\"module.php?mod=googlemap&mod_action=placecheck\">", i18n::translate('Place Check'), "</a>"; + echo "<a href=\"module.php?mod=googlemap&mod_action=admin_placecheck\">", i18n::translate('Place Check'), "</a>"; echo "</td></tr>\n"; echo "</table>\n"; } @@ -297,7 +297,7 @@ function print_gm_markers($place2, $level, $parent, $levelm, $linklevels, $place } echo "<br />", i18n::translate('This place has no coordinates'); if (WT_USER_IS_ADMIN) - echo "<br /><a href='module.php?mod=googlemap&mod_action=places&parent=", $levelm, "&display=inactive'>", i18n::translate('Edit geographic location'), "</a>"; + echo "<br /><a href='module.php?mod=googlemap&mod_action=admin_places&parent=", $levelm, "&display=inactive'>", i18n::translate('Edit geographic location'), "</a>"; echo "</div></td>\", icon_type, \"", str_replace(array('‎', '‏'), array(WT_UTF8_LRM, WT_UTF8_RLM), addslashes($place2['place'])), "\");\n"; } else { $lati = str_replace(array('N', 'S', ','), array('', '-', '.'), $place2['lati']); @@ -566,7 +566,7 @@ function map_scripts($numfound, $level, $parent, $linklevels, $placelevels, $pla echo "var marker = createMarker(point, \"<td width='100%'><div class='iwstyle' style='width: 250px;'><b>"; echo substr($placelevels, 2), "</b><br />", i18n::translate('This place has no coordinates'); if (WT_USER_IS_ADMIN) - echo "<br /><a href='module.php?mod=googlemap&mod_action=places&parent=0&display=inactive'>", i18n::translate('Edit geographic location'), "</a>"; + echo "<br /><a href='module.php?mod=googlemap&mod_action=admin_places&parent=0&display=inactive'>", i18n::translate('Edit geographic location'), "</a>"; echo "<br /></div></td>\", icon_type, \"", i18n::translate('Edit geographic location'), "\");\n"; echo "place_map.addOverlay(marker);\n"; echo "bounds.extend(point);\n"; @@ -623,7 +623,7 @@ function map_scripts($numfound, $level, $parent, $linklevels, $placelevels, $pla echo "var marker = createMarker(point, \"<td width='100%'><div class='iwstyle' style='width: 250px;'>"; echo "<br />", i18n::translate('This place has no coordinates'); if (WT_USER_IS_ADMIN) - echo "<br /><a href='module.php?mod=googlemap&mod_action=places&parent=0&display=inactive'>", i18n::translate('Edit geographic location'), "</a>"; + echo "<br /><a href='module.php?mod=googlemap&mod_action=admin_places&parent=0&display=inactive'>", i18n::translate('Edit geographic location'), "</a>"; echo "<br /></div></td>\", icon_type, \"", i18n::translate('Edit geographic location'), "\");\n"; echo "place_map.addOverlay(marker);\n"; echo "bounds.extend(point);\n"; diff --git a/modules/googlemap/places_edit.php b/modules/googlemap/places_edit.php index bc35dfa2b6..d41528565a 100644 --- a/modules/googlemap/places_edit.php +++ b/modules/googlemap/places_edit.php @@ -89,7 +89,7 @@ function getHighestIndex() { $where_am_i=place_id_to_hierarchy($placeid); $level=count($where_am_i); -$link = 'module.php?mod=googlemap&mod_action=places&parent='.$placeid; +$link = 'module.php?mod=googlemap&mod_action=admin_places&parent='.$placeid; if ($action=='addrecord' && WT_USER_IS_ADMIN) { $statement= diff --git a/modules/sitemap/admin_config.php b/modules/sitemap/admin_config.php deleted file mode 100644 index 734ab8b382..0000000000 --- a/modules/sitemap/admin_config.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php -/** - * Sitemap configuration User Interface. - * - * Provides links for administrators to get to other administrative areas of the site - * - * webtrees: Web based Family History software - * Copyright (C) 2010 webtrees development team. - * - * Derived from PhpGedView - * Copyright (C) 2002 to 2008 PGV Development Team. All rights reserved. - * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * This Page Is Valid XHTML 1.0 Transitional! > 01 September 2005 - * - * @package webtrees - * @subpackage Admin - * @version $Id$ - */ - -if (!defined('WT_WEBTREES')) { - header('HTTP/1.0 403 Forbidden'); - exit; -} - -if (WT_USER_IS_ADMIN) { ?> - <tr> - <td colspan="2" class="topbottombar" style="text-align:center; "><?php echo i18n::translate('Sitemap'); ?></td> - </tr> - <tr> - <td class="optionbox"><a href="module.php?mod=sitemap"><?php echo i18n::translate('Generate Sitemap files'); ?></a><?php echo help_link('SITEMAP','sitemap'); ?> - </td> - <td class="optionbox"> - </td> - </tr> -<?php } diff --git a/modules/sitemap/index.php b/modules/sitemap/admin_index.php index 19a74e5995..9081eb0836 100644 --- a/modules/sitemap/index.php +++ b/modules/sitemap/admin_index.php @@ -82,7 +82,7 @@ if ($action=="sendFiles") { if (isset($welcome)) { echo " <url>\n"; - echo " <loc>", WT_SERVER_NAME, WT_SCRIPT_PATH, "index.php?command=gedcom&ged=", rawurlencode($gedcom_name), "</loc>\n"; + echo " <loc>", WT_SERVER_NAME, WT_SCRIPT_PATH, "index.php?ctype=gedcom&ged=", rawurlencode($gedcom_name), "</loc>\n"; echo " <changefreq>", $welcome_update, "</changefreq>\n"; echo " <priority>0.", $welcome_priority, "</priority>\n"; echo " </url>\n"; @@ -232,7 +232,7 @@ if ($action=="generate") { if (isset($_POST["GEDCOM_{$ged_id}"])) { $filecounter += 1; $sitemapFilename = "SM_".str_ireplace(".ged",".xml",$gedcom); - echo "<tr><td class=\"optionbox\"><a href=\"module.php?mod=sitemap&mod_action=index&action=sendFiles&index=", $ged_id, "&gedcom_name=", rawurlencode($gedcom), "&filename=", $sitemapFilename; + echo "<tr><td class=\"optionbox\"><a href=\"module.php?mod=sitemap&mod_action=admin_index&action=sendFiles&index=", $ged_id, "&gedcom_name=", rawurlencode($gedcom), "&filename=", $sitemapFilename; if (isset($_POST["welcome_page"])) echo "&welcome=true&welcome_priority=", $welcome_priority, "&welcome_update=", $welcome_update; if (isset($_POST["indi_recs"])) echo "&indi_rec=true&indirec_priority=", $indirec_priority, "&indirec_update=", $indirec_update; if (isset($_POST["indi_list"])) echo "&indi_lists=true&indilist_priority=", $indilist_priority, "&indilist_update=", $indilist_update; @@ -243,7 +243,7 @@ if ($action=="generate") { } } if ($filecounter > 1) { - echo "<tr><td class=\"optionbox\"><a href=\"module.php?mod=sitemap&mod_action=index&action=sendIndex"; + echo "<tr><td class=\"optionbox\"><a href=\"module.php?mod=sitemap&mod_action=admin_index&action=sendIndex"; foreach (get_all_gedcoms() as $ged_id=>$gedcom) { if (isset($_POST["GEDCOM_{$ged_id}"])) { echo "&filenames[", $ged_id, "]=", $gedcom; @@ -261,7 +261,7 @@ if ($action=="") { <h3><?php echo i18n::translate('Generate Sitemap files'), help_link('SITEMAP','sitemap'); ?></h3> -<form method="post" enctype="multipart/form-data" id="sitemap" name="sitemap" action="module.php?mod=sitemap&mod_action=index"> +<form method="post" enctype="multipart/form-data" id="sitemap" name="sitemap" action="module.php?mod=sitemap&mod_action=admin_index"> <input type="hidden" name="action" value="generate" /> <table class="facts_table width100"> <tr> diff --git a/modules/sitemap/module.php b/modules/sitemap/module.php index dfafd1f133..4096357e6e 100644 --- a/modules/sitemap/module.php +++ b/modules/sitemap/module.php @@ -48,7 +48,7 @@ class sitemap_WT_Module extends WT_Module implements WT_Module_Config{ // Extend WT_Module public function modAction($mod_action) { switch($mod_action) { - case 'index': + case 'admin_index': // TODO: these files should be methods in this class require WT_ROOT.'modules/'.$this->getName().'/'.$mod_action.'.php'; break; @@ -57,6 +57,6 @@ class sitemap_WT_Module extends WT_Module implements WT_Module_Config{ // Implement WT_Module_Config public function getConfigLink() { - return 'module.php?mod='.$this->getName().'&mod_action=index'; + return 'module.php?mod='.$this->getName().'&mod_action=admin_index'; } } diff --git a/modules/stories/module.php b/modules/stories/module.php index 68c3fae49c..b782189ebf 100644 --- a/modules/stories/module.php +++ b/modules/stories/module.php @@ -46,17 +46,17 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_ // Extend WT_Module public function modAction($mod_action) { switch($mod_action) { - case 'edit': + case 'admin_edit': $this->edit(); break; - case 'delete': + case 'admin_delete': $this->delete(); $this->config(); break; - case 'config': + case 'admin_config': $this->config(); break; - case 'show_list': + case 'admin_show_list': $this->show_list(); break; default: @@ -66,7 +66,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_ // Implement WT_Module_Config public function getConfigLink() { - return 'module.php?mod='.$this->getName().'&mod_action=config'; + return 'module.php?mod='.$this->getName().'&mod_action=admin_config'; } // Implement class WT_Module_Block @@ -120,14 +120,14 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_ $html.='<div class="news_title center">'.get_block_setting($block_id, 'title').'</div>'; $html.='<div>'.get_block_setting($block_id, 'story_body').'</div><br />'; if (WT_USER_CAN_EDIT) { - $html.='<div><a href="module.php?mod='.$this->getName().'&mod_action=edit&block_id='.$block_id.'">'; + $html.='<div><a href="module.php?mod='.$this->getName().'&mod_action=admin_edit&block_id='.$block_id.'">'; $html.=i18n::translate('Edit story').'</a></div><br />'; } } } if (WT_USER_GEDCOM_ADMIN && !$html) { $html.='<div class="news_title center">'.$this->getTitle().'</div>'; - $html.='<div><a href="module.php?mod='.$this->getName().'&mod_action=edit&xref='.$this->controller->indi->getXref().'">'; + $html.='<div><a href="module.php?mod='.$this->getName().'&mod_action=admin_edit&xref='.$this->controller->indi->getXref().'">'; $html.=i18n::translate('Add story').'</a>'.help_link('add_story', $this->getName()).'</div><br />'; } return $html; @@ -315,7 +315,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_ echo '<table class="list_table">'; echo '<tr><td class="list_label" colspan="4">'; - echo '<a href="module.php?mod=', $this->getName(), '&mod_action=edit">', i18n::translate('Add story'), '</a>'; + echo '<a href="module.php?mod=', $this->getName(), '&mod_action=admin_edit">', i18n::translate('Add story'), '</a>'; echo help_link('add_story', $this->getName()); echo '</td></tr>'; if (count($stories)>0) { @@ -334,8 +334,8 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_ echo '<tr><td class="optionbox center">'; echo get_block_setting($story->block_id, 'title'); echo '<td class="list_value_wrap">', $name, '</td>'; - echo '<td class="optionbox center"><a href="module.php?mod=', $this->getName(), '&mod_action=edit&block_id=', $story->block_id, '">', i18n::translate('Edit'), '</a></td>'; - echo '<td class="optionbox center"><a href="module.php?mod=', $this->getName(), '&mod_action=delete&block_id=', $story->block_id, '" onclick="return confirm(\'', i18n::translate('Are you sure you want to delete this story?'), '\');">', i18n::translate('Delete'), '</a>'; + echo '<td class="optionbox center"><a href="module.php?mod=', $this->getName(), '&mod_action=admin_edit&block_id=', $story->block_id, '">', i18n::translate('Edit'), '</a></td>'; + echo '<td class="optionbox center"><a href="module.php?mod=', $this->getName(), '&mod_action=admin_delete&block_id=', $story->block_id, '" onclick="return confirm(\'', i18n::translate('Are you sure you want to delete this story?'), '\');">', i18n::translate('Delete'), '</a>'; echo '</td></tr>'; } echo '</table>'; @@ -345,7 +345,7 @@ class stories_WT_Module extends WT_Module implements WT_Module_Block, WT_Module_ exit; } } - // Following function allows Story list to be added manually as a menu item in header.php if required, using link such as "module.php?mod=stories&mod_action=show_list" + // Following function allows Story list to be added manually as a menu item in header.php if required, using link such as "module.php?mod=stories&mod_action=admin_show_list" // No privacy restrictions included here though - so use with care! private function show_list() { global $WT_IMAGES, $TEXT_DIRECTION; |
