diff options
48 files changed, 197 insertions, 172 deletions
diff --git a/_test/core/DokuWikiTest.php b/_test/core/DokuWikiTest.php index f4521256a..4e40d510a 100644 --- a/_test/core/DokuWikiTest.php +++ b/_test/core/DokuWikiTest.php @@ -54,7 +54,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { foreach (array('default','local','protected') as $config_group) { if (empty($config_cascade['main'][$config_group])) continue; foreach ($config_cascade['main'][$config_group] as $config_file) { - if (@file_exists($config_file)) { + if (file_exists($config_file)) { include($config_file); } } @@ -68,7 +68,7 @@ abstract class DokuWikiTest extends PHPUnit_Framework_TestCase { foreach (array('default','local') as $config_group) { if (empty($config_cascade['license'][$config_group])) continue; foreach ($config_cascade['license'][$config_group] as $config_file) { - if(@file_exists($config_file)){ + if(file_exists($config_file)){ include($config_file); } } @@ -218,7 +218,7 @@ function rss_buildItems(&$rss, &$data, $opt) { $date = $ditem['date']; } elseif ($ditem['media']) { $date = @filemtime(mediaFN($id)); - } elseif (@file_exists(wikiFN($id))) { + } elseif (file_exists(wikiFN($id))) { $date = @filemtime(wikiFN($id)); } elseif($meta['date']['modified']) { $date = $meta['date']['modified']; diff --git a/inc/JpegMeta.php b/inc/JpegMeta.php index d50bad9b7..4cdebcc36 100644 --- a/inc/JpegMeta.php +++ b/inc/JpegMeta.php @@ -936,7 +936,7 @@ class JpegMeta { if ($fileName == "") { $tmpName = tempnam(dirname($this->_fileName),'_metatemp_'); $this->_writeJPEG($tmpName); - if (@file_exists($tmpName)) { + if (file_exists($tmpName)) { return io_rename($tmpName, $this->_fileName); } } else { diff --git a/inc/Sitemapper.php b/inc/Sitemapper.php index 0325f6d44..037990e96 100644 --- a/inc/Sitemapper.php +++ b/inc/Sitemapper.php @@ -33,7 +33,7 @@ class Sitemapper { $sitemap = Sitemapper::getFilePath(); - if(@file_exists($sitemap)){ + if(file_exists($sitemap)){ if(!is_writable($sitemap)) return false; }else{ if(!is_writable(dirname($sitemap))) return false; diff --git a/inc/auth.php b/inc/auth.php index d51534e67..17923ba2a 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -1189,7 +1189,7 @@ function act_resendpwd() { // we're in token phase - get user info from token $tfile = $conf['cachedir'].'/'.$token{0}.'/'.$token.'.pwauth'; - if(!@file_exists($tfile)) { + if(!file_exists($tfile)) { msg($lang['resendpwdbadauth'], -1); $INPUT->remove('pwauth'); return false; diff --git a/inc/cache.php b/inc/cache.php index edf394134..68f64eaa2 100644 --- a/inc/cache.php +++ b/inc/cache.php @@ -203,7 +203,7 @@ class cache_parser extends cache { */ public function _useCache() { - if (!@file_exists($this->file)) return false; // source exists? + if (!file_exists($this->file)) return false; // source exists? return parent::_useCache(); } diff --git a/inc/changelog.php b/inc/changelog.php index c2d3cb489..d1ef7973e 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -351,7 +351,7 @@ function _handleRecent($line,$ns,$flags,&$seen){ // check existance if($flags & RECENTS_SKIP_DELETED){ $fn = (($flags & RECENTS_MEDIA_CHANGES) ? mediaFN($recent['id']) : wikiFN($recent['id'])); - if(!@file_exists($fn)) return false; + if(!file_exists($fn)) return false; } return $recent; @@ -498,14 +498,14 @@ abstract class ChangeLog { if($first < 0) { $first = 0; - } else if(@file_exists($this->getFilename())) { + } else if(file_exists($this->getFilename())) { // skip current revision if the page exists $first = max($first + 1, 0); } $file = $this->getChangelogFilename(); - if(!@file_exists($file)) { + if(!file_exists($file)) { return $revs; } if(filesize($file) < $this->chunk_size || $this->chunk_size == 0) { @@ -735,7 +735,7 @@ abstract class ChangeLog { protected function readloglines($rev) { $file = $this->getChangelogFilename(); - if(!@file_exists($file)) { + if(!file_exists($file)) { return false; } diff --git a/inc/common.php b/inc/common.php index 2c9359a0c..5a8b5c900 100644 --- a/inc/common.php +++ b/inc/common.php @@ -188,7 +188,7 @@ function pageinfo() { $info['locked'] = checklock($ID); $info['filepath'] = fullpath(wikiFN($ID)); - $info['exists'] = @file_exists($info['filepath']); + $info['exists'] = file_exists($info['filepath']); $info['currentrev'] = @filemtime($info['filepath']); if($REV) { //check if current revision was meant @@ -202,7 +202,7 @@ function pageinfo() { } else { //really use old revision $info['filepath'] = fullpath(wikiFN($ID, $REV)); - $info['exists'] = @file_exists($info['filepath']); + $info['exists'] = file_exists($info['filepath']); } } $info['rev'] = $REV; @@ -256,7 +256,7 @@ function pageinfo() { // draft $draft = getCacheName($info['client'].$ID, '.draft'); - if(@file_exists($draft)) { + if(file_exists($draft)) { if(@filemtime($draft) < @filemtime(wikiFN($ID))) { // remove stale draft @unlink($draft); @@ -352,7 +352,7 @@ function breadcrumbs() { $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array(); //we only save on show and existing wiki documents $file = wikiFN($ID); - if($ACT != 'show' || !@file_exists($file)) { + if($ACT != 'show' || !file_exists($file)) { $_SESSION[DOKU_COOKIE]['bc'] = $crumbs; return $crumbs; } @@ -853,7 +853,7 @@ function checklock($id) { $lock = wikiLockFN($id); //no lockfile - if(!@file_exists($lock)) return false; + if(!file_exists($lock)) return false; //lockfile expired if((time() - filemtime($lock)) > $conf['locktime']) { @@ -907,7 +907,7 @@ function unlock($id) { global $INPUT; $lock = wikiLockFN($id); - if(@file_exists($lock)) { + if(file_exists($lock)) { @list($ip, $session) = explode("\n", io_readFile($lock)); if($ip == $INPUT->server->str('REMOTE_USER') || $ip == clientIP() || $session == session_id()) { @unlink($lock); @@ -1010,13 +1010,13 @@ function pageTemplate($id) { // if the before event did not set a template file, try to find one if(empty($data['tplfile'])) { $path = dirname(wikiFN($id)); - if(@file_exists($path.'/_template.txt')) { + if(file_exists($path.'/_template.txt')) { $data['tplfile'] = $path.'/_template.txt'; } else { // search upper namespaces for templates $len = strlen(rtrim($conf['datadir'], '/')); while(strlen($path) >= $len) { - if(@file_exists($path.'/__template.txt')) { + if(file_exists($path.'/__template.txt')) { $data['tplfile'] = $path.'/__template.txt'; break; } @@ -1197,13 +1197,13 @@ function saveWikiText($id, $text, $summary, $minor = false) { $file = wikiFN($id); $old = @filemtime($file); // from page $wasRemoved = (trim($text) == ''); // check for empty or whitespace only - $wasCreated = !@file_exists($file); + $wasCreated = !file_exists($file); $wasReverted = ($REV == true); $pagelog = new PageChangeLog($id, 1024); $newRev = false; $oldRev = $pagelog->getRevisions(-1, 1); // from changelog $oldRev = (int) (empty($oldRev) ? 0 : $oldRev[0]); - if(!@file_exists(wikiFN($id, $old)) && @file_exists($file) && $old >= $oldRev) { + if(!file_exists(wikiFN($id, $old)) && file_exists($file) && $old >= $oldRev) { // add old revision to the attic if missing saveOldRevision($id); // add a changelog entry if this edit came from outside dokuwiki @@ -1285,7 +1285,7 @@ function saveWikiText($id, $text, $summary, $minor = false) { */ function saveOldRevision($id) { $oldf = wikiFN($id); - if(!@file_exists($oldf)) return ''; + if(!file_exists($oldf)) return ''; $date = filemtime($oldf); $newf = wikiFN($id, $date); io_writeWikiPage($newf, rawWiki($id), $id, $date); @@ -1743,7 +1743,7 @@ function license_img($type) { $try[] = 'lib/images/license/'.$type.'/cc.png'; } foreach($try as $src) { - if(@file_exists(DOKU_INC.$src)) return $src; + if(file_exists(DOKU_INC.$src)) return $src; } return ''; } @@ -1807,17 +1807,6 @@ function send_redirect($url) { // always close the session session_write_close(); - // work around IE bug - // http://www.ianhoar.com/2008/11/16/internet-explorer-6-and-redirected-anchor-links/ - @list($url, $hash) = explode('#', $url); - if($hash) { - if(strpos($url, '?')) { - $url = $url.'&#'.$hash; - } else { - $url = $url.'?&#'.$hash; - } - } - // check if running on IIS < 6 with CGI-PHP if($INPUT->server->has('SERVER_SOFTWARE') && $INPUT->server->has('GATEWAY_INTERFACE') && (strpos($INPUT->server->str('GATEWAY_INTERFACE'), 'CGI') !== false) && diff --git a/inc/confutils.php b/inc/confutils.php index 85bf5128c..8643a056c 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -206,7 +206,7 @@ function retrieveConfig($type,$fn,$params=null) { foreach (array('default','local','protected') as $config_group) { if (empty($config_cascade[$type][$config_group])) continue; foreach ($config_cascade[$type][$config_group] as $file) { - if (@file_exists($file)) { + if (file_exists($file)) { $config = call_user_func_array($fn,array_merge(array($file),$params)); $combined = array_merge($combined, $config); } diff --git a/inc/fetch.functions.php b/inc/fetch.functions.php index 3c5bdfeee..c99fbf20a 100644 --- a/inc/fetch.functions.php +++ b/inc/fetch.functions.php @@ -163,7 +163,7 @@ function checkFileStatus(&$media, &$file, $rev = '', $width=0, $height=0) { } //check file existance - if(!@file_exists($file)) { + if(!file_exists($file)) { return array(404, 'Not Found'); } diff --git a/inc/html.php b/inc/html.php index 87affd47b..3a93a6604 100644 --- a/inc/html.php +++ b/inc/html.php @@ -501,7 +501,7 @@ function html_revisions($first=0, $media_id = false){ $form->addElement(form_makeOpenTag('ul')); if (!$media_id) $exists = $INFO['exists']; - else $exists = @file_exists(mediaFN($id)); + else $exists = file_exists(mediaFN($id)); $display_name = (!$media_id && useHeading('navigation')) ? hsc(p_get_first_heading($id)) : $id; if (!$display_name) $display_name = $id; @@ -568,7 +568,7 @@ function html_revisions($first=0, $media_id = false){ $date = dformat($rev); $info = $changelog->getRevisionInfo($rev); if($media_id) { - $exists = @file_exists(mediaFN($id, $rev)); + $exists = file_exists(mediaFN($id, $rev)); } else { $exists = page_exists($id, $rev); } @@ -765,7 +765,7 @@ function html_recent($first=0, $show_changes='both'){ $href = ''; if (!empty($recent['media'])) { - $diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && @file_exists(mediaFN($recent['id']))); + $diff = (count(getRevisions($recent['id'], 0, 1, 8192, true)) && file_exists(mediaFN($recent['id']))); if ($diff) { $href = media_managerURL(array('tab_details' => 'history', 'mediado' => 'diff', 'image' => $recent['id'], 'ns' => getNS($recent['id'])), '&'); diff --git a/inc/indexer.php b/inc/indexer.php index 014c5c5eb..a86bfc656 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -1076,7 +1076,7 @@ class Doku_Indexer { protected function getIndex($idx, $suffix) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; - if (!@file_exists($fn)) return array(); + if (!file_exists($fn)) return array(); return file($fn, FILE_IGNORE_NEW_LINES); } @@ -1118,7 +1118,7 @@ class Doku_Indexer { protected function getIndexKey($idx, $suffix, $id) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; - if (!@file_exists($fn)) return ''; + if (!file_exists($fn)) return ''; $fh = @fopen($fn, 'r'); if (!$fh) return ''; $ln = -1; @@ -1228,7 +1228,7 @@ class Doku_Indexer { // testing if index files exist only $path = $conf['indexdir']."/i"; foreach ($filter as $key => $value) { - if (@file_exists($path.$key.'.idx')) + if (file_exists($path.$key.'.idx')) $idx[] = $key; } } else { @@ -1339,7 +1339,7 @@ function & idx_get_stopwords() { if (is_null($stopwords)) { global $conf; $swfile = DOKU_INC.'inc/lang/'.$conf['lang'].'/stopwords.txt'; - if(@file_exists($swfile)){ + if(file_exists($swfile)){ $stopwords = file($swfile, FILE_IGNORE_NEW_LINES); }else{ $stopwords = array(); @@ -1364,7 +1364,7 @@ function idx_addPage($page, $verbose=false, $force=false) { $idxtag = metaFN($page,'.indexed'); // check if page was deleted but is still in the index if (!page_exists($page)) { - if (!@file_exists($idxtag)) { + if (!file_exists($idxtag)) { if ($verbose) print("Indexer: $page does not exist, ignoring".DOKU_LF); return false; } @@ -1379,7 +1379,7 @@ function idx_addPage($page, $verbose=false, $force=false) { } // check if indexing needed - if(!$force && @file_exists($idxtag)){ + if(!$force && file_exists($idxtag)){ if(trim(io_readFile($idxtag)) == idx_get_version()){ $last = @filemtime($idxtag); if($last > @filemtime(wikiFN($page))){ @@ -1392,7 +1392,7 @@ function idx_addPage($page, $verbose=false, $force=false) { $indexenabled = p_get_metadata($page, 'internal index', METADATA_RENDER_UNLIMITED); if ($indexenabled === false) { $result = false; - if (@file_exists($idxtag)) { + if (file_exists($idxtag)) { $Indexer = idx_get_indexer(); $result = $Indexer->deletePage($page); if ($result === "locked") { @@ -1494,7 +1494,7 @@ function idx_tokenizer($string, $wc=false) { function idx_getIndex($idx, $suffix) { global $conf; $fn = $conf['indexdir'].'/'.$idx.$suffix.'.idx'; - if (!@file_exists($fn)) return array(); + if (!file_exists($fn)) return array(); return file($fn); } @@ -1515,7 +1515,7 @@ function idx_listIndexLengths() { $docache = false; } else { clearstatcache(); - if (@file_exists($conf['indexdir'].'/lengths.idx') + if (file_exists($conf['indexdir'].'/lengths.idx') && (time() < @filemtime($conf['indexdir'].'/lengths.idx') + $conf['readdircache'])) { if (($lengths = @file($conf['indexdir'].'/lengths.idx', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)) !== false) { $idx = array(); @@ -1572,7 +1572,7 @@ function idx_indexLengths($filter) { // testing if index files exist only $path = $conf['indexdir']."/i"; foreach ($filter as $key => $value) { - if (@file_exists($path.$key.'.idx')) + if (file_exists($path.$key.'.idx')) $idx[] = $key; } } else { diff --git a/inc/infoutils.php b/inc/infoutils.php index 399963176..fe312d13f 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -58,7 +58,7 @@ function checkUpdateMessages(){ function getVersionData(){ $version = array(); //import version string - if(@file_exists(DOKU_INC.'VERSION')){ + if(file_exists(DOKU_INC.'VERSION')){ //official release $version['date'] = trim(io_readfile(DOKU_INC.'VERSION')); $version['type'] = 'Release'; @@ -141,20 +141,20 @@ function check(){ if(is_writable($conf['changelog'])){ msg('Changelog is writable',1); }else{ - if (@file_exists($conf['changelog'])) { + if (file_exists($conf['changelog'])) { msg('Changelog is not writable',-1); } } - if (isset($conf['changelog_old']) && @file_exists($conf['changelog_old'])) { + if (isset($conf['changelog_old']) && file_exists($conf['changelog_old'])) { msg('Old changelog exists', 0); } - if (@file_exists($conf['changelog'].'_failed')) { + if (file_exists($conf['changelog'].'_failed')) { msg('Importing old changelog failed', -1); - } else if (@file_exists($conf['changelog'].'_importing')) { + } else if (file_exists($conf['changelog'].'_importing')) { msg('Importing old changelog now.', 0); - } else if (@file_exists($conf['changelog'].'_import_ok')) { + } else if (file_exists($conf['changelog'].'_import_ok')) { msg('Old changelog imported', 1); if (!plugin_isdisabled('importoldchangelog')) { msg('Importoldchangelog plugin not disabled after import', -1); diff --git a/inc/init.php b/inc/init.php index 12bb6f588..91bc77f98 100644 --- a/inc/init.php +++ b/inc/init.php @@ -16,7 +16,7 @@ $config_cascade = array(); // if available load a preload config file $preload = fullpath(dirname(__FILE__)).'/preload.php'; -if (@file_exists($preload)) include($preload); +if (file_exists($preload)) include($preload); // define the include path if(!defined('DOKU_INC')) define('DOKU_INC',fullpath(dirname(__FILE__).'/../').'/'); @@ -28,7 +28,7 @@ if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); if(!defined('DOKU_CONF')) define('DOKU_CONF',DOKU_INC.'conf/'); // check for error reporting override or set error reporting to sane values -if (!defined('DOKU_E_LEVEL') && @file_exists(DOKU_CONF.'report_e_all')) { +if (!defined('DOKU_E_LEVEL') && file_exists(DOKU_CONF.'report_e_all')) { define('DOKU_E_LEVEL', E_ALL); } if (!defined('DOKU_E_LEVEL')) { @@ -65,7 +65,7 @@ $conf = array(); foreach (array('default','local','protected') as $config_group) { if (empty($config_cascade['main'][$config_group])) continue; foreach ($config_cascade['main'][$config_group] as $config_file) { - if (@file_exists($config_file)) { + if (file_exists($config_file)) { include($config_file); } } @@ -79,7 +79,7 @@ $license = array(); foreach (array('default','local') as $config_group) { if (empty($config_cascade['license'][$config_group])) continue; foreach ($config_cascade['license'][$config_group] as $config_file) { - if(@file_exists($config_file)){ + if(file_exists($config_file)){ include($config_file); } } @@ -272,7 +272,7 @@ function init_lang($langCode) { //load the language files require(DOKU_INC.'inc/lang/en/lang.php'); foreach ($config_cascade['lang']['core'] as $config_file) { - if (@file_exists($config_file . 'en/lang.php')) { + if (file_exists($config_file . 'en/lang.php')) { include($config_file . 'en/lang.php'); } } @@ -282,7 +282,7 @@ function init_lang($langCode) { require(DOKU_INC."inc/lang/$langCode/lang.php"); } foreach ($config_cascade['lang']['core'] as $config_file) { - if (@file_exists($config_file . "$langCode/lang.php")) { + if (file_exists($config_file . "$langCode/lang.php")) { include($config_file . "$langCode/lang.php"); } } @@ -298,7 +298,7 @@ function init_files(){ $files = array($conf['indexdir'].'/page.idx'); foreach($files as $file){ - if(!@file_exists($file)){ + if(!file_exists($file)){ $fh = @fopen($file,'a'); if($fh){ fclose($fh); @@ -312,7 +312,7 @@ function init_files(){ # create title index (needs to have same length as page.idx) /* $file = $conf['indexdir'].'/title.idx'; - if(!@file_exists($file)){ + if(!file_exists($file)){ $pages = file($conf['indexdir'].'/page.idx'); $pages = count($pages); $fh = @fopen($file,'a'); @@ -339,9 +339,9 @@ function init_files(){ function init_path($path){ // check existence $p = fullpath($path); - if(!@file_exists($p)){ + if(!file_exists($p)){ $p = fullpath(DOKU_INC.$path); - if(!@file_exists($p)){ + if(!file_exists($p)){ return ''; } } @@ -352,7 +352,7 @@ function init_path($path){ } // check accessability (execute bit) for directories - if(@is_dir($p) && !@file_exists("$p/.")){ + if(@is_dir($p) && !file_exists("$p/.")){ return ''; } @@ -593,7 +593,7 @@ function fullpath($path,$exists=false){ $finalpath = $root.implode('/', $newpath); // check for existence when needed (except when unit testing) - if($exists && !defined('DOKU_UNITTEST') && !@file_exists($finalpath)) { + if($exists && !defined('DOKU_UNITTEST') && !file_exists($finalpath)) { return false; } return $finalpath; diff --git a/inc/io.php b/inc/io.php index bfa394a17..3ed227162 100644 --- a/inc/io.php +++ b/inc/io.php @@ -105,7 +105,7 @@ function _io_readWikiPage_action($data) { */ function io_readFile($file,$clean=true){ $ret = ''; - if(@file_exists($file)){ + if(file_exists($file)){ if(substr($file,-3) == '.gz'){ $ret = join('',gzfile($file)); }else if(substr($file,-4) == '.bz2'){ @@ -204,7 +204,7 @@ function io_saveFile($file,$content,$append=false){ global $conf; $mode = ($append) ? 'ab' : 'wb'; - $fileexists = @file_exists($file); + $fileexists = file_exists($file); io_makeFileDir($file); io_lock($file); if(substr($file,-3) == '.gz'){ @@ -258,7 +258,7 @@ function io_saveFile($file,$content,$append=false){ * @return bool true on success */ function io_deleteFromFile($file,$badline,$regex=false){ - if (!@file_exists($file)) return true; + if (!file_exists($file)) return true; io_lock($file); @@ -385,7 +385,7 @@ function io_createNamespace($id, $ns_type='pages') { $ns_stack = explode(':', $id); $ns = $id; $tmp = dirname( $file = call_user_func($types[$ns_type], $ns) ); - while (!@is_dir($tmp) && !(@file_exists($tmp) && !is_dir($tmp))) { + while (!@is_dir($tmp) && !(file_exists($tmp) && !is_dir($tmp))) { array_pop($ns_stack); $ns = implode(':', $ns_stack); if (strlen($ns)==0) { break; } @@ -429,7 +429,7 @@ function io_makeFileDir($file){ function io_mkdir_p($target){ global $conf; if (@is_dir($target)||empty($target)) return 1; // best case check first - if (@file_exists($target) && !is_dir($target)) return 0; + if (file_exists($target) && !is_dir($target)) return 0; //recursion if (io_mkdir_p(substr($target,0,strrpos($target,'/')))){ if($conf['safemodehack']){ @@ -606,7 +606,7 @@ function io_download($url,$file,$useAttachment=false,$defaultName='',$maxSize=20 $file = $file.$name; } - $fileexists = @file_exists($file); + $fileexists = file_exists($file); $fp = @fopen($file,"w"); if(!$fp) return false; fwrite($fp,$data); diff --git a/inc/lang/cs/adminplugins.txt b/inc/lang/cs/adminplugins.txt index 005f8f2df..88e547abf 100644 --- a/inc/lang/cs/adminplugins.txt +++ b/inc/lang/cs/adminplugins.txt @@ -1 +1 @@ -===== Další pluginy =====
\ No newline at end of file +===== Další zásuvné moduly =====
\ No newline at end of file diff --git a/inc/lang/fr/lang.php b/inc/lang/fr/lang.php index 7a9b82158..9deff1220 100644 --- a/inc/lang/fr/lang.php +++ b/inc/lang/fr/lang.php @@ -366,3 +366,5 @@ $lang['currentns'] = 'Catégorie courante'; $lang['searchresult'] = 'Résultat de la recherche'; $lang['plainhtml'] = 'HTML brut'; $lang['wikimarkup'] = 'Wiki balise'; +$lang['page_nonexist_rev'] = 'La page n\'existait pas le %s. Elle a été créée le <a href="%s">%s</a>.'; +$lang['unable_to_parse_date'] = 'Ne peut analyser le paramètre date "%s".'; diff --git a/inc/lang/pl/lang.php b/inc/lang/pl/lang.php index baf3c28a9..fa70db06c 100644 --- a/inc/lang/pl/lang.php +++ b/inc/lang/pl/lang.php @@ -17,6 +17,7 @@ * @author Tomasz Bosak <bosak.tomasz@gmail.com> * @author Paweł Jan Czochański <czochanski@gmail.com> * @author Mati <mackosa@wp.pl> + * @author Maciej Helt <geraldziu@gmail.com> */ $lang['encoding'] = 'utf-8'; $lang['direction'] = 'ltr'; @@ -294,6 +295,7 @@ $lang['i_modified'] = 'Ze względów bezpieczeństwa, ten skrypt dzia Aby uruchomić instalator ponownie, rozpakuj archiwum DokuWiki lub zapoznaj się z <a href="http://dokuwiki.org/install">instrukcją instalacji Dokuwiki</a>'; $lang['i_funcna'] = 'Funkcja PHP <code>%s</code> jest niedostępna.'; $lang['i_phpver'] = 'Wersja PHP <code>%s</code> jest niższa od wymaganej <code>%s</code>. Zaktualizuj instalację PHP.'; +$lang['i_mbfuncoverload'] = 'mbstring.func_overload musi zostać wyłączone w pliku php.ini aby móc uruchomić DokuWiki.'; $lang['i_permfail'] = 'DokuWiki nie ma prawa zapisu w katalogu <code>%s</code>. Zmień uprawnienia zapisu dla tego katalogu!'; $lang['i_confexists'] = '<code>%s</code> już istnieje'; $lang['i_writeerr'] = 'Nie można utworzyć <code>%s</code>. Sprawdź uprawnienia do katalogu lub pliku i stwórz plik ręcznie.'; diff --git a/inc/load.php b/inc/load.php index ac2812a0b..18786dc79 100644 --- a/inc/load.php +++ b/inc/load.php @@ -119,7 +119,7 @@ function load_autoload($name){ // try to load the wanted plugin file $c = ((count($m) === 4) ? "/{$m[3]}" : ''); $plg = DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php"; - if(@file_exists($plg)){ + if(file_exists($plg)){ include_once DOKU_PLUGIN . "{$m[2]}/{$m[1]}$c.php"; } return; diff --git a/inc/media.php b/inc/media.php index 09bfc99ac..81081d5dc 100644 --- a/inc/media.php +++ b/inc/media.php @@ -70,7 +70,7 @@ function media_metasave($id,$auth,$data){ } $old = @filemtime($src); - if(!@file_exists(mediaFN($id, $old)) && @file_exists($src)) { + if(!file_exists(mediaFN($id, $old)) && file_exists($src)) { // add old revision to the attic media_saveOldRevision($id); } @@ -141,7 +141,7 @@ function media_metaform($id,$auth){ if(is_null($fields)){ $config_files = getConfigFiles('mediameta'); foreach ($config_files as $config_file) { - if(@file_exists($config_file)) include($config_file); + if(file_exists($config_file)) include($config_file); } } @@ -241,14 +241,14 @@ function media_delete($id,$auth){ $data['id'] = $id; $data['name'] = utf8_basename($file); $data['path'] = $file; - $data['size'] = (@file_exists($file)) ? filesize($file) : 0; + $data['size'] = (file_exists($file)) ? filesize($file) : 0; $data['unl'] = false; $data['del'] = false; $evt = new Doku_Event('MEDIA_DELETE_FILE',$data); if ($evt->advise_before()) { $old = @filemtime($file); - if(!@file_exists(mediaFN($id, $old)) && @file_exists($file)) { + if(!file_exists(mediaFN($id, $old)) && file_exists($file)) { // add old revision to the attic media_saveOldRevision($id); } @@ -431,7 +431,7 @@ function media_save($file, $id, $ow, $auth, $move) { } //check for overwrite - $overwrite = @file_exists($fn); + $overwrite = file_exists($fn); $auth_ow = (($conf['mediarevisions']) ? AUTH_UPLOAD : AUTH_DELETE); if($overwrite && (!$ow || $auth < $auth_ow)) { return array($lang['uploadexist'], 0); @@ -497,7 +497,7 @@ function media_upload_finish($fn_tmp, $fn, $id, $imime, $overwrite, $move = 'mov global $REV; $old = @filemtime($fn); - if(!@file_exists(mediaFN($id, $old)) && @file_exists($fn)) { + if(!file_exists(mediaFN($id, $old)) && file_exists($fn)) { // add old revision to the attic if missing media_saveOldRevision($id); } @@ -541,7 +541,7 @@ function media_saveOldRevision($id){ global $conf, $lang; $oldf = mediaFN($id); - if(!@file_exists($oldf)) return ''; + if(!file_exists($oldf)) return ''; $date = filemtime($oldf); if (!$conf['mediarevisions']) return $date; @@ -549,7 +549,7 @@ function media_saveOldRevision($id){ if (!$medialog->getRevisionInfo($date)) { // there was an external edit, // there is no log entry for current version of file - if (!@file_exists(mediaMetaFN($id,'.changes'))) { + if (!file_exists(mediaMetaFN($id,'.changes'))) { addMediaLogEntry($date, $id, DOKU_CHANGE_TYPE_CREATE, $lang['created']); } else { addMediaLogEntry($date, $id, DOKU_CHANGE_TYPE_EDIT); @@ -721,7 +721,7 @@ function media_tabs_details($image, $selected_tab = ''){ 'caption' => $lang['media_viewtab']); list(, $mime) = mimetype($image); - if ($mime == 'image/jpeg' && @file_exists(mediaFN($image))) { + if ($mime == 'image/jpeg' && file_exists(mediaFN($image))) { $tabs['edit'] = array('href' => media_managerURL(array('tab_details' => 'edit'), '&'), 'caption' => $lang['media_edittab']); } @@ -1008,7 +1008,7 @@ function media_preview_buttons($image, $auth, $rev='') { echo '<ul class="actions">'.NL; - if($auth >= AUTH_DELETE && !$rev && @file_exists(mediaFN($image))){ + if($auth >= AUTH_DELETE && !$rev && file_exists(mediaFN($image))){ // delete button $form = new Doku_Form(array('id' => 'mediamanager__btn_delete', @@ -1031,7 +1031,7 @@ function media_preview_buttons($image, $auth, $rev='') { echo '</li>'.NL; } - if($auth >= AUTH_UPLOAD && $rev && $conf['mediarevisions'] && @file_exists(mediaFN($image, $rev))){ + if($auth >= AUTH_UPLOAD && $rev && $conf['mediarevisions'] && file_exists(mediaFN($image, $rev))){ // restore button $form = new Doku_Form(array('id' => 'mediamanager__btn_restore', @@ -1103,7 +1103,7 @@ function media_file_tags($meta) { if(is_null($fields)){ $config_files = getConfigFiles('mediameta'); foreach ($config_files as $config_file) { - if(@file_exists($config_file)) include($config_file); + if(file_exists($config_file)) include($config_file); } } @@ -1580,7 +1580,7 @@ function media_printfile($item,$auth,$jump,$display_namespace=false){ function media_printicon($filename, $size=''){ list($ext) = mimetype(mediaFN($filename),false); - if (@file_exists(DOKU_INC.'lib/images/fileicons/'.$size.'/'.$ext.'.png')) { + if (file_exists(DOKU_INC.'lib/images/fileicons/'.$size.'/'.$ext.'.png')) { $icon = DOKU_BASE.'lib/images/fileicons/'.$size.'/'.$ext.'.png'; } else { $icon = DOKU_BASE.'lib/images/fileicons/'.$size.'/file.png'; @@ -2165,7 +2165,7 @@ function media_image_download($url,$file){ $data = $http->get($url); if(!$data) return false; - $fileexists = @file_exists($file); + $fileexists = file_exists($file); $fp = @fopen($file,"w"); if(!$fp) return false; fwrite($fp,$data); diff --git a/inc/pageutils.php b/inc/pageutils.php index 2fbcbfd1f..375712661 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -263,7 +263,7 @@ function page_exists($id,$rev='',$clean=true, $date_at=false) { if($pagelog_rev !== false) $rev = $pagelog_rev; } - return @file_exists(wikiFN($id,$rev,$clean)); + return file_exists(wikiFN($id,$rev,$clean)); } /** @@ -299,9 +299,9 @@ function wikiFN($raw_id,$rev='',$clean=true){ $fn = $conf['olddir'].'/'.utf8_encodeFN($id).'.'.$rev.'.txt'; if($conf['compression']){ //test for extensions here, we want to read both compressions - if (@file_exists($fn . '.gz')){ + if (file_exists($fn . '.gz')){ $fn .= '.gz'; - }else if(@file_exists($fn . '.bz2')){ + }else if(file_exists($fn . '.bz2')){ $fn .= '.bz2'; }else{ //file doesnt exist yet, so we take the configured extension @@ -418,9 +418,9 @@ function mediaFN($id, $rev=''){ function localeFN($id,$ext='txt'){ global $conf; $file = DOKU_CONF.'lang/'.$conf['lang'].'/'.$id.'.'.$ext; - if(!@file_exists($file)){ + if(!file_exists($file)){ $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.'.$ext; - if(!@file_exists($file)){ + if(!file_exists($file)){ //fall back to english $file = DOKU_INC.'inc/lang/en/'.$id.'.'.$ext; } @@ -504,7 +504,7 @@ function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){ } $file = mediaFN($page,$rev); - $exists = @file_exists($file); + $exists = file_exists($file); } /** @@ -565,7 +565,7 @@ function resolve_pageid($ns,&$page,&$exists,$rev='',$date_at=false ){ } }else{ //check alternative plural/nonplural form - if(!@file_exists($file)){ + if(!file_exists($file)){ if( $conf['autoplural'] ){ if(substr($page,-1) == 's'){ $try = substr($page,0,-1); diff --git a/inc/parser/handler.php b/inc/parser/handler.php index d96a01a60..731c19828 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -526,6 +526,7 @@ class Doku_Handler { $p['author'] = (preg_match('/\b(by|author)/',$params)); $p['date'] = (preg_match('/\b(date)/',$params)); $p['details'] = (preg_match('/\b(desc|detail)/',$params)); + $p['nosort'] = (preg_match('/\b(nosort)\b/',$params)); if (preg_match('/\b(\d+)([dhm])\b/',$params,$match)) { $period = array('d' => 86400, 'h' => 3600, 'm' => 60); diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index f1703111e..c68d206be 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -1178,6 +1178,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer { error_reporting($elvl); } + if($params['nosort']) $feed->enable_order_by_date(false); + //decide on start and end if($params['reverse']) { $mod = -1; diff --git a/inc/parserutils.php b/inc/parserutils.php index 3ef8138a7..17c331ef5 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -71,13 +71,13 @@ function p_wiki_xhtml($id, $rev='', $excuse=true,$date_at=''){ $ID = $id; if($rev || $date_at){ - if(@file_exists($file)){ + if(file_exists($file)){ $ret = p_render('xhtml',p_get_instructions(io_readWikiPage($file,$id,$rev)),$info,$date_at); //no caching on old revisions }elseif($excuse){ $ret = p_locale_xhtml('norev'); } }else{ - if(@file_exists($file)){ + if(file_exists($file)){ $ret = p_cached_output($file,'xhtml',$id); }elseif($excuse){ $ret = p_locale_xhtml('newpage'); @@ -156,7 +156,7 @@ function p_cached_instructions($file,$cacheonly=false,$id='') { if ($cacheonly || $cache->useCache() || (isset($run[$file]) && !defined('DOKU_UNITTEST'))) { return $cache->retrieveCache(); - } else if (@file_exists($file)) { + } else if (file_exists($file)) { // no cache - do some work $ins = p_get_instructions(io_readWikiPage($file,$id)); if ($cache->storeCache($ins)) { @@ -248,7 +248,7 @@ function p_get_metadata($id, $key='', $render=METADATA_RENDER_USING_CACHE){ if ($render & METADATA_RENDER_USING_SIMPLE_CACHE) { $pagefn = wikiFN($id); $metafn = metaFN($id, '.meta'); - if (!@file_exists($metafn) || @filemtime($pagefn) > @filemtime($cachefile->cache)) { + if (!file_exists($metafn) || @filemtime($pagefn) > @filemtime($cachefile->cache)) { $do_render = true; } } elseif (!$cachefile->useCache()){ @@ -414,7 +414,7 @@ function p_read_metadata($id,$cache=false) { if (isset($cache_metadata[(string)$id])) return $cache_metadata[(string)$id]; $file = metaFN($id, '.meta'); - $meta = @file_exists($file) ? unserialize(io_readFile($file, false)) : array('current'=>array(),'persistent'=>array()); + $meta = file_exists($file) ? unserialize(io_readFile($file, false)) : array('current'=>array(),'persistent'=>array()); if ($cache) { $cache_metadata[(string)$id] = $meta; diff --git a/inc/plugin.php b/inc/plugin.php index 9d9b2044c..f2ad95e2e 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -33,7 +33,7 @@ class DokuWiki_Plugin { public function getInfo(){ $parts = explode('_', get_class($this)); $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt'; - if(@file_exists($info)) return confToHash($info); + if(file_exists($info)) return confToHash($info); msg( 'getInfo() not implemented in ' . get_class($this) . ' and ' . $info . ' not found.<br />' . @@ -112,9 +112,9 @@ class DokuWiki_Plugin { global $conf; $plugin = $this->getPluginName(); $file = DOKU_CONF.'plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt'; - if (!@file_exists($file)){ + if (!file_exists($file)){ $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt'; - if(!@file_exists($file)){ + if(!file_exists($file)){ //fall back to english $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt'; } @@ -137,7 +137,7 @@ class DokuWiki_Plugin { // don't include once, in case several plugin components require the same language file @include($path . 'en/lang.php'); foreach($config_cascade['lang']['plugin'] as $config_file) { - if(@file_exists($config_file . $this->getPluginName() . '/en/lang.php')) { + if(file_exists($config_file . $this->getPluginName() . '/en/lang.php')) { include($config_file . $this->getPluginName() . '/en/lang.php'); } } @@ -145,7 +145,7 @@ class DokuWiki_Plugin { if($conf['lang'] != 'en') { @include($path . $conf['lang'] . '/lang.php'); foreach($config_cascade['lang']['plugin'] as $config_file) { - if(@file_exists($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php')) { + if(file_exists($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php')) { include($config_file . $this->getPluginName() . '/' . $conf['lang'] . '/lang.php'); } } @@ -207,7 +207,7 @@ class DokuWiki_Plugin { $path = DOKU_PLUGIN.$this->getPluginName().'/conf/'; $conf = array(); - if (@file_exists($path.'default.php')) { + if (file_exists($path.'default.php')) { include($path.'default.php'); } diff --git a/inc/plugincontroller.class.php b/inc/plugincontroller.class.php index f8ba58563..8d20f885d 100644 --- a/inc/plugincontroller.class.php +++ b/inc/plugincontroller.class.php @@ -177,7 +177,7 @@ class Doku_Plugin_Controller { // disabling mechanism was changed back very soon again // to keep everything simple we just skip the plugin completely continue; - } elseif (@file_exists(DOKU_PLUGIN.$plugin.'/disabled')) { + } elseif (file_exists(DOKU_PLUGIN.$plugin.'/disabled')) { /** * treat this as a default disabled plugin(over-rideable by the plugin manager) * @deprecated 2011-09-10 (usage of disabled files) @@ -247,9 +247,9 @@ class Doku_Plugin_Controller { $out .= "\$plugins['$plugin'] = $value;\n"; } // backup current file (remove any existing backup) - if (@file_exists($file)) { + if (file_exists($file)) { $backup = $file.'.bak'; - if (@file_exists($backup)) @unlink($backup); + if (file_exists($backup)) @unlink($backup); if (!@copy($file,$backup)) return false; if (!empty($conf['fperm'])) chmod($backup, $conf['fperm']); } @@ -282,7 +282,7 @@ class Doku_Plugin_Controller { /** * Build the list of plugins and cascade - * + * */ protected function loadConfig() { global $config_cascade; @@ -310,28 +310,28 @@ class Doku_Plugin_Controller { protected function _getListByType($type, $enabled) { $master_list = $enabled ? array_keys(array_filter($this->tmp_plugins)) : array_keys(array_filter($this->tmp_plugins,array($this,'negate'))); $plugins = array(); - + foreach ($master_list as $plugin) { - - $dir = $this->get_directory($plugin); - if (@file_exists(DOKU_PLUGIN."$dir/$type.php")){ + + $basedir = $this->get_directory($plugin); + if (file_exists(DOKU_PLUGIN."$basedir/$type.php")){ $plugins[] = $plugin; continue; } - - $dir2 = DOKU_PLUGIN."$dir/$type/"; - if (is_dir($dir2)) { - if ($dp = opendir($dir2)) { + + $typedir = DOKU_PLUGIN."$basedir/$type/"; + if (is_dir($typedir)) { + if ($dp = opendir($typedir)) { while (false !== ($component = readdir($dp))) { if (substr($component,0,1) == '.' || strtolower(substr($component, -4)) != ".php") continue; - if (is_file($dir2.$component)) { + if (is_file($typedir.$component)) { $plugins[] = $plugin.'_'.substr($component, 0, -4); } } closedir($dp); } } - + }//foreach return $plugins; diff --git a/inc/subscription.php b/inc/subscription.php index 58376f2ec..8b6dcb27e 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -166,7 +166,7 @@ class Subscription { // Handle files. $result = array(); foreach($files as $target => $file) { - if(!@file_exists($file)) continue; + if(!file_exists($file)) continue; $lines = file($file); foreach($lines as $line) { diff --git a/inc/template.php b/inc/template.php index 3bccb0bd8..646f0873a 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1124,7 +1124,7 @@ function tpl_get_img_meta() { $config_files = getConfigFiles('mediameta'); foreach ($config_files as $config_file) { - if(@file_exists($config_file)) { + if(file_exists($config_file)) { include($config_file); } } @@ -1297,7 +1297,7 @@ function tpl_loadConfig() { $file = tpl_incdir().'/conf/default.php'; $conf = array(); - if(!@file_exists($file)) return false; + if(!file_exists($file)) return false; // load default config file include($file); @@ -1327,7 +1327,7 @@ function tpl_getLang($id) { // don't include once @include($path . 'en/lang.php'); foreach($config_cascade['lang']['template'] as $config_file) { - if(@file_exists($config_file . $conf['template'] . '/en/lang.php')) { + if(file_exists($config_file . $conf['template'] . '/en/lang.php')) { include($config_file . $conf['template'] . '/en/lang.php'); } } @@ -1335,7 +1335,7 @@ function tpl_getLang($id) { if($conf['lang'] != 'en') { @include($path . $conf['lang'] . '/lang.php'); foreach($config_cascade['lang']['template'] as $config_file) { - if(@file_exists($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php')) { + if(file_exists($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php')) { include($config_file . $conf['template'] . '/' . $conf['lang'] . '/lang.php'); } } @@ -1365,9 +1365,9 @@ function tpl_localeFN($id) { $path = tpl_incdir().'lang/'; global $conf; $file = DOKU_CONF.'template_lang/'.$conf['template'].'/'.$conf['lang'].'/'.$id.'.txt'; - if (!@file_exists($file)){ + if (!file_exists($file)){ $file = $path.$conf['lang'].'/'.$id.'.txt'; - if(!@file_exists($file)){ + if(!file_exists($file)){ //fall back to english $file = $path.'en/'.$id.'.txt'; } diff --git a/install.php b/install.php index d031cb3d9..1a2d03dff 100644 --- a/install.php +++ b/install.php @@ -110,7 +110,7 @@ header('Content-Type: text/html; charset=utf-8'); <div style="float: right; width: 34%;"> <?php - if(@file_exists(DOKU_INC.'inc/lang/'.$LC.'/install.html')){ + if(file_exists(DOKU_INC.'inc/lang/'.$LC.'/install.html')){ include(DOKU_INC.'inc/lang/'.$LC.'/install.html'); }else{ print "<div lang=\"en\" dir=\"ltr\">\n"; @@ -497,7 +497,7 @@ function check_configs(){ // configs shouldn't exist foreach ($config_files as $file) { - if (@file_exists($file) && filesize($file)) { + if (file_exists($file) && filesize($file)) { $file = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}/', $file); $error[] = sprintf($lang['i_confexists'],$file); $ok = false; @@ -535,7 +535,7 @@ function check_permissions(){ $ok = true; foreach($dirs as $dir){ - if(!@file_exists("$dir/.") || !@is_writable($dir)){ + if(!file_exists("$dir/.") || !is_writable($dir)){ $dir = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}', $dir); $error[] = sprintf($lang['i_permfail'],$dir); $ok = false; @@ -604,7 +604,7 @@ function langsel(){ $langs = array(); while (($file = readdir($dh)) !== false) { if(preg_match('/^[\._]/',$file)) continue; - if(is_dir($dir.'/'.$file) && @file_exists($dir.'/'.$file.'/lang.php')){ + if(is_dir($dir.'/'.$file) && file_exists($dir.'/'.$file.'/lang.php')){ $langs[] = $file; } } diff --git a/lib/exe/css.php b/lib/exe/css.php index b1065f518..e0bc68312 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -365,11 +365,11 @@ function css_interwiki(){ $iwlinks = getInterwiki(); foreach(array_keys($iwlinks) as $iw){ $class = preg_replace('/[^_\-a-z0-9]+/i','_',$iw); - if(@file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.png')){ + if(file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.png')){ echo "a.iw_$class {"; echo ' background-image: url('.DOKU_BASE.'lib/images/interwiki/'.$iw.'.png)'; echo '}'; - }elseif(@file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.gif')){ + }elseif(file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.gif')){ echo "a.iw_$class {"; echo ' background-image: url('.DOKU_BASE.'lib/images/interwiki/'.$iw.'.gif)'; echo '}'; @@ -451,7 +451,7 @@ class DokuCssFile { * @return string the CSS/Less contents of the file */ public function load($location='') { - if (!@file_exists($this->filepath)) return ''; + if (!file_exists($this->filepath)) return ''; $css = io_readFile($this->filepath); if (!$location) return $css; diff --git a/lib/exe/detail.php b/lib/exe/detail.php index cc29d5b87..ec1a9b874 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -37,7 +37,7 @@ $AUTH = auth_quickaclcheck($IMG); if($AUTH >= AUTH_READ){ // check if image exists $SRC = mediaFN($IMG,$REV); - if(!@file_exists($SRC)){ + if(!file_exists($SRC)){ //doesn't exist! http_status(404); $ERROR = 'File not found'; diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 89c4b7cd0..330b8498d 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -68,9 +68,9 @@ function runTrimRecentChanges($media_changes = false) { // Trims the recent changes cache to the last $conf['changes_days'] recent // changes or $conf['recent'] items, which ever is larger. // The trimming is only done once a day. - if (@file_exists($fn) && + if (file_exists($fn) && (@filemtime($fn.'.trimmed')+86400)<time() && - !@file_exists($fn.'_tmp')) { + !file_exists($fn.'_tmp')) { @touch($fn.'.trimmed'); io_lock($fn); $lines = file($fn); diff --git a/lib/exe/js.php b/lib/exe/js.php index 793104e81..3f9781e34 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -160,7 +160,7 @@ function js_out(){ * @param string $file filename path to file */ function js_load($file){ - if(!@file_exists($file)) return; + if(!file_exists($file)) return; static $loaded = array(); $data = io_readFile($file); @@ -179,7 +179,7 @@ function js_load($file){ if($ifile{0} != '/') $ifile = dirname($file).'/'.$ifile; - if(@file_exists($ifile)){ + if(file_exists($ifile)){ $idata = io_readFile($ifile); }else{ $idata = ''; @@ -221,10 +221,10 @@ function js_pluginstrings() { $plugins = plugin_list(); foreach ($plugins as $p){ if (isset($lang)) unset($lang); - if (@file_exists(DOKU_PLUGIN."$p/lang/en/lang.php")) { + if (file_exists(DOKU_PLUGIN."$p/lang/en/lang.php")) { include DOKU_PLUGIN."$p/lang/en/lang.php"; } - if (isset($conf['lang']) && $conf['lang']!='en' && @file_exists(DOKU_PLUGIN."$p/lang/".$conf['lang']."/lang.php")) { + if (isset($conf['lang']) && $conf['lang']!='en' && file_exists(DOKU_PLUGIN."$p/lang/".$conf['lang']."/lang.php")) { include DOKU_PLUGIN."$p/lang/".$conf['lang']."/lang.php"; } if (isset($lang['js'])) { @@ -245,10 +245,10 @@ function js_pluginstrings() { function js_templatestrings() { global $conf; $templatestrings = array(); - if (@file_exists(tpl_incdir()."lang/en/lang.php")) { + if (file_exists(tpl_incdir()."lang/en/lang.php")) { include tpl_incdir()."lang/en/lang.php"; } - if (isset($conf['lang']) && $conf['lang']!='en' && @file_exists(tpl_incdir()."lang/".$conf['lang']."/lang.php")) { + if (isset($conf['lang']) && $conf['lang']!='en' && file_exists(tpl_incdir()."lang/".$conf['lang']."/lang.php")) { include tpl_incdir()."lang/".$conf['lang']."/lang.php"; } if (isset($lang['js'])) { diff --git a/lib/plugins/authad/lang/cs/settings.php b/lib/plugins/authad/lang/cs/settings.php index 28222d332..92b2d0f13 100644 --- a/lib/plugins/authad/lang/cs/settings.php +++ b/lib/plugins/authad/lang/cs/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author mkucera66@seznam.cz + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['account_suffix'] = 'Přípona vašeho účtu, tj. <code>@moje.domena.org</code>'; $lang['base_dn'] = 'Vaše doménové jméno DN. tj. <code>DC=moje,DC=domena,DC=org</code>'; @@ -11,6 +12,7 @@ $lang['domain_controllers'] = 'Čárkou oddělenových kontrol=rů, tj. <code $lang['admin_username'] = 'Privilegovaný uživatel Active Directory s přístupem ke všem datům. Volitelně, ale nutné pro určité akce typu zasílání mailů.'; $lang['admin_password'] = 'Heslo uživatele výše'; $lang['sso'] = 'Chcete přihlašování Single-Sign-On pomocí jádra Kerberos nebo NTLM ( autentizační protokol obvyklý ve Windows)?'; +$lang['sso_charset'] = 'Znaková sada kterou bude webserverem přenášeno uživatelské jméno pro Kerberos nebo NTLM. Prázdné pro UTF-8 nebo latin-1. Vyžaduje rozšíření iconv.'; $lang['real_primarygroup'] = 'Má být zjištěna primární skupina namísto vyhodnocení hodnoty "doménoví uživatelé" (pomalejší)'; $lang['use_ssl'] = 'Použít spojení SSL? Pokud ano, nevyužívejte TLS níže.'; $lang['use_tls'] = 'Použít spojení TLS? Pokud ano, nevyužívejte SSL výše.'; diff --git a/lib/plugins/authad/lang/pl/settings.php b/lib/plugins/authad/lang/pl/settings.php index 91cadca6f..537bae7ea 100644 --- a/lib/plugins/authad/lang/pl/settings.php +++ b/lib/plugins/authad/lang/pl/settings.php @@ -6,6 +6,7 @@ * @author Tomasz Bosak <bosak.tomasz@gmail.com> * @author Paweł Jan Czochański <czochanski@gmail.com> * @author Mati <mackosa@wp.pl> + * @author Maciej Helt <geraldziu@gmail.com> */ $lang['account_suffix'] = 'Przyrostek twojej nazwy konta np. <code>@my.domain.org</code>'; $lang['base_dn'] = 'Twoje bazowe DN. Na przykład: <code>DC=my,DC=domain,DC=org</code>'; diff --git a/lib/plugins/authldap/lang/cs/settings.php b/lib/plugins/authldap/lang/cs/settings.php index 20491f1fb..a5aad5981 100644 --- a/lib/plugins/authldap/lang/cs/settings.php +++ b/lib/plugins/authldap/lang/cs/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author mkucera66@seznam.cz + * @author Jaroslav Lichtblau <jlichtblau@seznam.cz> */ $lang['server'] = 'Váš server LDAP. Buď jméno hosta (<code>localhost</code>) nebo plně kvalifikovaný popis URL (<code>ldap://server.tld:389</code>)'; $lang['port'] = 'Port serveru LDAP. Pokud není, bude využito URL výše'; @@ -14,9 +15,14 @@ $lang['groupfilter'] = 'Filter LDAPu pro vyhledávání uživatelskýc $lang['version'] = 'Verze použitého protokolu. Můžete potřebovat jej nastavit na <code>3</code>'; $lang['starttls'] = 'Využít spojení TLS?'; $lang['referrals'] = 'Přeposílat odkazy?'; +$lang['deref'] = 'Jak rozlišovat aliasy?'; $lang['binddn'] = 'Doménový název DN volitelně připojeného uživatele, pokus anonymní připojení není vyhovující, tj. <code>cn=admin, dc=muj, dc=domov</code>'; $lang['bindpw'] = 'Heslo uživatele výše'; $lang['userscope'] = 'Omezení rozsahu vyhledávání uživatele'; $lang['groupscope'] = 'Omezení rozsahu vyhledávání skupiny'; $lang['groupkey'] = 'Atribut šlenství uživatele ve skupinách (namísto standardních AD skupin), tj. skupina z oddělení nebo telefonní číslo'; $lang['debug'] = 'Zobrazit dodatečné debugovací informace'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; diff --git a/lib/plugins/authldap/lang/pl/settings.php b/lib/plugins/authldap/lang/pl/settings.php index 7010988e6..0f5281b13 100644 --- a/lib/plugins/authldap/lang/pl/settings.php +++ b/lib/plugins/authldap/lang/pl/settings.php @@ -4,6 +4,7 @@ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * * @author Paweł Jan Czochański <czochanski@gmail.com> + * @author Maciej Helt <geraldziu@gmail.com> */ $lang['server'] = 'Twój serwer LDAP. Podaj nazwę hosta (<code>localhost</code>) albo pełen adres URL (<code>ldap://server.tld:389</code>).'; $lang['port'] = 'Port serwera LDAP jeżeli nie podano pełnego adresu URL wyżej.'; @@ -14,3 +15,8 @@ $lang['groupfilter'] = 'Filtr LDAP wykorzystany przy szukaniu grup uż $lang['version'] = 'Wykorzystywana wersja protokołu. Być może konieczne jest ustawienie tego na <code>3</code>.'; $lang['starttls'] = 'Użyć połączeń TLS?'; $lang['bindpw'] = 'Hasło powyższego użytkownika'; +$lang['debug'] = 'Przy błędach wyświetl dodatkowe informacje debugujące.'; +$lang['deref_o_0'] = 'LDAP_DEREF_NEVER'; +$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING'; +$lang['deref_o_2'] = 'LDAP_DEREF_FINDING'; +$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; diff --git a/lib/plugins/authmysql/lang/pl/settings.php b/lib/plugins/authmysql/lang/pl/settings.php index 9dc798ee0..68b5c6c22 100644 --- a/lib/plugins/authmysql/lang/pl/settings.php +++ b/lib/plugins/authmysql/lang/pl/settings.php @@ -5,6 +5,7 @@ * * @author Paweł Jan Czochański <czochanski@gmail.com> * @author Mati <mackosa@wp.pl> + * @author Maciej Helt <geraldziu@gmail.com> */ $lang['server'] = 'Twój server MySQL'; $lang['user'] = 'Nazwa użytkownika MySQL'; @@ -13,4 +14,13 @@ $lang['database'] = 'Używana baza danych'; $lang['charset'] = 'Zestaw znaków uzyty w bazie danych'; $lang['debug'] = 'Wyświetlaj dodatkowe informacje do debugowania.'; $lang['checkPass'] = 'Zapytanie SQL wykorzystywane do sprawdzania haseł.'; +$lang['getUserInfo'] = 'Zapytanie SQL zwracające informacje o użytkowniku'; +$lang['getGroups'] = 'Zapytanie SQL przynależność do grup danego użytkownika'; +$lang['getUsers'] = 'Zapytanie SQL zwracające listę wszystkich użytkowników'; +$lang['FilterLogin'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich loginu'; +$lang['FilterName'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich pełnej nazwy'; +$lang['FilterEmail'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich adresu email'; +$lang['FilterGroup'] = 'Klauzula SQL używana do filtrowania użytkowników na podstawie ich przynależności do grup'; +$lang['SortOrder'] = 'Klauzula SQL używana do sortowania użytkowników'; +$lang['addUser'] = 'Zapytanie SQL dodające nowego użytkownika'; $lang['debug_o_2'] = 'wszystkie zapytania SQL'; diff --git a/lib/plugins/authplain/auth.php b/lib/plugins/authplain/auth.php index fd2d0b249..b31c02fc8 100644 --- a/lib/plugins/authplain/auth.php +++ b/lib/plugins/authplain/auth.php @@ -325,7 +325,7 @@ class auth_plugin_authplain extends DokuWiki_Auth_Plugin { $this->users = array(); - if(!@file_exists($config_cascade['plainauth.users']['default'])) return; + if(!file_exists($config_cascade['plainauth.users']['default'])) return; $lines = file($config_cascade['plainauth.users']['default']); foreach($lines as $line) { diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 9202a221b..2ef570b68 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -282,7 +282,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp' || $plugin == 'config') continue; if (is_file(DOKU_PLUGIN.$plugin)) continue; - if (@file_exists(DOKU_PLUGIN.$plugin.$enlangfile)){ + if (file_exists(DOKU_PLUGIN.$plugin.$enlangfile)){ $lang = array(); @include(DOKU_PLUGIN.$plugin.$enlangfile); if ($conf['lang'] != 'en') @include(DOKU_PLUGIN.$plugin.$langfile); @@ -303,7 +303,7 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { // the same for the active template $tpl = $conf['template']; - if (@file_exists(tpl_incdir().$enlangfile)){ + if (file_exists(tpl_incdir().$enlangfile)){ $lang = array(); @include(tpl_incdir().$enlangfile); if ($conf['lang'] != 'en') @include(tpl_incdir().$langfile); diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 590631dae..316cc2c59 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -40,7 +40,7 @@ if (!class_exists('configuration')) { public function configuration($datafile) { global $conf, $config_cascade; - if (!@file_exists($datafile)) { + if (!file_exists($datafile)) { msg('No configuration metadata found at - '.htmlspecialchars($datafile),-1); return; } @@ -125,8 +125,8 @@ if (!class_exists('configuration')) { $file = end($this->_local_files); // backup current file (remove any existing backup) - if (@file_exists($file) && $backup) { - if (@file_exists($file.'.bak')) @unlink($file.'.bak'); + if (file_exists($file) && $backup) { + if (file_exists($file.'.bak')) @unlink($file.'.bak'); if (!io_rename($file, $file.'.bak')) return false; } @@ -191,7 +191,7 @@ if (!class_exists('configuration')) { if ($this->_format == 'php') { - if(@file_exists($file)){ + if(file_exists($file)){ $contents = @php_strip_whitespace($file); }else{ $contents = ''; @@ -281,7 +281,7 @@ if (!class_exists('configuration')) { $local = $this->_local_files[0]; if (!is_writable(dirname($local))) return true; - if (@file_exists($local) && !is_writable($local)) return true; + if (file_exists($local) && !is_writable($local)) return true; return false; } @@ -345,7 +345,7 @@ if (!class_exists('configuration')) { foreach ($this->get_plugin_list() as $plugin) { $plugin_dir = plugin_directory($plugin); - if (@file_exists(DOKU_PLUGIN.$plugin_dir.$file)){ + if (file_exists(DOKU_PLUGIN.$plugin_dir.$file)){ $meta = array(); @include(DOKU_PLUGIN.$plugin_dir.$file); @include(DOKU_PLUGIN.$plugin_dir.$class); @@ -360,7 +360,7 @@ if (!class_exists('configuration')) { } // the same for the active template - if (@file_exists(tpl_incdir().$file)){ + if (file_exists(tpl_incdir().$file)){ $meta = array(); @include(tpl_incdir().$file); @include(tpl_incdir().$class); @@ -388,7 +388,7 @@ if (!class_exists('configuration')) { foreach ($this->get_plugin_list() as $plugin) { $plugin_dir = plugin_directory($plugin); - if (@file_exists(DOKU_PLUGIN.$plugin_dir.$file)){ + if (file_exists(DOKU_PLUGIN.$plugin_dir.$file)){ $conf = $this->_read_config(DOKU_PLUGIN.$plugin_dir.$file); foreach ($conf as $key => $value){ $default['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value; @@ -397,7 +397,7 @@ if (!class_exists('configuration')) { } // the same for the active template - if (@file_exists(tpl_incdir().$file)){ + if (file_exists(tpl_incdir().$file)){ $conf = $this->_read_config(tpl_incdir().$file); foreach ($conf as $key => $value){ $default['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value; @@ -487,7 +487,7 @@ if (!class_exists('setting')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ public function html(&$plugin, $echo=false) { $disable = ''; @@ -712,7 +712,7 @@ if (!class_exists('setting_array')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { $disable = ''; @@ -748,7 +748,7 @@ if (!class_exists('setting_string')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { $disable = ''; @@ -809,7 +809,7 @@ if (!class_exists('setting_password')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { @@ -990,7 +990,7 @@ if (!class_exists('setting_onoff')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo = false) { $disable = ''; @@ -1044,7 +1044,7 @@ if (!class_exists('setting_multichoice')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo = false) { $disable = ''; @@ -1243,7 +1243,7 @@ if (!class_exists('setting_multicheckbox')) { * * @param DokuWiki_Plugin $plugin object of config plugin * @param bool $echo true: show inputted value, when error occurred, otherwise the stored setting - * @return array with content array(string $label_html, string $input_html) + * @return string[] with content array(string $label_html, string $input_html) */ function html(&$plugin, $echo=false) { diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php index 232a8177f..fd3a90e28 100644 --- a/lib/plugins/config/settings/extra.class.php +++ b/lib/plugins/config/settings/extra.class.php @@ -151,7 +151,7 @@ if (!class_exists('setting_im_convert')) { $value = is_null($this->_local) ? $this->_default : $this->_local; if ($value == $input) return false; - if ($input && !@file_exists($input)) { + if ($input && !file_exists($input)) { $this->_error = true; $this->_input = $input; return false; diff --git a/lib/plugins/extension/helper/extension.php b/lib/plugins/extension/helper/extension.php index dfa624907..6c0946b09 100644 --- a/lib/plugins/extension/helper/extension.php +++ b/lib/plugins/extension/helper/extension.php @@ -707,7 +707,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { $plugin = null; foreach($plugin_types as $type) { - if(@file_exists($path.$type.'.php')) { + if(file_exists($path.$type.'.php')) { $plugin = plugin_load($type, $this->base); if ($plugin) break; } @@ -907,12 +907,12 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { // check to make sure we aren't overwriting anything $target = $target_base_dir.$item['base']; - if(!$overwrite && @file_exists($target)) { + if(!$overwrite && file_exists($target)) { // TODO remember our settings, ask the user to confirm overwrite continue; } - $action = @file_exists($target) ? 'update' : 'install'; + $action = file_exists($target) ? 'update' : 'install'; // copy action if($this->dircopy($item['tmp'], $target)) { @@ -1117,7 +1117,7 @@ class helper_plugin_extension_extension extends DokuWiki_Plugin { return $ok; } else { - $exists = @file_exists($dst); + $exists = file_exists($dst); if(!@copy($src, $dst)) return false; if(!$exists && !empty($conf['fperm'])) chmod($dst, $conf['fperm']); diff --git a/lib/plugins/extension/lang/cs/intro_plugins.txt b/lib/plugins/extension/lang/cs/intro_plugins.txt new file mode 100644 index 000000000..a6f62746a --- /dev/null +++ b/lib/plugins/extension/lang/cs/intro_plugins.txt @@ -0,0 +1 @@ +Toto je seznam momentálně nainstalovaných zásuvných modulů vaší DokuWiki. V tomto seznamu je lze zapínat, vypínat nebo kompletně odinstalovat. Jsou zde také vidět dostupné aktualizace pro moduly, ale před jejich případným aktualizováním si vždy přečtěte jejich dokumentaci.
\ No newline at end of file diff --git a/lib/plugins/extension/lang/cs/intro_search.txt b/lib/plugins/extension/lang/cs/intro_search.txt new file mode 100644 index 000000000..4258ac4f2 --- /dev/null +++ b/lib/plugins/extension/lang/cs/intro_search.txt @@ -0,0 +1 @@ +Tato záložka poskytuje náhled na všechny dostupné moduly a šablony třetích stran pro DokuWiki. Jejich instalací se múžete vystavit **bezpečnostním rizikům** o kterých se můžete více dočíst v oddíle [[doku>security#plugin_security|plugin security]].
\ No newline at end of file diff --git a/lib/plugins/extension/lang/fr/lang.php b/lib/plugins/extension/lang/fr/lang.php index 6955155e9..44d403847 100644 --- a/lib/plugins/extension/lang/fr/lang.php +++ b/lib/plugins/extension/lang/fr/lang.php @@ -6,7 +6,7 @@ * @author Schplurtz le Déboulonné <schplurtz@laposte.net> * @author Yves Grandvalet <Yves.Grandvalet@laposte.net> */ -$lang['menu'] = 'Gestionnaire d\'extension'; +$lang['menu'] = 'Gestionnaire d\'extensions'; $lang['tab_plugins'] = 'Greffons installés'; $lang['tab_templates'] = 'Thèmes installés'; $lang['tab_search'] = 'Rechercher et installer'; @@ -62,7 +62,7 @@ $lang['status_template'] = 'thème'; $lang['status_bundled'] = 'fourni'; $lang['msg_enabled'] = 'Greffon %s activé'; $lang['msg_disabled'] = 'Greffon %s désactivé'; -$lang['msg_delete_success'] = 'Extension désinstallée'; +$lang['msg_delete_success'] = 'Extension %s désinstallée.'; $lang['msg_delete_failed'] = 'Echec de la désinstallation de l\'extension %s'; $lang['msg_template_install_success'] = 'Thème %s installée avec succès'; $lang['msg_template_update_success'] = 'Thème %s mis à jour avec succès'; @@ -85,6 +85,8 @@ $lang['noperms'] = 'Impossible d\'écrire dans le dossier des exte $lang['notplperms'] = 'Impossible d\'écrire dans le dossier des thèmes.'; $lang['nopluginperms'] = 'Impossible d\'écrire dans le dossier des greffons.'; $lang['git'] = 'Cette extension a été installé via git, vous voudrez peut-être ne pas la mettre à jour ici.'; +$lang['auth'] = 'Votre configuration n\'utilise pas ce greffon d\'authentification. Vous devriez songer à le désactiver.'; $lang['install_url'] = 'Installez depuis l\'URL :'; $lang['install_upload'] = 'Téléversez l\'extension :'; $lang['repo_error'] = 'L\'entrepôt d\'extensions est injoignable. Veuillez vous assurer que le server web est autorisé à contacter www.dokuwiki.org et vérifier les réglages de proxy.'; +$lang['nossl'] = 'Votre version de PHP semble ne pas prendre en charge SSL. Le téléchargement de nombreuses extensions va échouer.'; diff --git a/lib/plugins/popularity/admin.php b/lib/plugins/popularity/admin.php index bd2d090e1..ab569b8b4 100644 --- a/lib/plugins/popularity/admin.php +++ b/lib/plugins/popularity/admin.php @@ -87,7 +87,7 @@ class admin_plugin_popularity extends DokuWiki_Admin_Plugin { //If there was an error the last time we tried to autosubmit, warn the user if ( $this->helper->isAutoSubmitEnabled() ){ - if ( @file_exists($this->helper->autosubmitErrorFile) ){ + if ( file_exists($this->helper->autosubmitErrorFile) ){ echo $this->getLang('autosubmitError'); echo io_readFile( $this->helper->autosubmitErrorFile ); } diff --git a/lib/plugins/popularity/helper.php b/lib/plugins/popularity/helper.php index b4fb33b90..8673fb5af 100644 --- a/lib/plugins/popularity/helper.php +++ b/lib/plugins/popularity/helper.php @@ -78,7 +78,7 @@ class helper_plugin_popularity extends Dokuwiki_Plugin { * @return boolean TRUE if we should send data once a month, FALSE otherwise */ function isAutoSubmitEnabled(){ - return @file_exists($this->autosubmitFile); + return file_exists($this->autosubmitFile); } /** |