<?php /****************************************************************************** * SiteBar 3 - The Bookmark Server for Personal and Team Use. * * Copyright (C) 2003-2008 Ondrej Brablc <http://brablc.com/mailto?o> * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU Affero General Public License as published * * by the Free Software Foundation, either version 3 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Affero General Public License for more details. * * * * You should have received a copy of the GNU Affero General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ require_once './inc/validator.inc.php'; $validator = new SB_Validator(); $validator->validate($_GET['id'], isset($_GET['get_favicon']));
function buildValidation() { $fields = array(); $node = $this->tree->getNode(SB_reqValInt('nid_acl', true)); if (!$node) { return null; } require_once './inc/validator.inc.php'; $validator = new SB_Validator(); $this->tree->loadLinkFilter = ''; if (SB_reqVal('ignore_recently')) { $this->tree->loadLinkFilter = 'UNIX_TIMESTAMP(tested) < ' . (mktime() - SB_reqVal('recent_time')); if (SB_reqVal('ignore_https')) { $this->tree->loadLinkFilter .= ' AND '; } } if (SB_reqVal('ignore_https')) { $this->tree->loadLinkFilter .= "url NOT LIKE 'https://%'"; } if (SB_reqVal('subfolders')) { $this->tree->loadNodes($node); } else { $this->tree->loadLinks($node); } $validator->buildValidate($node, $fields, SB_reqVal('discover_favicons'), SB_reqVal('delete_favicons')); if (!$validator->linkCount) { if (SB_reqVal('ignore_recently')) { $this->warn('All links recently validated!'); } else { $this->warn('No links in the folder!'); } } return $fields; }