replaced out calls to dbglog with new Logger calls
This commit is contained in:
parent
c205039322
commit
31667ec678
|
@ -9,6 +9,7 @@
|
|||
namespace dokuwiki\Sitemap;
|
||||
|
||||
use dokuwiki\HTTP\DokuHTTPClient;
|
||||
use dokuwiki\Logger;
|
||||
|
||||
/**
|
||||
* A class for building sitemaps and pinging search engines with the sitemap URL.
|
||||
|
@ -43,14 +44,14 @@ class Mapper {
|
|||
|
||||
if(@filesize($sitemap) &&
|
||||
@filemtime($sitemap) > (time()-($conf['sitemap']*86400))){ // 60*60*24=86400
|
||||
dbglog('Sitemapper::generate(): Sitemap up to date');
|
||||
Logger::debug('Sitemapper::generate(): Sitemap up to date');
|
||||
return false;
|
||||
}
|
||||
|
||||
dbglog("Sitemapper::generate(): using $sitemap");
|
||||
Logger::debug("Sitemapper::generate(): using $sitemap");
|
||||
|
||||
$pages = idx_get_indexer()->getPages();
|
||||
dbglog('Sitemapper::generate(): creating sitemap using '.count($pages).' pages');
|
||||
Logger::debug('Sitemapper::generate(): creating sitemap using '.count($pages).' pages');
|
||||
$items = array();
|
||||
|
||||
// build the sitemap items
|
||||
|
@ -150,10 +151,11 @@ class Mapper {
|
|||
$event = new \dokuwiki\Extension\Event('SITEMAP_PING', $data);
|
||||
if ($event->advise_before(true)) {
|
||||
foreach ($data['ping_urls'] as $name => $url) {
|
||||
dbglog("Sitemapper::PingSearchEngines(): pinging $name");
|
||||
Logger::debug("Sitemapper::PingSearchEngines(): pinging $name");
|
||||
$resp = $http->get($url);
|
||||
if($http->error) dbglog("Sitemapper:pingSearchengines(): $http->error");
|
||||
dbglog('Sitemapper:pingSearchengines(): '.preg_replace('/[\n\r]/',' ',strip_tags($resp)));
|
||||
if($http->error) {
|
||||
Logger::debug("Sitemapper:pingSearchengines(): $http->error", $resp);
|
||||
}
|
||||
}
|
||||
}
|
||||
$event->advise_after();
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
use dokuwiki\HTTP\DokuHTTPClient;
|
||||
use dokuwiki\Logger;
|
||||
|
||||
if(!defined('DOKU_MESSAGEURL')){
|
||||
if(in_array('ssl', stream_get_transports())) {
|
||||
|
@ -35,7 +36,7 @@ function checkUpdateMessages(){
|
|||
// check if new messages needs to be fetched
|
||||
if($lm < time()-(60*60*24) || $lm < @filemtime(DOKU_INC.DOKU_SCRIPT)){
|
||||
@touch($cf);
|
||||
dbglog("checkUpdateMessages(): downloading messages to ".$cf.($is_http?' (without SSL)':' (with SSL)'));
|
||||
Logger::debug("checkUpdateMessages(): downloading messages to ".$cf.($is_http?' (without SSL)':' (with SSL)'));
|
||||
$http = new DokuHTTPClient();
|
||||
$http->timeout = 12;
|
||||
$resp = $http->get(DOKU_MESSAGEURL.$updateVersion);
|
||||
|
@ -44,10 +45,10 @@ function checkUpdateMessages(){
|
|||
// or it looks like one of our messages, not WiFi login or other interposed response
|
||||
io_saveFile($cf,$resp);
|
||||
} else {
|
||||
dbglog("checkUpdateMessages(): unexpected HTTP response received");
|
||||
Logger::debug("checkUpdateMessages(): unexpected HTTP response received", $http->error);
|
||||
}
|
||||
}else{
|
||||
dbglog("checkUpdateMessages(): messages up to date");
|
||||
Logger::debug("checkUpdateMessages(): messages up to date");
|
||||
}
|
||||
|
||||
$data = io_readFile($cf);
|
||||
|
@ -445,7 +446,7 @@ function dbglog($msg,$header=''){
|
|||
$msg = '';
|
||||
}
|
||||
|
||||
\dokuwiki\Logger::getInstance(\dokuwiki\Logger::LOG_DEBUG)->log(
|
||||
Logger::getInstance(Logger::LOG_DEBUG)->log(
|
||||
$header, $msg
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use dokuwiki\Logger;
|
||||
|
||||
/**
|
||||
* Active Directory authentication backend for DokuWiki
|
||||
*
|
||||
|
@ -383,7 +385,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin
|
|||
{
|
||||
$adldap = $this->initAdLdap(null);
|
||||
if (!$adldap) {
|
||||
dbglog("authad/auth.php getUserCount(): _adldap not set.");
|
||||
Logger::debug("authad/auth.php getUserCount(): _adldap not set.");
|
||||
return -1;
|
||||
}
|
||||
if ($filter == array()) {
|
||||
|
|
Loading…
Reference in New Issue