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


PHP Path::combine方法代码示例

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


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

示例1: removeAll

 function removeAll($removeAttachments = true)
 {
     global $database;
     $blogid = getBlogId();
     POD::query("UPDATE {$database['prefix']}BlogStatistics SET visits = 0 WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}DailyStatistics WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Categories WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Attachments WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Comments WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RemoteResponses WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RemoteResponseLogs WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Entries WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Links WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Filters WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RefererLogs WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RefererStatistics WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Plugins WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedStarred WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedReads WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedGroupRelations WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedGroups WHERE blogid = {$blogid}");
     if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml")) {
         unlink(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml");
     }
     if ($removeAttachments) {
         Path::removeFiles(Path::combine(ROOT, 'attach', $blogid));
     }
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:29,代码来源:Textcube.Data.php

示例2: createSubdirectory

 /**
  * @param $name
  * @return Directory|DirectoryEntry
  */
 public function createSubdirectory($name)
 {
     $dir = new Directory(Path::combine($this->path, $name));
     if (!$dir->isExists()) {
         mkdir($dir->getPhysicalPath(), BX_DIR_PERMISSIONS, true);
     }
     return $dir;
 }
开发者ID:spas-viktor,项目名称:books,代码行数:12,代码来源:directory.php

示例3: vue

 public static function vue($chemin, $vue = "normal")
 {
     if ($vue == "normal") {
         $ret = '';
         if (Permissions::vérifier_permission($chemin, "set_prop", Authentification::get_utilisateur())) {
             $ret .= '<form class="galerie infos" method="post" action="' . $chemin->get_url() . '">';
             $ret .= '<h2><input type="text" name="titre" value="' . Stockage::get_prop($chemin, "titre") . '" /></h2>';
             $ret .= formulaire_édition_texte_enrichi(Stockage::get_prop($chemin, "description"), "description");
             $ret .= '<p><input type="submit" value="appliquer" /></p>';
             $ret .= '</form>';
         } else {
             $ret .= '<h2>' . Stockage::get_prop($chemin, "titre") . '</h2>';
             $ret .= '<p class="galerie index description affichage">' . Stockage::get_prop($chemin, "description") . '</p>';
         }
         $ret .= '<div class="galerie photos index">';
         $ret .= '<ul>';
         foreach (Stockage::liste_enfants($chemin) as $k) {
             $mini = Modules::vue($k, 'miniature');
             $ret .= '<li>';
             $ret .= '<a href="' . $k->get_url() . '">';
             // TODO : escape l'url !
             $ret .= '<span class="miniature">';
             $ret .= $mini->contenu;
             // TODO : escape l'url !
             $ret .= '</span>';
             $ret .= '<span class="titre">';
             $ret .= $mini->titre;
             $ret .= '</span>';
             $ret .= '</a>';
             $ret .= '</li>';
         }
         if (Permissions::vérifier_permission($chemin, "nouvelle_page", Authentification::get_utilisateur())) {
             $ret .= '<li>';
             $ret .= '<div class="miniature">';
             $ret .= '<img alt="nouvelle période" src="' . $chemin->get_url("?vue=image_nouvelle_periode") . '" />';
             $ret .= '</div>';
             $ret .= '<div class="titre">';
             $ret .= '<form class="galerie nouvelle_page" method="post" action="' . $chemin->get_url() . '">';
             $ret .= '<p>';
             $ret .= '<input type="hidden" name="action" value="nouvelle_page"/>';
             $ret .= '<input type="submit" value="Nouvelle période"/>';
             $ret .= '</p>';
             $ret .= '</form>';
             $ret .= '</div>';
             $ret .= '</li>';
         }
         $ret .= '</ul>';
         $ret .= '<div class="clearboth"></div>';
         $ret .= '</div>';
         return new Page($ret, Stockage::get_prop($chemin, "titre"));
     } else {
         if ($vue == "image_nouvelle_periode") {
             // Houlàlà ça sent le hack pas beau !
             return new Page(Path::combine(Config::get("chemin_base"), "/code/site/nouvelle_image.jpg"), null, "sendfile");
         }
     }
 }
开发者ID:jsmaniac,项目名称:2010-moteur-site-simple,代码行数:57,代码来源:galerie-index.php

示例4: removeAll

 function removeAll($removeAttachments = true)
 {
     global $database;
     $blogid = getBlogId();
     $tags = POD::queryColumn("SELECT DISTINCT tag FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
     POD::query("UPDATE {$database['prefix']}BlogStatistics SET visits = 0 WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}DailyStatistics WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Categories WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Attachments WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Comments WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}CommentsNotified WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RemoteResponses WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RemoteResponseLogs WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Entries WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}LinkCategories WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Links WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RefererLogs WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}RefererStatistics WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}Plugins WHERE blogid = {$blogid}");
     //POD::query("DELETE FROM {$database['prefix']}UserSettings WHERE user = $blogid");
     POD::query("DELETE FROM {$database['prefix']}Filters WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedStarred WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedReads WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedGroupRelations WHERE blogid = {$blogid}");
     POD::query("DELETE FROM {$database['prefix']}FeedGroups WHERE blogid = {$blogid} AND id <> 0");
     if (count($tags) > 0) {
         $tagliststr = implode(', ', $tags);
         $nottargets = POD::queryColumn("SELECT DISTINCT tag FROM {$database['prefix']}TagRelations WHERE tag in ( {$tagliststr} )");
         if (count($nottargets) > 0) {
             $nottargetstr = implode(', ', $nottargets);
             POD::execute("DELETE FROM {$database['prefix']}Tags WHERE id IN ( {$tagliststr} ) AND id NOT IN ( {$nottargetstr} )");
         } else {
             POD::execute("DELETE FROM {$database['prefix']}Tags WHERE id IN ( {$tagliststr} ) ");
         }
     }
     if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml")) {
         unlink(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml");
     }
     if ($removeAttachments) {
         Path::removeFiles(Path::combine(ROOT, 'attach', $blogid));
         POD::query("UPDATE {$database['prefix']}BlogSettings SET logo = '' WHERE blogid = {$blogid}");
     }
 }
开发者ID:ragi79,项目名称:Textcube,代码行数:44,代码来源:Textcube.Data.DataMaintenance.php

示例5: getInfosHelper

 private function getInfosHelper($currentPath, $infoKind, $searchOptions, &$infos)
 {
     $paths = array_diff(scandir($currentPath), array('..', '.'));
     foreach ($paths as $path) {
         $path = Path::combine($currentPath, $path);
         if (Path::isDir($path)) {
             if (($infoKind & self::DIRECTORY) != 0) {
                 $directoryInfo = new DirectoryInfo($path);
                 array_push($infos, $directoryInfo);
             }
             if ($searchOptions === self::ALL_DIRECTORIES) {
                 $this->getInfosHelper($path, $infoKind, $searchOptions, $infos);
             }
         } else {
             if (($infoKind & self::FILE) != 0) {
                 $fileInfo = new FileInfo($path);
                 array_push($infos, $fileInfo);
             }
         }
     }
 }
开发者ID:vbessonov,项目名称:fsrapi,代码行数:21,代码来源:DirectoryInfo.php

示例6: removeBlog

function removeBlog($blogid)
{
    $pool = DBModel::getInstance();
    $ctx = Model_Context::getInstance();
    if (Setting::getServiceSetting("defaultBlogId", 1, true) == $blogid) {
        return false;
    }
    $targets = array('Attachments', 'BlogSettings', 'BlogStatistics', 'Categories', 'Comments', 'CommentsNotified', 'CommentsNotifiedQueue', 'DailyStatistics', 'Entries', 'EntriesArchive', 'FeedGroups', 'FeedReads', 'FeedStarred', 'FeedSettings', 'Filters', 'Links', 'LinkCategories', 'PageCacheLog', 'Plugins', 'RefererLogs', 'RefererStatistics', 'RemoteResponses', 'RemoteResponseLogs', 'SkinSettings', 'TagRelations', 'Privileges', 'XMLRPCPingSettings');
    //Clear Tables
    foreach ($targets as $t) {
        $pool->reset($t);
        $pool->setQualifier('blogid', 'eq', $blogid);
        $pool->delete();
    }
    //Delete Tags
    $tags = POD::queryColumn("SELECT DISTINCT tag FROM " . $ctx->getProperty('database.prefix') . "TagRelations WHERE blogid = {$blogid}");
    if (count($tags) > 0) {
        $tagliststr = implode(', ', $tags);
        // Tag id used at deleted blog.
        $nottargets = POD::queryColumn("SELECT DISTINCT tag FROM " . $ctx->getProperty('database.prefix') . "TagRelations WHERE tag in ( {$tagliststr} )");
        // Tag id used at other blogs.
        if (count($nottargets) > 0) {
            $nottargetstr = implode(', ', $nottargets);
            POD::execute("DELETE FROM " . $ctx->getProperty('database.prefix') . "Tags WHERE id IN ( {$tagliststr} ) AND id NOT IN ( {$nottargetstr} )");
        } else {
            POD::execute("DELETE FROM " . $ctx->getProperty('database.prefix') . "Tags WHERE id IN ( {$tagliststr} ) ");
        }
    }
    //Delete Feeds
    $feeds = POD::queryColumn("SELECT DISTINCT feeds FROM " . $ctx->getProperty('database.prefix') . "FeedGroupRelations WHERE blogid = {$blogid}");
    if (count($feeds) > 0) {
        foreach ($feeds as $feedId) {
            deleteFeed($blogid, $feedId);
        }
    }
    //Clear Plugin Database
    // TODO : encapsulate with 'value'
    $query = "SELECT name, value FROM " . $ctx->getProperty('database.prefix') . "ServiceSettings WHERE name like 'Database\\_%'";
    $plugintablesraw = POD::queryAll($query);
    foreach ($plugintablesraw as $table) {
        $dbname = $ctx->getProperty('database.prefix') . substr($table['name'], 9);
        POD::execute("DELETE FROM " . $ctx->getProperty('database.prefix') . "{$dbname} WHERE blogid = {$blogid}");
    }
    //Clear RSS Cache
    if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml")) {
        unlink(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml");
    }
    //Delete Attachments
    Path::removeFiles(Path::combine(ROOT, 'attach', $blogid));
    return true;
}
开发者ID:ragi79,项目名称:Textcube,代码行数:51,代码来源:blog.blogSetting.php

示例7: get_fs_public

 public function get_fs_public()
 {
     return Path::combine(Config::get("chemin_base_public"), $this->get());
 }
开发者ID:jsmaniac,项目名称:2010-moteur-site-simple,代码行数:4,代码来源:chemin.php

示例8: removeBlog

function removeBlog($blogid)
{
    $pool = DBModel::getInstance();
    $context = Model_Context::getInstance();
    if (Setting::getServiceSetting("defaultBlogId", 1, true) == $blogid) {
        return false;
    }
    $targets = array('Attachments', 'BlogSettings', 'BlogStatistics', 'Categories', 'Comments', 'CommentsNotified', 'CommentsNotifiedQueue', 'DailyStatistics', 'Entries', 'EntriesArchive', 'FeedGroups', 'FeedReads', 'FeedStarred', 'FeedSettings', 'Filters', 'Links', 'LinkCategories', 'PageCacheLog', 'Plugins', 'RefererLogs', 'RefererStatistics', 'RemoteResponses', 'RemoteResponseLogs', 'SkinSettings', 'TagRelations', 'Privileges', 'XMLRPCPingSettings');
    //Clear Tables
    foreach ($targets as $t) {
        $pool->reset($t);
        $pool->setQualifier('blogid', 'eq', $blogid);
        $pool->delete();
    }
    //Delete Tags
    $pool->reset("TagRelations");
    $pool->setQualifier("blogid", "eq", $blogid);
    $tags = $pool->getColumn("tag", "DISTINCT");
    if (count($tags) > 0) {
        $pool->reset("TagRelations");
        // Tag id used at deleted blog.
        $pool->setQualifier("tag", "hasoneof", $tags);
        $nottargets = $pool->getColumn("tag", "DISTINCT");
        // Tag id used at other blogs.
        if (count($nottargets) > 0) {
            $pool->reset("Tags");
            $pool->setQualifier("id", "hasoneof", $tags);
            $pool->setQualifier("id", "hasnoneof", $nottargets);
            $pool->delete();
        } else {
            $pool->reset("Tags");
            $pool->setQualifier("id", "hasoneof", $tags);
            $pool->delete();
        }
    }
    //Delete Feeds
    $pool->reset("FeedGroupRelations");
    $pool->setQualifier("blogid", "eq", $blogid);
    $feeds = $pool->getColumn("feeds", "DISTINCT");
    if (count($feeds) > 0) {
        foreach ($feeds as $feedId) {
            deleteFeed($blogid, $feedId);
        }
    }
    //Clear Plugin Database
    // TODO : encapsulate with 'value'
    $pool->reset("ServiceSettings");
    $pool->setQualifier("name", "like", "Database_");
    $plugintablesraw = $pool->getAll();
    foreach ($plugintablesraw as $table) {
        $pool->reset(substr($table['name'], 9));
        $pool->setQualifier("blogid", "eq", $blogid);
        $pool->delete();
    }
    //Clear RSS Cache
    if (file_exists(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml")) {
        unlink(__TEXTCUBE_CACHE_DIR__ . "/rss/{$blogid}.xml");
    }
    //Delete Attachments
    Path::removeFiles(Path::combine(ROOT, 'attach', $blogid));
    return true;
}
开发者ID:webhacking,项目名称:Textcube,代码行数:62,代码来源:blogSetting.php

示例9: importer

function importer($path, $node, $line)
{
    global $blogid, $migrational, $items, $item;
    switch ($path) {
        case '/blog/setting':
            setProgress($item++ / $items * 100, _t('블로그 설정을 복원하고 있습니다.'));
            $setting = new BlogSetting();
            if (isset($node['title'][0]['.value'])) {
                $setting->title = $node['title'][0]['.value'];
            }
            if (isset($node['description'][0]['.value'])) {
                $setting->description = $node['description'][0]['.value'];
            }
            if (isset($node['banner'][0]['name'][0]['.value'])) {
                $setting->banner = $node['banner'][0]['name'][0]['.value'];
            }
            if (isset($node['useSloganOnPost'][0]['.value'])) {
                $setting->useSloganOnPost = $node['useSloganOnPost'][0]['.value'];
            }
            if (isset($node['postsOnPage'][0]['.value'])) {
                $setting->postsOnPage = $node['postsOnPage'][0]['.value'];
            }
            if (isset($node['postsOnList'][0]['.value'])) {
                $setting->postsOnList = $node['postsOnList'][0]['.value'];
            }
            if (isset($node['postsOnFeed'][0]['.value'])) {
                $setting->postsOnFeed = $node['postsOnFeed'][0]['.value'];
            }
            if (isset($node['publishWholeOnFeed'][0]['.value'])) {
                $setting->publishWholeOnFeed = $node['publishWholeOnFeed'][0]['.value'];
            }
            if (isset($node['acceptGuestComment'][0]['.value'])) {
                $setting->acceptGuestComment = $node['acceptGuestComment'][0]['.value'];
            }
            if (isset($node['acceptcommentOnGuestComment'][0]['.value'])) {
                $setting->acceptcommentOnGuestComment = $node['acceptcommentOnGuestComment'][0]['.value'];
            }
            if (isset($node['language'][0]['.value'])) {
                $setting->language = $node['language'][0]['.value'];
            }
            if (isset($node['timezone'][0]['.value'])) {
                $setting->timezone = $node['timezone'][0]['.value'];
            }
            if (!$setting->save()) {
                user_error(__LINE__ . $setting->error);
            }
            if (!empty($setting->banner) && !empty($node['banner'][0]['content'][0]['.stream'])) {
                Attachment::confirmFolder();
                Utils_Base64Stream::decode($node['banner'][0]['content'][0]['.stream'], Path::combine(ROOT, 'attach', $blogid, $setting->banner));
                Attachment::adjustPermission(Path::combine(ROOT, 'attach', $blogid, $setting->banner));
                fclose($node['banner'][0]['content'][0]['.stream']);
                unset($node['banner'][0]['content'][0]['.stream']);
            }
            return true;
        case '/blog/category':
            setProgress($item++ / $items * 100, _t('분류를 복원하고 있습니다.'));
            $category = new Category();
            $category->name = $node['name'][0]['.value'];
            $category->priority = $node['priority'][0]['.value'];
            if (isset($node['root'][0]['.value'])) {
                $category->id = 0;
            }
            if (!$category->add()) {
                user_error(__LINE__ . $category->error);
            }
            if (isset($node['category'])) {
                for ($i = 0; $i < count($node['category']); $i++) {
                    $childCategory = new Category();
                    $childCategory->parent = $category->id;
                    $cursor =& $node['category'][$i];
                    $childCategory->name = $cursor['name'][0]['.value'];
                    $childCategory->priority = $cursor['priority'][0]['.value'];
                    if (!$childCategory->add()) {
                        user_error(__LINE__ . $childCategory->error);
                    }
                }
            }
            return true;
        case '/blog/post':
            setProgress($item++ / $items * 100, _t('글을 복원하고 있습니다.'));
            $post = new Post();
            $post->id = $node['id'][0]['.value'];
            $post->slogan = @$node['.attributes']['slogan'];
            $post->visibility = $node['visibility'][0]['.value'];
            if (isset($node['starred'][0]['.value'])) {
                $post->starred = $node['starred'][0]['.value'];
            } else {
                $post->starred = 0;
            }
            $post->title = $node['title'][0]['.value'];
            $post->content = $node['content'][0]['.value'];
            $post->contentformatter = isset($node['content'][0]['.attributes']['formatter']) ? $node['content'][0]['.attributes']['formatter'] : 'ttml';
            $post->contenteditor = isset($node['content'][0]['.attributes']['editor']) ? $node['content'][0]['.attributes']['editor'] : 'modern';
            $post->location = $node['location'][0]['.value'];
            $post->password = isset($node['password'][0]['.value']) ? $node['password'][0]['.value'] : null;
            $post->acceptcomment = $node['acceptComment'][0]['.value'];
            $post->accepttrackback = $node['acceptTrackback'][0]['.value'];
            $post->published = $node['published'][0]['.value'];
            if (isset($node['longitude'][0]['.value'])) {
                $post->longitude = $node['longitude'][0]['.value'];
//.........这里部分代码省略.........
开发者ID:webhacking,项目名称:Textcube,代码行数:101,代码来源:index.php

示例10: removeBlog

function removeBlog($blogid)
{
    global $database;
    if (getServiceSetting("defaultBlogId", 1) == $blogid) {
        return false;
    }
    $tags = POD::queryColumn("SELECT DISTINCT tag FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
    $feeds = POD::queryColumn("SELECT DISTINCT feeds FROM {$database['prefix']}FeedGroupRelations WHERE blogid = {$blogid}");
    //Clear Tables
    POD::execute("DELETE FROM {$database['prefix']}Attachments WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}BlogSettings WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}BlogStatistics WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}Categories WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}Comments WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}CommentsNotified WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}CommentsNotifiedQueue WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}DailyStatistics WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}Entries WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}EntriesArchive WHERE blogid = {$blogid}");
    //	POD::execute("DELETE FROM {$database['prefix']}FeedGroupRelations WHERE blogid = $blogid");
    POD::execute("DELETE FROM {$database['prefix']}FeedGroups WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}FeedReads WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}FeedStarred WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}FeedSettings WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}Filters WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}Links WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}LinkCategories WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}PageCacheLog WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}Plugins WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}RefererLogs WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}RefererStatistics WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}RemoteResponses WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}RemoteResponseLogs WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}SkinSettings WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}TagRelations WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}Privileges WHERE blogid = {$blogid}");
    POD::execute("DELETE FROM {$database['prefix']}XMLRPCPingSettings WHERE blogid = {$blogid}");
    //Delete Tags
    if (count($tags) > 0) {
        $tagliststr = implode(', ', $tags);
        // Tag id used at deleted blog.
        $nottargets = POD::queryColumn("SELECT DISTINCT tag FROM {$database['prefix']}TagRelations WHERE tag in ( {$tagliststr} )");
        // Tag id used at other blogs.
        if (count($nottargets) > 0) {
            $nottargetstr = implode(', ', $nottargets);
            POD::execute("DELETE FROM {$database['prefix']}Tags WHERE id IN ( {$tagliststr} ) AND id NOT IN ( {$nottargetstr} )");
        } else {
            POD::execute("DELETE FROM {$database['prefix']}Tags WHERE id IN ( {$tagliststr} ) ");
        }
    }
    //Delete Feeds
    if (count($feeds) > 0) {
        foreach ($feeds as $feedId) {
            deleteFeed($blogid, $feedId);
        }
    }
    //Clear Plugin Database
    // TODO : encapsulate with 'value'
    $query = "SELECT name, value FROM {$database['prefix']}ServiceSettings WHERE name like 'Database\\_%'";
    $plugintablesraw = POD::queryAll($query);
    foreach ($plugintablesraw as $table) {
        $dbname = $database['prefix'] . substr($table['name'], 9);
        POD::execute("DELETE FROM {$database['prefix']}{$dbname} WHERE blogid = {$blogid}");
    }
    //Clear RSS Cache
    if (file_exists(ROOT . "/cache/rss/{$blogid}.xml")) {
        unlink(ROOT . "/cache/rss/{$blogid}.xml");
    }
    //Delete Attachments
    Path::removeFiles(Path::combine(ROOT, 'attach', $blogid));
    return true;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:72,代码来源:blog.blogSetting.php

示例11: removeFiles

 static function removeFiles($directory)
 {
     if (!is_dir($directory)) {
         return false;
     }
     $dir = dir($directory);
     while (($file = $dir->read()) !== false) {
         if (is_file(Path::combine($directory, $file))) {
             unlink(Path::combine($directory, $file));
         }
     }
     return true;
 }
开发者ID:ni5am,项目名称:Textcube,代码行数:13,代码来源:10-CoreClasses.php

示例12: realpath

<?php

// ========== CONFIGURATION =========
// Addresse de courriel de l'administrateur.
Config::set('courriel_admin', "jahvascriptmaniac+github@free.fr");
// URL de la racine du site. Ex: http://www.monsite.com/cms/
// Doit se terminer par '/'.
Config::set('url_base', "http://127.0.0.1/2010-moteur-site-simple/");
// Chemin absolu vers le dossier '__cms__'.
// dirname(__FILE__) peut retourner un chemin relatif (PHP < 4.0.2),
// donc utiliser realpath si on s'en sert.
Config::set('chemin_base', realpath(dirname(__FILE__)));
// Chemin vers le stockage interne des données.
// En général, c'est le chemin ..../__cms__/modele
Config::set('chemin_base_stockage', Path::combine(Config::get("chemin_base"), "donnees"));
// Chemin vers la partie visible du site.
// En général, c'est le chemin vers le dossier contenant __cms__
Config::set('chemin_base_public', Path::combine(Config::get("chemin_base"), "/.."));
// ======== FIN CONFIGURATION =======
开发者ID:jsmaniac,项目名称:2010-moteur-site-simple,代码行数:19,代码来源:config.php

示例13: readMercurial

 /**
  * @return null|string
  */
 private function readMercurial()
 {
     $hgDir = Path::combine($this->repositoryRoot, '.hg');
     if (!is_dir($hgDir) || !OS::hasBinary('hg')) {
         return null;
     }
     $hg = Exec::create('hg', '--repository', $this->repositoryRoot);
     // Removes everything but the tag if distance is zero.
     $hg->run('log', '-r', '.', '--template', '{latesttag}{sub(\'^-0-m.*\', \'\', \'-{latesttagdistance}-m{node|short}\')}');
     $tag = Dot::get($hg->getOutput(), 0);
     // Actual null if no lines were returned or `hg log` returned actual "null".
     // Either way, need to fall back to the revision id.
     if ($tag === null || $tag === 'null' || Strings::startsWith($tag, 'null-')) {
         $hg->run('id', '-i');
         $tag = Dot::get($hg->getOutput(), 0);
         // Remove 'dirty' plus from revision id
         $tag = rtrim($tag, '+');
     }
     $summary = $hg->run('summary')->getOutput();
     $isDirty = 0 === count(array_filter($summary, function ($line) {
         return preg_match('/^commit: .*\\(clean\\)$/', $line) === 1;
     }));
     if ($isDirty) {
         $tag .= '-dirty';
     }
     return $tag;
 }
开发者ID:nochso,项目名称:omni,代码行数:30,代码来源:VcsVersionInfo.php

示例14: fichier_prop

 private static function fichier_prop($chemin, $prop)
 {
     return Path::combine($chemin->get_fs_stockage(), '__prop__' . $prop);
 }
开发者ID:jsmaniac,项目名称:2010-moteur-site-simple,代码行数:4,代码来源:stockage.php


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