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