------------------------------------------------------------
revno: 1053
committer: Roger Martin <[email protected]>
branch nick: aikiframework
timestamp: Sun 2012-01-29 23:36:05 +0100
message:
added get_license
modified:
libs/Util.php
--
lp:aikiframework
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk
Your team Aiki Framework Developers is subscribed to branch lp:aikiframework.
To unsubscribe from this branch go to
https://code.launchpad.net/~aikiframework-devel/aikiframework/trunk/+edit-subscription
=== modified file 'libs/Util.php'
--- libs/Util.php 2012-01-16 06:30:12 +0000
+++ libs/Util.php 2012-01-29 22:36:05 +0000
@@ -50,15 +50,27 @@
return $last_revision;
}
-
- public static function get_authors() {
+ public static function get_license( ) {
+ global $AIKI_ROOT_DIR;
+ $file = $AIKI_ROOT_DIR . "/LICENSE";
+ if ( file_exists($file) ) {
+ return file_get_contents($file);
+ }
+ return "GNU AFFERO GENERAL PUBLIC LICENSE\nVrsion 3, 19 November 2007";
+ }
+
+ public static function get_authors( $format="plain") {
global $AIKI_ROOT_DIR;
$authors_file = $AIKI_ROOT_DIR . "/AUTHORS";
// $authors = _('See AUTHORS file.');
$authors_array = array(_('See AUTHORS file.'));
- if ( file_exists($authors_file) )
- $authors_array =
- explode("\n", file_get_contents($authors_file));
+ if ( file_exists($authors_file) ) {
+ $authors_array = explode("\n", file_get_contents($authors_file));
+ }
+
+ if ( $format=="list") {
+ return "<ul><li>". join('</li><li>', array_filter($authors_array)) ."</li></ul>";
+ }
return join(', ', $authors_array);
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp