<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
if (LinkValidator::checkBlockedWordsInContent($comment)){
API_Meneame::sendResponse(500, 'error', 'Tu comentario no será publicado porque contiene palabras no permitidas.');
} else if (true === LinkValidator::checkBlockedDomainsInContent($comment)) {
API_Meneame::sendResponse(500, 'error', 'El servidor tiene aplicado un BAN.');
} else {
$query_var = array( 'key' => $security_key,
'process' => $process,
'randkey' =>… » ver todo el comentario
"Mark Ritson: Gillette’s new ad will trash its sales and be the year’s worst marketing move"
"Rather than a work of inspiration and aspiration she delivers a short film that feels vindictive and accusatory. We are not being shown the better path, we are being told we are all on the wrong one and must change course immediately. Men are to blame. You, yes you. It’s a poor way to sell razors. Hell, it’s a poor way to sell anything. "
#58 No estoy de acuerdo. Tu campaña puede ser negativa en el mismo momento en que tus potenciales compradores no compren porque no les guste los valores que has tratado de vender.
Hay campañas que sí son contraproducentes. No solo conviene que hablen de ti. Conviene que hablen bien de ti.
<?php
// The source code packaged with this file is Free Software, Copyright (C) 2005 by
// Ricardo Galli <gallir at uib dot es>.
// It's licensed under the AFFERO GENERAL PUBLIC LICENSE unless stated otherwise.
// You can get copies of the licenses here:
// www.affero.org/oagpl.html
// AFFERO GENERAL PUBLIC LICENSE is also included in the file called "COPYING".
use SnipeBanBuilderCensorWords;
require_once mnminclude . 'favorites.php';
require_once mnminclude . 'mail.php';
class LinkValidator
{
/**
* @var Link
*/
public $link;
public $user;
public $user_id;
public $errorCallback;
public $warningCallback;
public $error;
public $warning;
public $userDrafts;
public $userVotes;
public $userLinks;
public $userSent;
public $userSentRecent;
public $linksQueded;
public function __construct(Link $link)
{
global $current_user;
$this->link = $link;
$this->user = $current_user;
$this->user_id = $current_user->user_id;
}
public function fixUrl()
{
$this->link->url = preg_replace('/#.*$/', '', clean_input_url(urldecode($this->link->url)));
if (!preg_match('#^http(s)?://#', $this->link->url)) {
$this->link->url = 'http://' . $this->link->url;
}
$this->fixUrlAmp();
return $this;
}
public function fixUrlAmp()
{
$url = parse_url($this->link->url);
if (!strstr($url['host'], '.cdn.ampproject.org')) {
return;
}
$path = preg_replace('#^/([a-z]/)+#', '', $url['path']);
$path = preg_replace('#^(amp|m).#', 'www.', $path);
$path = preg_replace('#/amp$#', '', $path);
$path = str_replace(['.amp.', '/amp/'], ['.', '/'], $path);
$this->link->url = 'http://' . $path;
}
public function checkUrl()
{
$host = parse_url($this->link->url, PHP_URL_HOST);
if (empty($host) || (gethostbyname($host) === $host)) {
$this->setError(_('La URL enviada… » ver todo el comentario