summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2014-04-25 22:51:42 +0100
committerGreg Roach <fisharebest@gmail.com>2014-04-25 22:51:42 +0100
commit577ee5e259b6dc6e3332e6f279ad8fca380b297b (patch)
treed1152b7ce65a2e313f3414d4a3b972158794a472
parent5be4ef6c26d59979d2f0399acfcb1f3b36ffd14d (diff)
downloadwebtrees-577ee5e259b6dc6e3332e6f279ad8fca380b297b.tar.gz
webtrees-577ee5e259b6dc6e3332e6f279ad8fca380b297b.tar.bz2
webtrees-577ee5e259b6dc6e3332e6f279ad8fca380b297b.zip
Move global function to local scope
-rw-r--r--includes/functions/functions.php6
-rw-r--r--modules_v3/googlemap/module.php2
2 files changed, 1 insertions, 7 deletions
diff --git a/includes/functions/functions.php b/includes/functions/functions.php
index efce8e0437..ab72ab9f50 100644
--- a/includes/functions/functions.php
+++ b/includes/functions/functions.php
@@ -1889,9 +1889,3 @@ function get_new_xref($type='INDI', $ged_id=WT_GED_ID) {
function isFileExternal($file) {
return strpos($file, '://') !== false;
}
-
-// Returns the part of the haystack before the first occurrence of the needle.
-// Use it to emulate the before_needle php 5.3.0 strstr function
-function strstrb($haystack, $needle){
- return substr($haystack, 0, strpos($haystack, $needle));
-}
diff --git a/modules_v3/googlemap/module.php b/modules_v3/googlemap/module.php
index 8921e23972..5ae00d2fe8 100644
--- a/modules_v3/googlemap/module.php
+++ b/modules_v3/googlemap/module.php
@@ -4318,7 +4318,7 @@ class googlemap_WT_Module extends WT_Module implements WT_Module_Config, WT_Modu
?>
<script>
function updateList(inactive) {
- window.location.href='<?php if (strstrb($_SERVER['REQUEST_URI'], '&inactive')) { $uri=strstrb($_SERVER['REQUEST_URI'], '&inactive');} else { $uri=$_SERVER['REQUEST_URI']; } echo $uri, '&inactive='; ?>'+inactive;
+ window.location.href='<?php if (strstr($_SERVER['REQUEST_URI'], '&inactive', true)) { $uri=strstr($_SERVER['REQUEST_URI'], '&inactive', true);} else { $uri=$_SERVER['REQUEST_URI']; } echo $uri, '&inactive='; ?>'+inactive;
}
function edit_place_location(placeid) {