diff --git a/admin/common-js.php b/admin/common-js.php index cb41b53c..d4555658 100644 --- a/admin/common-js.php +++ b/admin/common-js.php @@ -32,17 +32,19 @@ } })(); - $('a').each(function () { - var t = $(this), href = t.attr('href'); + if ($('.typecho-login').length == 0) { + $('a').each(function () { + var t = $(this), href = t.attr('href'); - if ((href.length > 1 && href[0] == '#') - || /^adminUrl, '/'); ?>.*$/.exec(href) - || /^index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) { - return; - } + if ((href.length > 1 && href[0] == '#') + || /^adminUrl, '/'); ?>.*$/.exec(href) + || /^index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) { + return; + } - t.attr('target', '_blank'); - }); + t.attr('target', '_blank'); + }); + } }); })(); diff --git a/tools/Makefile b/tools/Makefile index 06e6c7fa..cedd10a9 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -12,7 +12,7 @@ update: git clone https://github.com/typecho/typecho-replica.git build rm -Rf build/.git rm -Rf build/.gitignore - for i in `find build/ -name '*.source.css'`; do echo $$i && java -Xmx32m -jar yuicompressor-2.4.2.jar $$i --charset UTF-8 -o $$i; done; + for i in `find build/ -name '*.css'`; do echo $$i && java -Xmx32m -jar yuicompressor-2.4.2.jar $$i --charset UTF-8 -o $$i; done; for i in `find build/admin/javascript/ -name '*.js'`; do echo $$i && java -Xmx32m -jar yuicompressor-2.4.2.jar $$i --charset UTF-8 -o $$i; done; for i in `find build/ -name '*.php'`; do php -l $$i; done; diff --git a/tools/tabsize.php b/tools/tabsize.php deleted file mode 100644 index 927244ba..00000000 --- a/tools/tabsize.php +++ /dev/null @@ -1,106 +0,0 @@ -isFile()) - { - $file = $file->__toString(); - $fileExt = (false === ($pos = strrpos($file,'.'))) ? NULL : substr($file,$pos + 1); - $fileName = (false === $pos) ? $file : substr($file,0,$pos); - - if(NULL !== $stamp && in_array($fileExt,$stamp)) - { - $files[] = $trim ? $file : $fileName; - } - else if(NULL === $stamp) - { - $files[] = $trim ? $file : $fileName; - } - } - } - return $files; -} - -//获取一个目录下的目录 -function mgGetDir($inpath) -{ - $dirs = array(); - - if(!is_dir($inpath)) - { - return $dirs; - } - $it = new DirectoryIterator($inpath); - - foreach($it as $dir) - { - if($dir->isDir() && !$dir->isDot()) - { - $dirs[] = $dir->__toString(); - } - } - return $dirs; -} - -function tabsize($dir = ROOT_DIR) -{ - if($files = mgGetFile($dir, true, 'php')) - { - foreach($files as $file) - { - if($contents = file_get_contents($dir . '/' . $file)) - { - $lines = preg_split("(\r\n|\r|\n)", $contents); - $result = array(); - foreach($lines as $line) - { - preg_match("/^(\s+)(.*)$/", $line, $out); - if($out && strlen($out[1]) > 0) - { - $line = str_replace("\t", ' ', $out[1]) . $out[2]; - } - - $result[] = rtrim($line, "\r\n") . "\n"; - } - - file_put_contents($dir . '/' . $file, trim(implode('', $result)) . "\n"); - } - } - } - - - if($dirs = mgGetDir($dir)) - { - foreach($dirs as $indir) - { - tabsize($dir . '/' . $indir); - } - } -} - -tabsize(); diff --git a/var/Widget/Archive.php b/var/Widget/Archive.php index 945c0692..81e6ee85 100644 --- a/var/Widget/Archive.php +++ b/var/Widget/Archive.php @@ -563,6 +563,14 @@ class Widget_Archive extends Widget_Abstract_Contents return $this->_total; } + /** + * @return the $_currentPage + */ + public function getCurrentPage() + { + return $this->_currentPage; + } + /** * @return the $_themeFile */