public function uninstall() { $path = PATH_PLUGINS_DB . $this->dir_name; $files = Filesystem::ls($path . '/', '*', '*'); foreach ($files as $file) { unlink($path . '/' . $file); } return rmdir($path); }
require PATH_HELPERS . 'validation.class.php'; // ===================================================================== // VARIABLES // ===================================================================== $permissions_dir = 0755; $php_modules = array(); $installation_complete = false; $dependencies = true; $domain = getenv('HTTP_HOST'); $base_path = dirname(getenv('SCRIPT_NAME')); if ($base_path != '/') { $base_path .= '/'; } $blog_address = 'http://' . $domain . $base_path; $languages = array(); $files = Filesystem::ls(PATH_LANGUAGES, '*', 'bit', false, false, false); foreach ($files as $file) { include PATH_LANGUAGES . $file; $iso = basename($file, '.bit'); $languages[$iso] = $_LANG_CONFIG['DATA']['native']; } // ============================================================================ // SYSTEM // ============================================================================ // PHP MODULES if (function_exists('get_loaded_extensions')) { $php_modules = get_loaded_extensions(); } // WRITING TEST // Try to give permissions to the directory content if (!file_exists('content')) {
private function set_files_by_category($id_cat) { $this->files = Filesystem::ls(PATH_POSTS, '*.*.' . $id_cat . '.*.NULL.*.*.*.*.*.*', 'xml', false, false, true); $this->files_count = count($this->files); }
private function set_files_by_draft() { $this->files = Filesystem::ls(PATH_PAGES, '*.*.*.draft.*', 'xml', false, false, true); $this->files_count = count($this->files); }
public function get_post_count($id) { return count(Filesystem::ls(PATH_POSTS, '*.*.' . $id . '.*.*.*.*.*.*.*.*', 'xml', false, false, false)); }
private function set_files_by_post($id_post, $type = 'NULL') { $this->files = Filesystem::ls(PATH_COMMENTS, '*.' . $id_post . '.*.' . $type . '.*.*.*.*.*.*', 'xml', false, true, true); $this->files_count = count($this->files); }
$children->attributes()->slug = utf8_encode($slug); // Position @$children->addAttribute('position', ''); $children->attributes()->position = utf8_encode($position); $position++; } $obj->asXml(FILE_XML_CATEGORIES); echo Html::p(array('class' => 'pass', 'content' => 'Categories updated...')); // ===================================================== // Uninstall plugins // ===================================================== $plugins = array('last_posts'); foreach ($plugins as $plugin) { $path = PATH_PLUGINS_DB . $plugin; if (file_exists($path . '/db.xml')) { $files = Filesystem::ls($path . '/', '*', '*'); foreach ($files as $file) { unlink($path . '/' . $file); } rmdir($path); echo Html::p(array('class' => 'pass', 'content' => 'Plugin ' . $plugin . ' uninstalled, plugin deprecated.')); } } ?> </section> <footer> <p><a href="http://nibbleblog.com">Nibbleblog <?php echo NIBBLEBLOG_VERSION; ?> "<?php
public function get_themes() { $tmp_array = array(); $files = Filesystem::ls(PATH_THEMES, '*', 'bit', true, false, false); return $files; }