aboutsummaryrefslogtreecommitdiffstats
path: root/en/doc
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2013-12-29 17:54:47 +0000
committerFilip Komar <filip@mageia.org>2013-12-29 17:54:47 +0000
commit7b4a6b7da6f6ab2501eb1d9d8cba59a2a215bd36 (patch)
tree3d49db4877c850e9d1dbfd067b29e726d038c723 /en/doc
parenteaf8988c4d359e08ffa822a4c72403559f80f51f (diff)
downloadwww-7b4a6b7da6f6ab2501eb1d9d8cba59a2a215bd36.tar
www-7b4a6b7da6f6ab2501eb1d9d8cba59a2a215bd36.tar.gz
www-7b4a6b7da6f6ab2501eb1d9d8cba59a2a215bd36.tar.bz2
www-7b4a6b7da6f6ab2501eb1d9d8cba59a2a215bd36.tar.xz
www-7b4a6b7da6f6ab2501eb1d9d8cba59a2a215bd36.zip
common function created
Diffstat (limited to 'en/doc')
-rw-r--r--en/doc/index.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/en/doc/index.php b/en/doc/index.php
index 77658c9bd..f8cefbcdf 100644
--- a/en/doc/index.php
+++ b/en/doc/index.php
@@ -3,6 +3,13 @@ define('HLANG', true);
require '../../langs.php';
_lang_load($locale, 'documentation');
+function doc_list($languages, $link)
+{
+ foreach ($languages as $lng) {
+ echo sprintf($link, $lng[0], $lng[1]);
+ }
+}
+
?><!DOCTYPE html>
<html lang="<?php echo $locale; ?>" dir="ltr">
<head>
@@ -38,9 +45,8 @@ _lang_load($locale, 'documentation');
array('ru', 'Pусский'),
array('uk', 'Українська'),
);
- foreach ($mga3_installer as $lng) {
- echo sprintf('<a href="//doc.mageia.org/installer/3/%s/content/index.html">%s</a><br/>', $lng[0], $lng[1]);
- } ?></p>
+ doc_list($mga3_installer, '<a href="//doc.mageia.org/installer/3/%s/content/index.html">%s</a><br/>');
+ ?></p>
</div>
<div style="float: right; margin: 2em;">
<h4><?php _e('Control Center')?></h4>
@@ -50,9 +56,8 @@ _lang_load($locale, 'documentation');
array('et', 'Eesti'),
array('fr', 'Français'),
);
- foreach ($mga3_control_center as $lng) {
- echo sprintf('<a href="//doc.mageia.org/mcc/3/%s/content/index.html">%s</a><br/>', $lng[0], $lng[1]);
- } ?></p>
+ doc_list($mga3_control_center, '<a href="//doc.mageia.org/mcc/3/%s/content/index.html">%s</a><br/>');
+ ?></p>
</div>
<hr style="clear: both;">
<h3>Mageia 2</h3>
@@ -70,9 +75,8 @@ _lang_load($locale, 'documentation');
array('uk', 'Українська'),
);
- foreach ($mga2_installer as $lng) {
- echo sprintf('<a href="//doc.mageia.org/installer/2/%s/content/index.html">%s</a><br/>', $lng[0], $lng[1]);
- } ?></p>
+ doc_list($mga2_installer, '<a href="//doc.mageia.org/installer/2/%s/content/index.html">%s</a><br/>');
+ ?></p>
</div>
</div>
</div>