@@ 419-430 (lines=12) @@ | ||
416 | { |
|
417 | static $fileIds = null; |
|
418 | ||
419 | if (!isset($fileIds)) |
|
420 | { |
|
421 | $db = JFactory::getDbo(); |
|
422 | ||
423 | $db->setQuery( |
|
424 | $db->getQuery(true) |
|
425 | ->select($db->quoteName(array('id', 'path'))) |
|
426 | ->from($db->quoteName('#__localise')) |
|
427 | ); |
|
428 | ||
429 | $fileIds = $db->loadObjectList('path'); |
|
430 | } |
|
431 | ||
432 | if (is_file($path) || preg_match('/.ini$/', $path)) |
|
433 | { |
|
@@ 470-481 (lines=12) @@ | ||
467 | { |
|
468 | static $filePaths = null; |
|
469 | ||
470 | if (!isset($filePaths)) |
|
471 | { |
|
472 | $db = JFactory::getDbo(); |
|
473 | ||
474 | $db->setQuery( |
|
475 | $db->getQuery(true) |
|
476 | ->select($db->quoteName(array('id', 'path'))) |
|
477 | ->from($db->quoteName('#__localise')) |
|
478 | ); |
|
479 | ||
480 | $filePaths = $db->loadObjectList('id'); |
|
481 | } |
|
482 | ||
483 | return array_key_exists("$id", $filePaths) ? |
|
484 | $filePaths["$id"]->path : ''; |