X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=trackback.php;h=6d2d826b9b396c5408e580526c96acedf4f32972;hb=1b11dc68d0c98eb72cdd0f60728fbb3f3397911d;hp=726cacba413a6ae115c02525403271c87bef2cf1;hpb=bc36d810e796739c2bc5e8fec70a5c5bf530b21e;p=lhc%2Fweb%2Fwiklou.git diff --git a/trackback.php b/trackback.php index 726cacba41..6d2d826b9b 100644 --- a/trackback.php +++ b/trackback.php @@ -4,18 +4,8 @@ * @package MediaWiki * @subpackage SpecialPage */ +require_once( './includes/WebStart.php' ); -unset($IP); -define('MEDIAWIKI', true); -require_once('./includes/Defines.php'); - -if (!file_exists('LocalSettings.php')) - exit; - -require_once('./LocalSettings.php'); -require_once('includes/Setup.php'); - -require_once('Title.php'); require_once('DatabaseFunctions.php'); /** @@ -60,16 +50,17 @@ $tbname = $_POST['blog_name']; $tbarticle = $_REQUEST['article']; $title = Title::newFromText($tbarticle); -if (!$title->exists()) +if (!isset($title) || !$title->exists()) XMLerror("Specified article does not exist."); $dbw->insert('trackbacks', array( - 'tb_id' => $title->getArticleID(), - 'tb_title' => $tbtitle, - 'tb_url' => $tburl, - 'tb_ex' => $tbex, - 'tb_name' => $tbname + 'tb_page' => $title->getArticleID(), + 'tb_title' => $tbtitle, + 'tb_url' => $tburl, + 'tb_ex' => $tbex, + 'tb_name' => $tbname )); XMLsuccess(); exit; +?>