// Delete not validated users
$db->query('
DELETE FROM users
WHERE (
user_date < DATE_SUB(NOW(), INTERVAL 12 HOUR)
AND user_date > DATE_SUB(NOW(), INTERVAL 24 HOUR)
AND user_validated_date IS NULL
);
');
echo "STARTING delete old bad linksn";
// Delete old bad links
$ids = $db->get_col('
SELECT link_id
FROM links
WHERE (
link_status = "discard"
AND link_content_type != "article"
AND link_date > DATE_SUB(NOW(), INTERVAL 24 HOUR)
AND link_date < DATE_SUB(NOW(), INTERVAL '.intval($globals['draft_time'] / 60).' MINUTE)
AND link_votes = 0
);
');
if ($ids) {
$ids_str = implode(',', $ids);
echo "Deleting $ids_strn";
$db->query('
DELETE FROM `links`
WHERE `link_id` IN ('.$ids_str.');
');
}
$sites = SitesMgr::get_active_sites();
foreach ($sites as $site) {
echo "START SITE: $siten";
SitesMgr::__init($site);
$site_info = SitesMgr::get_info($site_id);
// Only depublish in main subs
if ($site_info->owner == 0) {
depublish($site);
}
// Only discard in the subs
if ($site_info->sub) {
discard($site);
}
}
punish_comments();
// END
function discard($site_id)
{
global $db, $globals, $max_date, $min_date;
echo "STARTING discard for $site_idn";
$site_info = SitesMgr::get_info($site_id);
// Discard links
// $negatives = $db->get_col("select SQL_NO_CACHE link_id from links, sub_statuses WHERE id = $site_id and date > $min_date and status = 'queued' and link_id = link and link_karma < 0 and (link_date < $max_date or link_karma < -100) and (link_karma… » ver todo el comentario
<?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
include '../config.php';
include 'utils.php';
include mnminclude.'external_post.php';
$now = time();
$max_date = 'DATE_SUB(NOW(), INTERVAL 15 MINUTE)';
$min_date = 'DATE_SUB(NOW(), INTERVAL 24 HOUR)';
echo "STARTING delete non validated usersn";
// Delete not validated users
$db->query('
DELETE FROM users
WHERE (
user_date < DATE_SUB(NOW(), INTERVAL 12 HOUR)
AND user_date > DATE_SUB(NOW(), INTERVAL 24 HOUR)
AND user_validated_date IS NULL
);
');
echo "STARTING delete old bad linksn";
// Delete old bad links
$ids = $db->get_col('
SELECT link_id
FROM links
WHERE (
link_status = "discard"
AND link_content_type != "article"
AND link_date > DATE_SUB(NOW(), INTERVAL 24 HOUR)
AND link_date < DATE_SUB(NOW(), INTERVAL '.intval($globals['draft_time'] / 60).' MINUTE)
AND link_votes = 0
);
');
if ($ids) {
$ids_str = implode(',', $ids);
echo "Deleting $ids_strn";
$db->query('
DELETE FROM `links`
WHERE `link_id` IN ('.$ids_str.');
');
}
$sites = SitesMgr::get_active_sites();
foreach ($sites as $site) {
echo "START SITE: $siten";
SitesMgr::__init($site);
$site_info = SitesMgr::get_info($site_id);
// Only depublish in main subs
if ($site_info->owner == 0) {
depublish($site);
}
// Only discard in the subs
if ($site_info->sub) {
discard($site);
}
}
punish_comments();
// END
function discard($site_id)
{
global $db, $globals, $max_date, $min_date;
echo "STARTING discard for $site_idn";
$site_info = SitesMgr::get_info($site_id);
// Discard links
// $negatives = $db->get_col("select SQL_NO_CACHE link_id from links, sub_statuses WHERE id = $site_id and date > $min_date and status = 'queued' and link_id = link and link_karma < 0 and (link_date < $max_date or link_karma < -100) and (link_karma… » ver todo el comentario