]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Normalized function names
authorsembrestels <sembrestels@riseup.net>
Thu, 13 Oct 2011 09:05:53 +0000 (11:05 +0200)
committersembrestels <sembrestels@riseup.net>
Thu, 13 Oct 2011 09:05:53 +0000 (11:05 +0200)
lib/dokuwiki.php
start.php

index 8084508fa9713d6b56e5b20f11aff53f997538b6..7ae95000dbf6b7b041516f1b5e72b9e9d9b0595f 100644 (file)
@@ -34,13 +34,13 @@ function current_dokuwiki_entity($create = true) {
        }
 }
 
-function elggdoku_recurse_copy($src,$dst) {
+function dokuwiki_recurse_copy($src,$dst) {
        $dir = opendir($src);
        @mkdir($dst);
        while(false !== ( $file = readdir($dir)) ) {
        if (( $file != '.' ) && ( $file != '..' )) {
                if ( is_dir($src . '/' . $file) ) {
-               elggdoku_recurse_copy($src . '/' . $file,$dst . '/' . $file);
+               dokuwiki_recurse_copy($src . '/' . $file,$dst . '/' . $file);
                }
                else {
                copy($src . '/' . $file,$dst . '/' . $file);
@@ -50,12 +50,12 @@ function elggdoku_recurse_copy($src,$dst) {
        closedir($dir);
 } 
 
-function elggdokuwiki_create_datafolder($path) {
+function dokuwiki_create_datafolder($path) {
        if (is_dir($path)) // if it exists must be already created
                return;
        mkdir($path, 0700, true);
        $orig = elgg_get_plugins_path().'dokuwiki/lib/dokuwiki/data';
-       elggdoku_recurse_copy($orig, $path);
+       dokuwiki_recurse_copy($orig, $path);
        
 }
        
index 2079be90e8335bd3fbbca16d4eda938f0d917ee3..0621195bae9c7f6e580f81804afd469245732aef 100644 (file)
--- a/start.php
+++ b/start.php
@@ -16,8 +16,8 @@ function dokuwiki_init(){
        elgg_register_library('elgg:dokuwiki', elgg_get_plugins_path().'dokuwiki/lib/dokuwiki.php');
        
        elgg_register_entity_type('object','dokuwiki');
-       elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'elggdokuwiki_icon_hook');
-       elgg_register_entity_url_handler('object', 'dokuwiki', 'elggdokuwiki_url');
+       elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'dokuwiki_icon_hook');
+       elgg_register_entity_url_handler('object', 'dokuwiki', 'dokuwiki_url');
 
        // add block link to
        elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'dokuwiki_owner_block_menu');
@@ -102,7 +102,7 @@ function dokuwiki_init(){
                define('DOKU_MEDIA', elgg_get_site_url().'mod/dokuwiki/lib/dokuwiki/');
                define('DOKU_CONF', $dokuwiki_path."conf/");
 
-               elggdokuwiki_create_datafolder($data_path);
+               dokuwiki_create_datafolder($data_path);
                define('DOKU_ELGGDATA',$data_path);
                if (empty($page) || (count($page)==1 && $page[0] == 'acl')) {
                        $page = array('doku.php');
@@ -153,7 +153,7 @@ function dokuwiki_init(){
                return $return;
        }
 
-       function elggdokuwiki_icon_hook($hook, $entity_type, $returnvalue, $params) {
+       function dokuwiki_icon_hook($hook, $entity_type, $returnvalue, $params) {
                if ($hook == 'entity:icon:url' && $params['entity']->getSubtype() == 'dokuwiki') {
                        $owner = get_entity($params['entity']->container_guid);
                        if ($owner)
@@ -162,7 +162,7 @@ function dokuwiki_init(){
                return $returnvalue;
        }
 
-       function elggdokuwiki_url($entity) {
+       function dokuwiki_url($entity) {
                return elgg_get_site_url() . "dokuwiki/".$entity->container_guid;
        }