Permalink
Browse files

Use {{inscription nécessaire}} for paywall sites

Summary:
Some news sites now play the paywall game.
We identify them with an ad hoc template.

Ref T1049.

Test Plan: Tested with Libération

Reviewers: dereckson

Maniphest Tasks: T1049

Differential Revision: https://devcentral.nasqueron.org/D727
  • Loading branch information...
dereckson committed Nov 16, 2016
1 parent c200de5 commit 62fa1663b58239b76e68de8d753484316de3ddee
Showing with 12 additions and 0 deletions.
  1. +5 −0 page.php
  2. +7 −0 templates/wikipedia-fr/Lien_web.php
View
@@ -93,6 +93,11 @@ class Page {
*/
public $antiAdBlocker = false;
/**
* @var bool If true, this site is behind a paywall
*/
public $paywall = false;
/**
* @var mixed If not null, contains an array for another service to use
*/
@@ -12,6 +12,8 @@ class LienWebTemplate extends Template {
public $site;
public $pageDate = null;
public $accessdate;
public $antiAdBlocker;
public $paywall;
/**
* @var bool Indicates if we've to remove jour/mois/année parameters
@@ -49,6 +51,7 @@ static function loadFromPage ($page) {
$template->skipYMD = $page->skipYMD;
$template->skipMD = $page->skipMD;
$template->antiAdBlocker = $page->antiAdBlocker;
$template->paywall = $page->paywall;
return $template;
}
@@ -106,6 +109,10 @@ function __toString () {
$template .= " {{Publicité forcée}}";
}
if ($this->paywall) {
$template .= " {{inscription nécessaire}}";
}
return $template;
}
}

0 comments on commit 62fa166

Please sign in to comment.