| 724 | | $data = file_get_contents(MIDCOM_ROOT . "/midcom/config/language_db.inc"); |
|---|
| | 724 | /** |
|---|
| | 725 | * midcom_get_snippet_content user midcom_baseclasses_database_snippet which is not initialized yet |
|---|
| | 726 | $data = midcom_get_snippet_content($GLOBALS['midcom_config']['i18n_language_db_path']); |
|---|
| | 727 | */ |
|---|
| | 728 | |
|---|
| | 729 | $path = $GLOBALS['midcom_config']['i18n_language_db_path']; |
|---|
| | 730 | |
|---|
| | 731 | if (substr($path, 0, 5) == 'file:') |
|---|
| | 732 | { |
|---|
| | 733 | $filename = MIDCOM_ROOT . substr($path, 5); |
|---|
| | 734 | if (! file_exists($filename)) |
|---|
| | 735 | { |
|---|
| | 736 | return null; |
|---|
| | 737 | } |
|---|
| | 738 | $data = file_get_contents($filename); |
|---|
| | 739 | } |
|---|
| | 740 | else |
|---|
| | 741 | { |
|---|
| | 742 | if (! mgd_snippet_exists($path)) |
|---|
| | 743 | { |
|---|
| | 744 | return null; |
|---|
| | 745 | } |
|---|
| | 746 | $snippet = mgd_get_snippet_by_path ($path); |
|---|
| | 747 | $data = $snippet->code; |
|---|
| | 748 | } |
|---|