mirror of
https://github.com/friendica/friendica
synced 2024-12-23 02:00:17 +00:00
Installed apps as array instead of string
This commit is contained in:
parent
d0926240a8
commit
71d44d78ec
7 changed files with 23 additions and 13 deletions
|
@ -17,7 +17,7 @@ function calc_uninstall() {
|
|||
}
|
||||
|
||||
function calc_app_menu($a,&$b) {
|
||||
$b['app_menu'] .= '<div class="app-title"><a href="calc">Calculator</a></div>';
|
||||
$b['app_menu'][] = Array('url'=>'calc', 'name'=>'Calculator');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ function convert_uninstall() {
|
|||
}
|
||||
|
||||
function convert_app_menu($a,&$b) {
|
||||
$b['app_menu'] .= '<div class="app-title"><a href="convert">Units Conversion</a></div>';
|
||||
$b['app_menu'][] = Array('url'=>'convert', 'name'=>'Units Conversion');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ function sniper_uninstall() {
|
|||
}
|
||||
|
||||
function sniper_app_menu($a,&$b) {
|
||||
$b['app_menu'] .= '<div class="app-title"><a href="sniper">Hot Shot Sniper</a></div>';
|
||||
$b['app_menu'][] = Array('url'=>'sniper', 'name'=>'Hot Shot Sniper');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ function tictac_uninstall() {
|
|||
}
|
||||
|
||||
function tictac_app_menu($a,&$b) {
|
||||
$b['app_menu'] .= '<div class="app-title"><a href="tictac">' . t('Three Dimensional Tic-Tac-Toe') . '</a></div>';
|
||||
$b['app_menu'][] = Array('url'=>'tictac', 'name'=>'Three Dimensional Tic-Tac-Toe');
|
||||
}
|
||||
|
||||
|
||||
|
|
2
boot.php
2
boot.php
|
@ -246,7 +246,7 @@ class App {
|
|||
public $timezone;
|
||||
public $interactive = true;
|
||||
public $plugins;
|
||||
public $apps;
|
||||
public $apps = Array();
|
||||
public $identities;
|
||||
|
||||
private $scheme;
|
||||
|
|
19
mod/apps.php
19
mod/apps.php
|
@ -1,15 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
function apps_content(&$a) {
|
||||
$title = t('Applications');
|
||||
|
||||
$o .= '<h3>' . t('Applications') . '</h3>';
|
||||
|
||||
if($a->apps)
|
||||
$o .= $a->apps;
|
||||
else
|
||||
if(count($a->apps)==0)
|
||||
notice( t('No installed applications.') . EOL);
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
||||
$tpl = get_markup_template("apps.tpl");
|
||||
return replace_macros($tpl, array(
|
||||
'$title' => $title,
|
||||
'$apps' => $a->apps,
|
||||
));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
7
view/apps.tpl
Normal file
7
view/apps.tpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
<h3>$title</h3>
|
||||
|
||||
<ul>
|
||||
{{ for $apps as $ap }}
|
||||
<li><a href="$ap.url">$ap.name</a></li>
|
||||
{{ endfor }}
|
||||
</ul>
|
Loading…
Reference in a new issue