aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php28
1 files changed, 8 insertions, 20 deletions
diff --git a/include/text.php b/include/text.php
index caaef664f..a7cc4c9bd 100644
--- a/include/text.php
+++ b/include/text.php
@@ -20,7 +20,6 @@ define('RANDOM_STRING_TEXT', 0x01 );
* @return string substituted string
*/
function replace_macros($s, $r) {
- $a = get_app();
$arr = array('template' => $s, 'params' => $r);
call_hooks('replace_macros', $arr);
@@ -96,7 +95,6 @@ function z_input_filter($channel_id,$s,$type = 'text/bbcode') {
if($type == 'application/x-pdl')
return escape_tags($s);
- $a = get_app();
if(App::$is_sys) {
return $s;
}
@@ -653,11 +651,10 @@ function log_priority_str($priority) {
* @param int $level A log level.
*/
function dlogger($msg, $level = 0) {
+
// turn off logger in install mode
- global $a;
- global $db;
- if((App::$module == 'install') || (! (DBA::$dba && DBA::$dba->connected)))
+ if(App::$module == 'setup')
return;
$debugging = get_config('system','debugging');
@@ -815,7 +812,6 @@ function get_mentions($item,$tags) {
function contact_block() {
$o = '';
- $a = get_app();
if(! App::$profile['uid'])
return;
@@ -928,7 +924,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
function search($s,$id='search-box',$url='/search',$save = false) {
- $a = get_app();
+
return replace_macros(get_markup_template('searchbox.tpl'),array(
'$s' => $s,
'$id' => $id,
@@ -1073,7 +1069,7 @@ function get_mood_verbs() {
// Function to list all smilies, both internal and from addons
// Returns array with keys 'texts' and 'icons'
function list_smilies() {
- $a = get_app();
+
$texts = array(
'<3',
'</3',
@@ -1106,10 +1102,8 @@ function list_smilies() {
':coffee',
':facepalm',
':like',
- ':dislike',
- 'red#matrix',
- 'red#',
- 'r#'
+ ':dislike'
+
);
$icons = array(
@@ -1145,9 +1139,6 @@ function list_smilies() {
'<img class="smiley" src="' . z_root() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
'<img class="smiley" src="' . z_root() . '/images/like.gif" alt=":like" />',
'<img class="smiley" src="' . z_root() . '/images/dislike.gif" alt=":dislike" />',
- '<a href="http://getzot.com"><strong>red<img class="smiley bb_rm-logo" src="' . z_root() . '/images/rm-32.png" alt="' . urlencode('red#matrix') . '" />matrix</strong></a>',
- '<a href="http://getzot.com"><strong>red<img class="smiley bb_rm-logo" src="' . z_root() . '/images/rm-32.png" alt="' . urlencode('red#') . '" />matrix</strong></a>',
- '<a href="http://getzot.com"><strong>red<img class="smiley bb_rm-logo" src="' . z_root() . '/images/rm-32.png" alt="r#" />matrix</strong></a>'
);
@@ -1218,7 +1209,7 @@ function smile_unshield($m) {
* @param array $x
*/
function preg_heart($x) {
- $a = get_app();
+
if (strlen($x[1]) == 1)
return $x[0];
@@ -1491,7 +1482,6 @@ function format_event($jobject) {
}
function prepare_body(&$item,$attach = false) {
- require_once('include/channel.php');
call_hooks('prepare_body_init', $item);
@@ -1721,7 +1711,6 @@ function feed_hublinks() {
/* return atom link elements for salmon endpoints */
function feed_salmonlinks($nick) {
- $a = get_app();
$salmon = '<link rel="salmon" href="' . xmlify(z_root() . '/salmon/' . $nick) . '" />' . "\n" ;
@@ -1789,7 +1778,7 @@ function mimetype_select($channel_id, $current = 'text/bbcode') {
'application/x-pdl'
);
- $a = get_app();
+
if(App::$is_sys) {
$x[] = 'application/x-php';
}
@@ -1822,7 +1811,6 @@ function mimetype_select($channel_id, $current = 'text/bbcode') {
function lang_selector() {
- global $a;
$langs = glob('view/*/hstrings.php');