Fix external autologin (unused on yourcmc)
parent
ae5b7c6030
commit
5a19d20c55
|
@ -786,7 +786,8 @@ function fof_update_user($user)
|
|||
function fof_db_delete_user($username)
|
||||
{
|
||||
global $FOF_USER_TABLE, $FOF_ITEM_TAG_TABLE, $FOF_SUBSCRIPTION_TABLE;
|
||||
$user_id = fof_db_get_user_id($username);
|
||||
$user = fof_db_get_user($username);
|
||||
$user_id = $user['user_id'];
|
||||
|
||||
fof_safe_query("delete from $FOF_SUBSCRIPTION_TABLE where user_id = %d", $user_id);
|
||||
fof_safe_query("delete from $FOF_ITEM_TAG_TABLE where user_id = %d", $user_id);
|
||||
|
|
18
fof-main.php
18
fof-main.php
|
@ -20,12 +20,16 @@ if ( !file_exists( dirname(__FILE__) . '/fof-config.php') )
|
|||
die();
|
||||
}
|
||||
|
||||
require_once("fof-config.php");
|
||||
require_once("fof-db.php");
|
||||
require_once("classes/fof-prefs.php");
|
||||
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();
|
||||
|
||||
fof_db_connect();
|
||||
|
||||
if(!$fof_installer)
|
||||
|
@ -46,8 +50,6 @@ if(!$fof_installer)
|
|||
ob_end_clean();
|
||||
}
|
||||
|
||||
require_once('simplepie/simplepie.php');
|
||||
|
||||
function fof_set_content_type()
|
||||
{
|
||||
static $set;
|
||||
|
@ -862,10 +864,8 @@ function fof_update_feed($id, $as_user = NULL)
|
|||
$n++;
|
||||
|
||||
global $fof_item_prefilters;
|
||||
foreach($fof_item_prefilters as $filter)
|
||||
{
|
||||
foreach ($fof_item_prefilters as $filter)
|
||||
list($link, $title, $content) = $filter($item, $link, $title, $content);
|
||||
}
|
||||
|
||||
$id = fof_db_add_item($feed_id, array(
|
||||
'item_guid' => $item_id,
|
||||
|
@ -997,7 +997,7 @@ function fof_init_plugins()
|
|||
$fof_plugin_prefs = array();
|
||||
$fof_tag_prefilters = array();
|
||||
|
||||
$p =& FoF_Prefs::instance();
|
||||
$p = FoF_Prefs::instance();
|
||||
|
||||
$dirlist = opendir(FOF_DIR . "/plugins");
|
||||
while ($file = readdir($dirlist))
|
||||
|
|
|
@ -17,4 +17,3 @@ include("header.php");
|
|||
include("items.php");
|
||||
|
||||
include("footer.php");
|
||||
?>
|
||||
|
|
|
@ -145,12 +145,12 @@ function fof_tag_subscribe($userid, $url, $tag)
|
|||
/* Добавление фидов для новых юзеров */
|
||||
function fof_add_default_feeds_for_external($user)
|
||||
{
|
||||
$fof_userid = $user['id'];
|
||||
$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=1', 'Me');
|
||||
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 */
|
||||
|
|
|
@ -4,19 +4,17 @@
|
|||
*
|
||||
* login.php - username / password entry
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2004-2007 Stephen Minutillo
|
||||
* steve@minutillo.com - http://minutillo.com/steve/
|
||||
*
|
||||
* Distributed under the GPL - see LICENSE
|
||||
*
|
||||
*/
|
||||
|
||||
ob_start();
|
||||
|
||||
$fof_no_login = true;
|
||||
|
||||
include_once("fof-main.php");
|
||||
require_once("fof-main.php");
|
||||
|
||||
fof_set_content_type();
|
||||
|
||||
|
|
Loading…
Reference in New Issue