⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upgradeutilities.java

📁 pebble-blog 博客源码博客源码博客源码
💻 JAVA
字号:
package net.sourceforge.pebble.util;

import net.sourceforge.pebble.domain.Blog;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Utilities for upgrading blogs.
 *
 * @author    Simon Brown
 */
public class UpgradeUtilities {

  /** the logger used by this action */
  private static final Log log = LogFactory.getLog(UpgradeUtilities.class);

  public static void upgradeBlog(Blog blog, String fromVersion, String toVersion) throws Exception {
    log.info("Upgrading blog from " + fromVersion + " to " + toVersion);
    if (fromVersion == null) {
      Utilities.restructureBlogToGMT(blog);
      Utilities.resetTheme(blog);
      Utilities.resetPlugins(blog);
      Utilities.buildIndexes(blog);
    } else if (toVersion.equals("2.1")) {
      Utilities.resetTheme(blog);
    }
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -