当前位置: 首页>>代码示例>>PHP>>正文


PHP Properties::keyExists方法代码示例

本文整理汇总了PHP中Properties::keyExists方法的典型用法代码示例。如果您正苦于以下问题:PHP Properties::keyExists方法的具体用法?PHP Properties::keyExists怎么用?PHP Properties::keyExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Properties的用法示例。


在下文中一共展示了Properties::keyExists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: makeUpdate

function makeUpdate()
{
    $update_page_files = array();
    if (is_file(BASE_DIR . PLUGIN_DIR_NAME . '/Galerie/plugin.conf')) {
        updateConf(BASE_DIR . PLUGIN_DIR_NAME . '/Galerie/plugin.conf');
    }
    if (is_file(BASE_DIR . PLUGIN_DIR_NAME . '/Galerie/plugin.conf.php')) {
        global $gallery_plugin;
        $gallery_plugin = new Properties(BASE_DIR . PLUGIN_DIR_NAME . '/Galerie/plugin.conf.php');
    }
    if (is_dir(BASE_DIR . 'update')) {
        $cms_confs = array("basic", "main", "passwords", "gallery", "version", "logindata", "downloads", "catpage", "syntax", "user");
        $files = getDirAsArray(BASE_DIR . 'update', array(".conf"), "none");
        if (count($files) > 0) {
            global $GALLERY, $SYNTAX;
            $SYNTAX = new Properties(BASE_DIR_CMS . CONF_DIR_NAME . '/syntax.conf.php');
            $GALLERY = new Properties(BASE_DIR_CMS . CONF_DIR_NAME . '/gallery.conf.php');
            foreach ($files as $datei) {
                if (in_array(str_replace(".conf", "", $datei), $cms_confs)) {
                    updateCMSConf($datei);
                    mo_unlink(BASE_DIR . 'update/' . $datei);
                }
            }
        }
    }
    if (is_dir(BASE_DIR . 'galerien') and is_readable(BASE_DIR . 'galerien')) {
        foreach (getDirAsArray(BASE_DIR . GALLERIES_DIR_NAME, "dir", "none") as $datei) {
            $tmp_conf = false;
            if (is_file(BASE_DIR . GALLERIES_DIR_NAME . '/' . $datei . '/texte.conf')) {
                updateConf(BASE_DIR . GALLERIES_DIR_NAME . '/' . $datei . '/texte.conf');
            } else {
                newConf(BASE_DIR . GALLERIES_DIR_NAME . '/' . $datei . "/texte.conf.php");
            }
            if (is_file(BASE_DIR . GALLERIES_DIR_NAME . '/' . $datei . '/texte.conf.php')) {
                $tmp_conf = new Properties(BASE_DIR . GALLERIES_DIR_NAME . '/' . $datei . "/texte.conf.php");
            }
            $update_text = array();
            foreach (getDirAsArray(BASE_DIR . GALLERIES_DIR_NAME . '/' . $datei, "file", "none") as $img) {
                if ($img == 'texte.conf') {
                    continue;
                }
                if (false !== ($newname = isUpdateFileName($img, "file", true))) {
                    $status = updateRename($img, $newname, BASE_DIR . GALLERIES_DIR_NAME . "/" . $datei . "/");
                    if ($status) {
                        $newname = $status;
                    }
                    if ($tmp_conf !== false and $tmp_conf->keyExists($img)) {
                        $tmp_conf->set($newname, toUtf($tmp_conf->get($img)));
                        $tmp_conf->delete($img);
                    }
                    $update_page_files[$img] = $newname;
                    if (is_file(BASE_DIR . GALLERIES_DIR_NAME . "/" . $datei . "/" . PREVIEW_DIR_NAME . "/" . $img)) {
                        updateRename($img, $newname, BASE_DIR . GALLERIES_DIR_NAME . "/" . $datei . "/" . PREVIEW_DIR_NAME . "/");
                    }
                }
            }
            unset($tmp_conf);
            if (false !== ($newname = isUpdateFileName($datei, false, true))) {
                updateRename($datei, $newname, BASE_DIR . GALLERIES_DIR_NAME . "/");
            }
        }
    }
    if (is_dir(BASE_DIR . 'kategorien')) {
        $sort_array = array();
        $cats = getDirAsArray(BASE_DIR . CONTENT_DIR_NAME, "dir", "sort");
        $cats = sort_cat_page($cats, BASE_DIR . CONTENT_DIR_NAME, "dir");
        foreach ($cats as $cat) {
            #echo $cat."<br />\n";
            if (false !== ($newname = isUpdateFileName($cat, "catpage", true))) {
                updateRename($cat, $newname, BASE_DIR . CONTENT_DIR_NAME . "/");
                $cat = $newname;
            }
            $sort_array[$cat] = "null";
            if (substr($cat, -EXT_LENGTH) == EXT_LINK) {
                continue;
            }
            $sort_array[$cat] = array();
            $pages = getDirAsArray(BASE_DIR . CONTENT_DIR_NAME . '/' . $cat, "file", "sort");
            $pages = sort_cat_page($pages, BASE_DIR . CONTENT_DIR_NAME . '/' . $cat, "file");
            foreach ($pages as $page) {
                if (false !== ($newname = isUpdateFileName($page, "catpage", true))) {
                    updateRename($page, $newname, BASE_DIR . CONTENT_DIR_NAME . "/" . $cat . "/");
                    $page = $newname;
                }
                $sort_array[$cat][$page] = "null";
            }
            if (is_dir(BASE_DIR . CONTENT_DIR_NAME . '/' . $cat . '/' . CONTENT_FILES_DIR_NAME)) {
                foreach (getDirAsArray(BASE_DIR . CONTENT_DIR_NAME . '/' . $cat . '/' . CONTENT_FILES_DIR_NAME, "file", "none") as $file) {
                    if (false !== ($newname = isUpdateFileName($file, "file", true))) {
                        $status = updateRename($file, $newname, BASE_DIR . CONTENT_DIR_NAME . "/" . $cat . "/" . CONTENT_FILES_DIR_NAME . "/");
                        if ($status) {
                            $newname = $status;
                        }
                        $tmp_file = cleanUploadFile(changeMoziloOldSpecialChars($file, false));
                        $update_page_files[rawurldecode($cat)][$tmp_file] = $newname;
                    }
                }
            }
        }
        $sort_array = var_export($sort_array, true);
//.........这里部分代码省略.........
开发者ID:Novo1987,项目名称:mozilo2.0,代码行数:101,代码来源:update.php


注:本文中的Properties::keyExists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。