Skip to content
Snippets Groups Projects
Commit e34fa009 authored by http://druler.com's avatar http://druler.com
Browse files

Issue #901596 by Ambidex, Boobaa | Rob_Feature: Use libraries api module for storing markers.

parent af5c9114
No related branches found
No related tags found
No related merge requests found
...@@ -38,11 +38,11 @@ function _gmap_get_icondata() { ...@@ -38,11 +38,11 @@ function _gmap_get_icondata() {
// This whole process gets cached. // This whole process gets cached.
// Get the ini files. // Get the ini files.
$inis = array();
if (is_array($markerdirs)) { if (is_array($markerdirs)) {
foreach ($markerdirs as $markerdir) { foreach ($markerdirs as $markerdir) {
$inifiles = file_scan_directory($markerdir, '/.*\.ini$/'); $inifiles = file_scan_directory($markerdir, '/.*\.ini$/');
// Parse the ini files and store by path. // Parse the ini files and store by path.
$inis = array();
foreach ($inifiles as $file) { foreach ($inifiles as $file) {
$path = substr($file->uri, 0, -strlen($file->filename)); $path = substr($file->uri, 0, -strlen($file->filename));
if (!isset($inis[$path])) { if (!isset($inis[$path])) {
...@@ -245,6 +245,7 @@ function _gmap_get_marker_titles() { ...@@ -245,6 +245,7 @@ function _gmap_get_marker_titles() {
// This whole process gets cached. // This whole process gets cached.
// Get the ini files. // Get the ini files.
$titles = array();
if (is_array($markerdirs)) { if (is_array($markerdirs)) {
foreach ($markerdirs as $markerdir) { foreach ($markerdirs as $markerdir) {
$inifiles = file_scan_directory($markerdir, '/.*\.ini$/'); $inifiles = file_scan_directory($markerdir, '/.*\.ini$/');
...@@ -266,7 +267,6 @@ function _gmap_get_marker_titles() { ...@@ -266,7 +267,6 @@ function _gmap_get_marker_titles() {
} }
unset($inifiles); unset($inifiles);
$titles = array();
foreach ($inis as $ini => $inidata) { foreach ($inis as $ini => $inidata) {
foreach ($inidata as $k => $v) { foreach ($inidata as $k => $v) {
$titles[$k] = t($inis[$ini][$k]['name']); $titles[$k] = t($inis[$ini][$k]['name']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment