]> git.mxchange.org Git - friendica.git/commitdiff
Remove mod files
authorAdam Magness <adam.magness@gmail.com>
Wed, 6 Dec 2017 21:45:41 +0000 (16:45 -0500)
committerAdam Magness <adam.magness@gmail.com>
Wed, 6 Dec 2017 21:45:41 +0000 (16:45 -0500)
remove mod files based on lack of usage/obseleteness.

mod/cb.php [deleted file]
mod/mood.php [deleted file]
mod/navigation.php [deleted file]
mod/qsearch.php [deleted file]
mod/session.php [deleted file]

diff --git a/mod/cb.php b/mod/cb.php
deleted file mode 100644 (file)
index 030bea4..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-/**
- * General purpose landing page for plugins/addons
- */
-
-use Friendica\App;
-
-function cb_init(App $a) {
-       call_hooks('cb_init');
-}
-
-function cb_post(App $a) {
-       call_hooks('cb_post', $_POST);
-}
-
-function cb_afterpost(App $a) {
-       call_hooks('cb_afterpost');
-}
-
-function cb_content(App $a) {
-       $o = '';
-       call_hooks('cb_content', $o);
-       return $o;
-}
\ No newline at end of file
diff --git a/mod/mood.php b/mod/mood.php
deleted file mode 100644 (file)
index bffe37f..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-<?php
-
-use Friendica\App;
-use Friendica\Core\System;
-use Friendica\Core\Worker;
-use Friendica\Database\DBM;
-
-require_once('include/security.php');
-require_once('include/bbcode.php');
-require_once('include/items.php');
-
-function mood_init(App $a) {
-
-       if (! local_user()) {
-               return;
-       }
-
-       $uid = local_user();
-       $verb = notags(trim($_GET['verb']));
-
-       if(! $verb)
-               return;
-
-       $verbs = get_mood_verbs();
-
-       if(! in_array($verb,$verbs))
-               return;
-
-       $activity = ACTIVITY_MOOD . '#' . urlencode($verb);
-
-       $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : 0);
-
-
-       logger('mood: verb ' . $verb, LOGGER_DEBUG);
-
-
-       if($parent) {
-               $r = q("select uri, private, allow_cid, allow_gid, deny_cid, deny_gid
-                       from item where id = %d and parent = %d and uid = %d limit 1",
-                       intval($parent),
-                       intval($parent),
-                       intval($uid)
-               );
-               if (DBM::is_result($r)) {
-                       $parent_uri = $r[0]['uri'];
-                       $private    = $r[0]['private'];
-                       $allow_cid  = $r[0]['allow_cid'];
-                       $allow_gid  = $r[0]['allow_gid'];
-                       $deny_cid   = $r[0]['deny_cid'];
-                       $deny_gid   = $r[0]['deny_gid'];
-               }
-       }
-       else {
-
-               $private = 0;
-
-               $allow_cid     =  $a->user['allow_cid'];
-               $allow_gid     =  $a->user['allow_gid'];
-               $deny_cid      =  $a->user['deny_cid'];
-               $deny_gid      =  $a->user['deny_gid'];
-       }
-
-       $poster = $a->contact;
-
-       $uri = item_new_uri($a->get_hostname(),$uid);
-
-       $action = sprintf( t('%1$s is currently %2$s'), '[url=' . $poster['url'] . ']' . $poster['name'] . '[/url]' , $verbs[$verb]);
-
-       $arr = array();
-       $arr['guid']          = get_guid(32);
-       $arr['uid']           = $uid;
-       $arr['uri']           = $uri;
-       $arr['parent-uri']    = (($parent_uri) ? $parent_uri : $uri);
-       $arr['type']          = 'activity';
-       $arr['wall']          = 1;
-       $arr['contact-id']    = $poster['id'];
-       $arr['owner-name']    = $poster['name'];
-       $arr['owner-link']    = $poster['url'];
-       $arr['owner-avatar']  = $poster['thumb'];
-       $arr['author-name']   = $poster['name'];
-       $arr['author-link']   = $poster['url'];
-       $arr['author-avatar'] = $poster['thumb'];
-       $arr['title']         = '';
-       $arr['allow_cid']     = $allow_cid;
-       $arr['allow_gid']     = $allow_gid;
-       $arr['deny_cid']      = $deny_cid;
-       $arr['deny_gid']      = $deny_gid;
-       $arr['last-child']    = 1;
-       $arr['visible']       = 1;
-       $arr['verb']          = $activity;
-       $arr['private']       = $private;
-
-       $arr['origin']        = 1;
-       $arr['body']          = $action;
-
-       $item_id = item_store($arr);
-       if($item_id) {
-               q("UPDATE `item` SET `plink` = '%s' WHERE `uid` = %d AND `id` = %d",
-                       dbesc(System::baseUrl() . '/display/' . $poster['nickname'] . '/' . $item_id),
-                       intval($uid),
-                       intval($item_id)
-               );
-               Worker::add(PRIORITY_HIGH, "Notifier", "tag", $item_id);
-       }
-
-
-       call_hooks('post_local_end', $arr);
-
-       Worker::add(PRIORITY_HIGH, "Notifier", "like", $post_id);
-
-       return;
-}
-
-
-
-function mood_content(App $a) {
-
-       if (! local_user()) {
-               notice( t('Permission denied.') . EOL);
-               return;
-       }
-
-       $parent = ((x($_GET,'parent')) ? intval($_GET['parent']) : '0');
-
-
-
-       $verbs = get_mood_verbs();
-
-       $shortlist = array();
-       foreach($verbs as $k => $v)
-               if($v !== 'NOTRANSLATION')
-                       $shortlist[] = array($k,$v);
-
-
-       $tpl = get_markup_template('mood_content.tpl');
-
-       $o = replace_macros($tpl,array(
-               '$title' => t('Mood'),
-               '$desc' => t('Set your current mood and tell your friends'),
-               '$verbs' => $shortlist,
-               '$parent' => $parent,
-               '$submit' => t('Submit'),
-       ));
-
-       return $o;
-
-}
diff --git a/mod/navigation.php b/mod/navigation.php
deleted file mode 100644 (file)
index d05131e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-use Friendica\App;
-use Friendica\Core\System;
-
-require_once("include/nav.php");
-
-function navigation_content(App $a) {
-
-       $nav_info = nav_info($a);
-
-       /**
-        * Build the page
-        */
-
-       $tpl = get_markup_template('navigation.tpl');
-       return replace_macros($tpl, array(
-               '$baseurl' => System::baseUrl(),
-               '$sitelocation' => $nav_info['sitelocation'],
-               '$nav' => $nav_info['nav'],
-               '$banner' =>  $nav_info['banner'],
-               '$emptynotifications' => t('Nothing new here'),
-               '$userinfo' => $nav_info['userinfo'],
-               '$sel' =>       $a->nav_sel,
-               '$apps' => $a->apps,
-               '$clear_notifs' => t('Clear notifications')
-       ));
-
-}
diff --git a/mod/qsearch.php b/mod/qsearch.php
deleted file mode 100644 (file)
index 167ee41..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-use Friendica\App;
-use Friendica\Core\Config;
-use Friendica\Database\DBM;
-
-function qsearch_init(App $a) {
-
-       if (! local_user()) {
-               killme();
-       }
-
-       $limit = (Config::get('system','qsearch_limit') ? intval(Config::get('system','qsearch_limit')) : 100);
-
-       $search = ((x($_GET,'s')) ? notags(trim(urldecode($_GET['s']))) : '');
-
-       if(! strlen($search))
-               killme();
-
-
-       if($search)
-               $search = dbesc($search);
-
-       $results = array();
-
-       $r = q("SELECT * FROM `group` WHERE `name` REGEXP '$search' AND `deleted` = 0 AND `uid` = %d LIMIT 0, %d ",
-               intval(local_user()),
-               intval($limit)
-       );
-
-       if (DBM::is_result($r)) {
-
-               foreach($r as $rr)
-                       $results[] = array( 0, (int) $rr['id'], $rr['name'], '', '');
-       }
-
-       $sql_extra = ((strlen($search)) ? " AND (`name` REGEXP '$search' OR `nick` REGEXP '$search') " : "");
-
-
-       $r = q("SELECT * FROM `contact` WHERE `uid` = %d $sql_extra ORDER BY `name` ASC LIMIT 0, %d ",
-               intval(local_user()),
-               intval($limit)
-       );
-
-
-       if (DBM::is_result($r)) {
-
-               foreach($r as $rr)
-                       $results[] = array( (int) $rr['id'], 0, $rr['name'],$rr['url'],$rr['photo']);
-       }
-
-       echo json_encode((object) $results);
-       killme();
-}
diff --git a/mod/session.php b/mod/session.php
deleted file mode 100644 (file)
index 783d6f3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-use Friendica\App;
-
-function session_content(App $a) {
-
-}