1
0
Fork 0
Dieser Commit ist enthalten in:
o.pinke 2020-07-24 19:30:36 +02:00
Ursprung 0228432ac4
Commit dcc1f7f323
10 geänderte Dateien mit 520 neuen und 514 gelöschten Zeilen

Datei anzeigen

@ -15,6 +15,23 @@
<conlite minversion="2.1.0" />
</requirements>
<conlite>
<areas>
<area menuless="1">linkchecker</area>
<area parent="linkchecker" menuless="1">lc_whitelist</area>
</areas>
<actions>
<action area="linkchecker">linkchecker</action>
<action area="linkchecker">whitelist_view</action>
</actions>
<frames>
<frame area="linkchecker" filetype="main" name="cl-linkchecker/includes/include.linkchecker.php" frameId="4" />
<frame area="lc_whitelist" filetype="main" name="cl-linkchecker/includes/include.linkchecker_whitelist.php" frameId="4" />
</frames>
<nav_sub>
<nav area="linkchecker" level="0" navm="content">cl-linkchecker/xml/;navigation/content/linkchecker/main</nav>
<nav area="linkchecker" level="1" navm="0">cl-linkchecker/xml/;navigation/content/linkchecker/overview</nav>
<nav area="lc_whitelist" level="1" navm="0">cl-linkchecker/xml/;navigation/content/linkchecker/whitelist</nav>
</nav_sub>
</conlite>
</plugin>

Datei anzeigen

@ -33,7 +33,7 @@ if(!defined('CON_FRAMEWORK')) {
}
$plugin_name = "linkchecker";
$cfg['plugins']['linkchecker'] = $cfg['path']['conlite'] . "plugins/" . $plugin_name . "/";
$cfg['plugins']['linkchecker'] = $cfg['path']['conlite'] . "plugins/" . 'cl-'.$plugin_name . "/";
$cfg['tab']['whitelist'] = $cfg['sql']['sqlprefix'] . '_pi_linkchecker_whitelist';
// Templates

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -29,13 +30,11 @@
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
function cCatPerm($widcat, $db = null)
{
function cCatPerm($widcat, $db = null) {
global $cfg, $sess, $auth, $group_id, $_arrCatIDs_cCP;
if (strpos($auth->auth['perm'], 'admin') !== FALSE) {
@ -67,8 +66,7 @@ function cCatPerm($widcat, $db = null)
return array_key_exists($widcat, $_arrCatIDs_cCP);
}
function getGroupIDs(&$db)
{
function getGroupIDs(&$db) {
global $cfg, $sess, $auth, $group_id, $_arrGroupIDs_gGI;
if (is_array($_arrGroupIDs_gGI)) {

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Project:
* Contenido Content Management System
@ -33,7 +34,6 @@
* }}
*
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
@ -75,7 +75,6 @@ $aSearchIDInfosArt = array();
$aSearchIDInfosCatArt = array();
$aSearchIDInfosNonID = array();
$iWhitelist_timeout = 2592000; // 30 days
// Var initialization
$aUrl = array('cms' => $cfgClient[$client]['path']['htmlpath'], 'contenido' => $cfg['path']['contenido_fullhtml']);
@ -110,6 +109,7 @@ Program code
* ******** */
/* function linksort */
function linksort($sErrors) {
if ($_GET['sort'] == "nameart") {
@ -119,7 +119,6 @@ function linksort($sErrors) {
}
array_multisort($sErrors, SORT_ASC, SORT_STRING, $aNameart);
} elseif ($_GET['sort'] == "namecat") {
foreach ($sErrors as $key => $aRow) {
@ -127,7 +126,6 @@ function linksort($sErrors) {
}
array_multisort($sErrors, SORT_ASC, SORT_STRING, $aNamecat);
} elseif ($_GET['sort'] == "wronglink") {
foreach ($sErrors as $key => $aRow) {
@ -135,7 +133,6 @@ function linksort($sErrors) {
}
array_multisort($sErrors, SORT_ASC, SORT_STRING, $aWronglink);
} elseif ($_GET['sort'] == "error_type") {
foreach ($sErrors as $key => $aRow) {
@ -143,11 +140,9 @@ function linksort($sErrors) {
}
array_multisort($sErrors, SORT_ASC, SORT_STRING, $aError_type);
}
return $sErrors;
}
// function url_is_image
@ -164,7 +159,6 @@ function url_is_image($sUrl) {
} else {
return false;
}
}
// function url_is_uri
@ -178,7 +172,6 @@ function url_is_uri($sUrl) {
} else {
return false;
}
}
/* Check: Changes after last check? */
@ -210,7 +203,6 @@ $sCache_errors = $oCache->get($aCacheName['errors'], intval($_GET['mode']));
if ($sCache_errors && $_GET['live'] != 1) {
$aErrors = unserialize($sCache_errors);
} else { // If no cache exists
// Select all categorys
$sql = "SELECT idcat FROM " . $cfg['tab']['cat'] . " GROUP BY idcat";
$db->query($sql);
@ -218,17 +210,14 @@ if($sCache_errors && $_GET['live'] != 1) {
while ($db->next_record()) {
if ($cronjob != true) { // Check userrights, if no cronjob
$iCheck = cCatPerm($db->f("idcat"), $db2);
if ($iCheck == true) {
$aCats[] = Contenido_Security::toInteger($db->f("idcat"));
}
} else {
$aCats[] = Contenido_Security::toInteger($db->f("idcat"));
}
}
// Use SQL-WHERE if lang is not zero
@ -260,7 +249,6 @@ if(!empty($aCats)) {
if ($_GET['mode'] != 2) {
searchFrontContentLinks($value, $db->f("idart"), $db->f("title"), $db->f("idcat"), $db->f("namecat"));
}
}
// How many articles exists? [Redirects]
@ -280,7 +268,6 @@ if(!empty($aCats)) {
if ($_GET['mode'] != 2) {
searchFrontContentLinks($db->f("redirect_url"), $db->f("idart"), $db->f("title"), $db->f("idcat"), $db->f("namecat"));
}
}
// Check the links
@ -355,9 +342,7 @@ if(empty($aErrors) && $cronjob != true) {
} else {
$aError_output[$sKey] .= $tpl2->generate($cfg['templates']['linkchecker_test_errors_cat'], 1); // special template for idcats
}
}
}
/* Counter */
@ -391,7 +376,6 @@ if(empty($aErrors) && $cronjob != true) {
} else {
$tpl->set('s', 'ERRORS_COUNT_ERRORS_' . strtoupper($sKey), count($aErrors[$key]));
}
}
$tpl->generate($cfg['templates']['linkchecker_test']);
@ -403,7 +387,6 @@ if(empty($aErrors) && $cronjob != true) {
// Build new cache
$oCache->save(serialize($aErrors), $aCacheName['errors'], intval($_GET['mode']));
$oCache->save($iErrors_count_checked, $aCacheName['errorscount'], intval($_GET['mode']));
}
// Log

Datei anzeigen

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<head>
<title>Linkchecker</title>
<link rel="stylesheet" type="text/css" href="styles/contenido.css" />
@ -9,10 +9,16 @@
<table width="100%" style="border: 1px solid #B5B5B5;" cellspacing="0" cellpadding="3" border="0">
<tr class="text_medium" style="height:25px;">
<td style="background-color: #E2E2E2; colspan="3">
<a href="{INTERNS_HREF}" alt="{INTERNS_LABEL}" title="{INTERNS_LABEL}" style="margin-left:10px;">{INTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0"></a>
<a href="{EXTERNS_HREF}" alt="{EXTERNS_LABEL}" title="{EXTERNS_LABEL}" style="margin-left:15px;">{EXTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0"></a>
<a href="{INTERNS_EXTERNS_HREF}" alt="{INTERNS_EXTERNS_LABEL}" title="{INTERNS_EXTERNS_LABEL}" style="margin-left:15px;">{INTERNS_EXTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0"></a>
<td style="background-color: #E2E2E2;" colspan="3">
<a href="{INTERNS_HREF}" title="{INTERNS_LABEL}" style="margin-left:10px;">
{INTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0">
</a>
<a href="{EXTERNS_HREF}" title="{EXTERNS_LABEL}" style="margin-left:15px;">
{EXTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0">
</a>
<a href="{INTERNS_EXTERNS_HREF}" title="{INTERNS_EXTERNS_LABEL}" style="margin-left:15px;">
{INTERNS_EXTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0">
</a>
</td>
</tr>
</table>
@ -33,4 +39,5 @@
<td class="text_medium">{NO_ERRORS}</td>
</tr>
</table>
</body></html>
</body>
</html>

Datei anzeigen

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
@ -23,8 +24,7 @@
{
curTable.style.display = "none";
curButton.src = expandButton;
}
else if(curTable.style.display == "none")
} else if (curTable.style.display == "none")
{
curTable.style.display = "inline";
curButton.src = collapseButton;
@ -42,10 +42,16 @@
<table width="100%" style="border: 1px solid #B5B5B5;" cellspacing="0" cellpadding="3" border="0">
<tr class="text_medium" style="height:25px;line-height:25px;">
<td style="background-color: #E2E2E2; colspan="3">
<a href="{INTERNS_HREF}" alt="{INTERNS_LABEL}" title="{INTERNS_LABEL}" style="margin-left:10px;">{INTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0"></a>
<a href="{EXTERNS_HREF}" alt="{EXTERNS_LABEL}" title="{EXTERNS_LABEL}" style="margin-left:15px;">{EXTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0"></a>
<a href="{INTERNS_EXTERNS_HREF}" alt="{INTERNS_EXTERNS_LABEL}" title="{INTERNS_EXTERNS_LABEL}" style="margin-left:15px;">{INTERNS_EXTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0"></a>
<td style="background-color: #E2E2E2;" colspan="3">
<a href="{INTERNS_HREF}" title="{INTERNS_LABEL}" style="margin-left:10px;">
{INTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0">
</a>
<a href="{EXTERNS_HREF}" title="{EXTERNS_LABEL}" style="margin-left:15px;">
{EXTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0">
</a>
<a href="{INTERNS_EXTERNS_HREF}" title="{INTERNS_EXTERNS_LABEL}" style="margin-left:15px;">
{INTERNS_EXTERNS_LABEL}<img style="vertical-align:middle; margin-left:5px;" src="images/submit.gif" border="0">
</a>
</td>
</tr>
</table>
@ -71,11 +77,7 @@
<td style="background-color: #E2E2E2; border: 1px solid #B5B5B5; border-left: 0px; width: 70%;">{ERRORS_HELP_ERRORS}: <span style="color: #FF0000;">{ERRORS_COUNT_ERRORS} ({ERRORS_COUNT_ERRORS_PERCENT} %)</span></td>
</tr>
</table>
<div style="margin-top: 20px"></div>
<table width="100%" style="border-left: 1px solid #B5B5B5;" cellspacing="0" cellpadding="3" border="0">
<tr class="text_medium" style="background-color: #E2E2E2;">
<td nowrap="nowrap" valign="top" style="color: #666666; border: 1px solid #B5B5B5; border-left: 0px; white-space:nowrap; width: 20%;"><a style="color: #666666;" href="{URL}main.php?area=linkchecker&amp;frame=4&amp;contenido={SID}&action=linkchecker&mode={MODE}&sort=nameart">{ERRORS_HEADLINE_ARTICLE}</a> (ID)</td>
@ -85,11 +87,8 @@
<td nowrap="nowrap" valign="top" style="color: #666666; border: 1px solid #B5B5B5; border-left: 0px; white-space:nowrap; text-align: center; width: 10%;">{ERRORS_HEADLINE_WHITELIST}</td>
</tr>
</table>
<div style="margin-top: 10px"></div>
<!-- ######################### -->
<!-- ### Links to Articles ### -->
<!-- ######################### -->
@ -199,4 +198,5 @@
<!-- Print Button -->
<a style="margin-left:3px;" href="javascript:print()"><img src="{URL}images/print.gif" alt="" border="0"></a>
</body></html>
</body>
</html>

Datei anzeigen

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>