From 1121eb56f58333557576b156a0ab0de0d314e0d1 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 9 Dec 2014 16:54:24 +0300 Subject: [PATCH] Delete CUSTIS-specific login-external.php --- fof-config-sample.php | 10 +-- fof-main.php | 2 - login-external.php | 170 ------------------------------------------ 3 files changed, 5 insertions(+), 177 deletions(-) delete mode 100644 login-external.php diff --git a/fof-config-sample.php b/fof-config-sample.php index 234cb39..8d78613 100644 --- a/fof-config-sample.php +++ b/fof-config-sample.php @@ -4,15 +4,14 @@ * * config.php - modify this file with your database settings * - * * Copyright (C) 2004-2007 Stephen Minutillo + * (C) 2010+ Vitaliy Filippov * steve@minutillo.com - http://minutillo.com/steve/ * * Distributed under the GPL - see LICENSE * */ - // Database connection information. Host, username, password, database name. define('FOF_DB_HOST', "host.example.com"); @@ -21,8 +20,9 @@ define('FOF_DB_PASS', "password"); define('FOF_DB_DBNAME', "database"); define('FOF_DB_CHARSET', "utf8"); -// URL to Global Auth server -//define('FOF_GLOBALAUTH_URL', ''); +/* You may write an auth plugin by defining function fof_require_user_hook() {} + * which should try to detect current user and then call fof_set_current_user($user); + */ // The rest you should not need to change @@ -40,7 +40,7 @@ define('FOF_USER_TABLE', FOF_DB_PREFIX . "user"); // Find ourselves and the cache dir if (!defined('DIR_SEP')) { - define('DIR_SEP', DIRECTORY_SEPARATOR); + define('DIR_SEP', DIRECTORY_SEPARATOR); } if (!defined('FOF_DIR')) { diff --git a/fof-main.php b/fof-main.php index 21343bc..44e1c22 100644 --- a/fof-main.php +++ b/fof-main.php @@ -23,8 +23,6 @@ require_once('fof-config.php'); require_once('fof-db.php'); require_once('classes/fof-prefs.php'); require_once('simplepie/simplepie.php'); -#if (file_exists(dirname(__FILE__).'/login-external.php')) -# require_once(dirname(__FILE__).'/login-external.php'); $fof_item_prefilters = array(); $fof_tag_prefilters = array(); diff --git a/login-external.php b/login-external.php deleted file mode 100644 index c5a4e15..0000000 --- a/login-external.php +++ /dev/null @@ -1,170 +0,0 @@ - 1)); - fof_cache_set("ga-key-$id", $key); - // Авторизуй меня, Большая Черепаха!!! - header("Location: ${url}ga_id=$id&ga_url=".urlencode($return).($require ? "" : "&ga_check=1")); - exit; - } - throw new Exception(__FUNCTION__.": error getting ${url}ga_id=$id&ga_key=$key: HTTP $r"); -} - -function fof_tag_subscribe($userid, $url, $tag) -{ - list($error, $feed) = fof_subscribe($userid, $url); - if ($feed) - fof_tag_feed($userid, $feed['feed_id'], $tag); -} - -/* Добавление фидов для новых юзеров */ -function fof_add_default_feeds_for_external($user) -{ - $fof_userid = $user['user_id']; - $login = $user['user_name']; - $primary = explode('@', $login, 2); - $primary = $primary[0]; - /* Активность по своим багам */ - fof_tag_subscribe($fof_userid, 'http://bugs.office.custis.ru/bugs/rss-comments.cgi?ctype=rss&namedcmd=My%20Bugs&fof_sudo='.$fof_userid, 'Me'); - /* Свои коммиты за сегодня */ - fof_tag_subscribe($fof_userid, 'http://viewvc.office.custis.ru/viewvc.py/?view=query&who='.urlencode(preg_quote($primary)).'&who_match=exact&querysort=date&date=week&limit_changes=100&fof_sudo=1', 'Me'); - /* IT_Crowd: Новости CustisWiki */ - fof_tag_subscribe($fof_userid, 'http://wiki.office.custis.ru/wiki/rss/Новости_CustisWiki.rss', 'IT_Crowd'); - /* IT_Crowd: Новости TechTools */ - fof_tag_subscribe($fof_userid, 'http://wiki.office.custis.ru/wiki/index.php?title=%D0%91%D0%BB%D0%BE%D0%B3:TechTools&feed=rss', 'IT_Crowd'); - /* IT_Crowd: Новости Cis-Forms */ - fof_tag_subscribe($fof_userid, 'http://wiki.office.custis.ru/wiki/rss/Новости_CustIS_Forms.rss', 'IT_Crowd'); - /* Fun: XKCD */ - fof_tag_subscribe($fof_userid, 'http://www.xkcd.ru/feeds/xkcd/', 'Fun'); - /* Fun: Dilbert */ - fof_tag_subscribe($fof_userid, 'http://dilbertru.blogspot.com/feeds/posts/default', 'Fun'); - /* CustIS: team.custis.ru - корпоративный блог */ - fof_tag_subscribe($fof_userid, 'http://team.custis.ru/feeds/posts/default?alt=rss', 'CustIS'); - /* Ещё, наверное, сюда добавится "Блог Медведева" :) */ - fof_tag_subscribe($fof_userid, 'http://wiki.office.custis.ru/wiki/index.php?title=%D0%91%D0%BB%D0%BE%D0%B3:%D0%92%D0%BE%D0%BB%D0%BE%D0%B4%D1%8F_%D0%A0%D0%B0%D1%85%D1%82%D0%B5%D0%B5%D0%BD%D0%BA%D0%BE&feed=rss', 'CustIS'); -}