]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
changed elgg_get_plugin_path() to elgg_get_plugins_path()
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 3 Feb 2011 12:10:45 +0000 (12:10 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 3 Feb 2011 12:10:45 +0000 (12:10 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8001 36083f99-b078-4883-b0ff-0f9b5a30f544

23 files changed:
engine/classes/ElggPlugin.php
engine/classes/ElggPluginPackage.php
engine/lib/configuration.php
engine/lib/plugins.php
mod/blog/start.php
mod/categories/start.php
mod/defaultwidgets/start.php
mod/developers/start.php
mod/diagnostics/start.php
mod/file/actions/file/download.php
mod/file/start.php
mod/groups/icon.php
mod/groups/start.php
mod/invitefriends/start.php
mod/messageboard/start.php
mod/messages/start.php
mod/notifications/start.php
mod/pages/start.php
mod/reportedcontent/start.php
mod/sitepages/start.php
mod/thewire/start.php
mod/twitterservice/start.php
views/default/admin/components/plugin.php

index b6cb792fbcc4c3ff950466d21b4862848f232499..5782ac4dd91662ce4e6ed73a20a680ef6e8d190e 100644 (file)
@@ -50,7 +50,7 @@ class ElggPlugin extends ElggObject {
                        parent::__construct($plugin);
                        $this->path = get_config('plugins_path') . $this->getID();
                } else {
-                       $plugin_path = elgg_get_plugin_path();
+                       $plugin_path = elgg_get_plugins_path();
 
                        // not a full path, so assume an id
                        // use the default path
index 74c8bd0204cf07b3302922f40396249ce52e0168..d7392132cc2c928939ceec86e60615b5ed0bb194 100644 (file)
@@ -93,7 +93,7 @@ class ElggPluginPackage {
         * @throws PluginException
         */
        public function __construct($plugin, $validate = true) {
-               $plugin_path = elgg_get_plugin_path();
+               $plugin_path = elgg_get_plugins_path();
                // @todo wanted to avoid another is_dir() call here.
                // should do some profiling to see how much it affects
                if (strpos($plugin, $plugin_path) === 0 || is_dir($plugin)) {
index 3459c52a3195df15ac1860e822717f8197dbf793..1929598963b883c9d551a495684d4c7c384b53e2 100644 (file)
@@ -45,7 +45,7 @@ function elgg_get_site_url($site_guid = 0) {
  * @return string
  * @since 1.8.0
  */
-function elgg_get_plugin_path() {
+function elgg_get_plugins_path() {
        global $CONFIG;
        return $CONFIG->pluginspath;
 }
index c5a34bc81f54591f24527df226727dced0346ce2..783827d27f7dbe42f70d22c751f09c5bc4fd6fed 100644 (file)
@@ -57,7 +57,7 @@ define('ELGG_PLUGIN_INTERNAL_PREFIX', 'elgg:internal:');
  */
 function elgg_get_plugin_ids_in_dir($dir = null) {
        if (!$dir) {
-               $dir = elgg_get_plugin_path();
+               $dir = elgg_get_plugins_path();
        }
 
        $plugin_idss = array();
@@ -88,7 +88,7 @@ function elgg_get_plugin_ids_in_dir($dir = null) {
  */
 function elgg_generate_plugin_entities() {
        $site = get_config('site');
-       $dir = elgg_get_plugin_path();
+       $dir = elgg_get_plugins_path();
 
        $options = array(
                'type' => 'object',
@@ -254,7 +254,7 @@ function elgg_get_max_plugin_priority() {
 function elgg_load_plugins() {
        global $CONFIG;
 
-       $plugins_path = elgg_get_plugin_path();
+       $plugins_path = elgg_get_plugins_path();
        $start_flags =  ELGG_PLUGIN_INCLUDE_START
                                        | ELGG_PLUGIN_REGISTER_VIEWS
                                        | ELGG_PLUGIN_REGISTER_LANGUAGES
index afedfc4d77e094ad2b3fc60cf852cff643671206..104897bfd91f4b1a04700a431b8fb991f4e52da6 100644 (file)
@@ -19,7 +19,7 @@ elgg_register_event_handler('init', 'system', 'blog_init');
  */
 function blog_init() {
        
-       elgg_register_library('elgg:blog', elgg_get_plugin_path() . 'blog/lib/blog.php');
+       elgg_register_library('elgg:blog', elgg_get_plugins_path() . 'blog/lib/blog.php');
 
        // add a site navigation item
        $item = new ElggMenuItem('blog', elgg_echo('blog:blogs'), 'pg/blog/all');
@@ -59,7 +59,7 @@ function blog_init() {
        elgg_register_widget_type('blog', elgg_echo('blog'), elgg_echo('blog:widget:description'), 'profile');
 
        // register actions
-       $action_path = elgg_get_plugin_path() . 'blog/actions/blog';
+       $action_path = elgg_get_plugins_path() . 'blog/actions/blog';
        elgg_register_action('blog/save', "$action_path/save.php");
        elgg_register_action('blog/auto_save_revision', "$action_path/auto_save_revision.php");
        elgg_register_action('blog/delete', "$action_path/delete.php");
index a904f19ae14cf6aa6017afb8203a4b7bf84411a3..aa460677ada480894a427565fd2ae3e7eadabd6e 100644 (file)
@@ -14,7 +14,7 @@ function categories_init() {
 
        elgg_extend_view('css/screen', 'categories/css');
 
-       $action_base = elgg_get_plugin_path() . 'categories/actions';
+       $action_base = elgg_get_plugins_path() . 'categories/actions';
        elgg_register_action('settings/categories/save', "$action_base/save.php", 'admin');
 
        register_page_handler('categories', 'categories_page_handler');
index acc8951d38f451f753595e1351f0c0fa9df59adc..653ac6fce5a32c75664a492708de759abbdf0c48 100644 (file)
@@ -29,7 +29,7 @@ function defaultwidgets_init() {
                elgg_register_event_handler('validate', 'user', 'defaultwidgets_reset_access');
        }
 
-       $action_dir = elgg_get_plugin_path() . 'defaultwidgets/actions';
+       $action_dir = elgg_get_plugins_path() . 'defaultwidgets/actions';
        elgg_register_action("defaultwidgets/update", "$action_dir/update.php", 'admin');
 
        elgg_register_plugin_hook_handler('permissions_check', 'user', 'defaultwidgets_can_edit');
index 04c83bdded72817d1da23d7271d7b647a9edf9f6..2be3bb0f60788bdf55c43e0181b1df2d65ffdc82 100644 (file)
@@ -8,7 +8,7 @@ elgg_register_event_handler('init', 'system', 'developers_init');
 function developers_init() {
        elgg_register_event_handler('pagesetup', 'system', 'developers_setup_menu');
        
-       $action_base = elgg_get_plugin_path() . 'developers/actions/developers';
+       $action_base = elgg_get_plugins_path() . 'developers/actions/developers';
        elgg_register_action('developers/settings', "$action_base/settings.php", 'admin');
 }
 
index 27893f4eddcccebf55a3ada43950232cd5e71b92..a756c816806b1c1737c10df232786f7bcc7ee85b 100644 (file)
@@ -19,7 +19,7 @@ function diagnostics_init() {
        elgg_add_admin_menu_item('diagnostics', elgg_echo('diagnostics'), 'utilities');
 
        // Register some actions
-       $file = elgg_get_plugin_path() . "diagnostics/actions/download.php";
+       $file = elgg_get_plugins_path() . "diagnostics/actions/download.php";
        elgg_register_action("diagnostics/download", $file, 'admin');
 }
 
index 6768bd4b13adcc67e9babc452515c175c0e7bbe4..d6abb83984d4171fd59db419878e78c702a89ea3 100644 (file)
@@ -6,6 +6,6 @@
  */
 
 // @todo this is here for backwards compatibility (first version of embed plugin?)
-$download_page_handler = elgg_get_plugin_path() . 'file/download.php';
+$download_page_handler = elgg_get_plugins_path() . 'file/download.php';
 
 include $download_page_handler;
index f60de52ecbb070cbae261a3e264ed69c9e0d40a3..4eb67cd3247a75b25e99019a49eea01a0f3f37cb 100644 (file)
@@ -13,7 +13,7 @@ elgg_register_event_handler('init', 'system', 'file_init');
 function file_init() {
 
        // register a library of helper functions
-       elgg_register_library('elgg:file', elgg_get_plugin_path() . 'file/lib/file.php');
+       elgg_register_library('elgg:file', elgg_get_plugins_path() . 'file/lib/file.php');
 
        // Site navigation
        $item = new ElggMenuItem('file', elgg_echo('file'), 'pg/file/all');
@@ -50,7 +50,7 @@ function file_init() {
        elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'file_owner_block_menu');
 
        // Register actions
-       $action_path = elgg_get_plugin_path() . 'file/actions/file';
+       $action_path = elgg_get_plugins_path() . 'file/actions/file';
        elgg_register_action("file/upload", "$action_path/upload.php");
        elgg_register_action("file/delete", "$action_path/delete.php");
        // temporary - see #2010
@@ -85,7 +85,7 @@ function file_page_handler($page) {
                $page[0] = 'all';
        }
 
-       $file_dir = elgg_get_plugin_path() . 'file';
+       $file_dir = elgg_get_plugins_path() . 'file';
 
        $page_type = $page[0];
        switch ($page_type) {
index 59247e9f87e07724d8698102dc0014a566c97279..c72b5f308ecd89c1bd5574c3e716da6fbc44f6c5 100644 (file)
@@ -28,7 +28,7 @@ if ($filehandler->open("read")) {
 }
 
 if (!$success) {
-       $location = elgg_get_plugin_path() . "groups/graphics/default{$size}.jpg";
+       $location = elgg_get_plugins_path() . "groups/graphics/default{$size}.jpg";
        $contents = @file_get_contents($location);
 }
 
index cb062bd46755334b4abca410c12e9e7261355f6b..58c47c30558702dde0f448b8c3759d93dff89fc3 100644 (file)
@@ -15,7 +15,7 @@ elgg_register_event_handler('init', 'system', 'groups_fields_setup', 10000);
  */
 function groups_init() {
 
-       elgg_register_library('elgg:groups', elgg_get_plugin_path() . 'groups/lib/groups.php');
+       elgg_register_library('elgg:groups', elgg_get_plugins_path() . 'groups/lib/groups.php');
 
        // register group entities for search
        register_entity_type('group', '');
@@ -34,7 +34,7 @@ function groups_init() {
        register_page_handler('groupicon', 'groups_icon_handler');
 
        // Register some actions
-       $action_base = elgg_get_plugin_path() . 'groups/actions';
+       $action_base = elgg_get_plugins_path() . 'groups/actions';
        elgg_register_action("groups/edit", "$action_base/edit.php");
        elgg_register_action("groups/delete", "$action_base/delete.php");
        elgg_register_action("groups/join", "$action_base/join.php");
@@ -245,7 +245,7 @@ function groups_icon_handler($page) {
                set_input('size', $page[1]);
        }
        // Include the standard profile index
-       $plugin_dir = elgg_get_plugin_path();
+       $plugin_dir = elgg_get_plugins_path();
        include("$plugin_dir/groups/icon.php");
 }
 
@@ -503,14 +503,14 @@ elgg_register_event_handler('init', 'system', 'discussion_init');
  */
 function discussion_init() {
 
-       elgg_register_library('elgg:discussion', elgg_get_plugin_path() . 'groups/lib/discussion.php');
+       elgg_register_library('elgg:discussion', elgg_get_plugins_path() . 'groups/lib/discussion.php');
 
        register_page_handler('discussion', 'discussion_page_handler');
 
        register_entity_url_handler('discussion_override_topic_url', 'object', 'groupforumtopic');
        //register_extender_url_handler('group_topicpost_url', 'annotation', 'group_topic_post');
 
-       $action_base = elgg_get_plugin_path() . 'groups/actions/discussion';
+       $action_base = elgg_get_plugins_path() . 'groups/actions/discussion';
        elgg_register_action('discussion/save', "$action_base/save.php");
        elgg_register_action('discussion/delete', "$action_base/delete.php");
 
index bd470f144c08ce3f534bc26079ed1bc5b46db19e..f3e4a0baa60a80dcdde33f5a82c99e9be8d5f369 100644 (file)
@@ -10,7 +10,7 @@ elgg_register_event_handler('init', 'system', 'invitefriends_init');
 function invitefriends_init() {
        register_page_handler('invite', 'invitefriends_page_handler');
 
-       elgg_register_action('invitefriends/invite', elgg_get_plugin_path() . 'invitefriends/actions/invite.php');
+       elgg_register_action('invitefriends/invite', elgg_get_plugins_path() . 'invitefriends/actions/invite.php');
 
        $params = array(
                'name' => 'invite',
index 21b640c835ae8be8d10d29168b7b0de70fe1714d..0e587f914774c333a70393aef4dbcaad297f67dc 100644 (file)
@@ -23,7 +23,7 @@ function messageboard_init() {
        elgg_register_widget_type('messageboard', elgg_echo("messageboard:board"), elgg_echo("messageboard:desc"), "profile");
 
        // Register actions
-       $action_path = elgg_get_plugin_path() . 'messageboard/actions';
+       $action_path = elgg_get_plugins_path() . 'messageboard/actions';
        elgg_register_action("messageboard/add", "$action_path/add.php");
        elgg_register_action("messageboard/delete", "$action_path/delete.php");
 }
@@ -41,7 +41,7 @@ function messageboard_page_handler($page) {
        }
 
        // Include the standard messageboard index
-       include(elgg_get_plugin_path() . "messageboard/index.php");
+       include(elgg_get_plugins_path() . "messageboard/index.php");
 }
 
 /**
index ccb92d94f2b4821fe1025089ac9871a080ca7681..a36bbc6216b866cb940a11a9d47d4d8762a5816d 100644 (file)
@@ -12,7 +12,7 @@ elgg_register_event_handler('init', 'system', 'messages_init');
 function messages_init() {
 
        // register a library of helper functions
-       elgg_register_library('elgg:messages', elgg_get_plugin_path() . 'messages/lib/messages.php');
+       elgg_register_library('elgg:messages', elgg_get_plugins_path() . 'messages/lib/messages.php');
 
        // add page menu items
        if (isloggedin()) {
@@ -59,7 +59,7 @@ function messages_init() {
        elgg_register_plugin_hook_handler('container_permissions_check', 'object', 'messages_can_edit_container');
 
        // Register actions
-       $action_path = elgg_get_plugin_path() . 'messages/actions/messages';
+       $action_path = elgg_get_plugins_path() . 'messages/actions/messages';
        elgg_register_action("messages/send", "$action_path/send.php");
        elgg_register_action("messages/delete", "$action_path/delete.php");
        elgg_register_action("messages/process", "$action_path/process.php");
@@ -92,7 +92,7 @@ function messages_page_handler($page) {
                $page[1] = get_loggedin_user()->username;
        }
 
-       $base_dir = elgg_get_plugin_path() . 'messages';
+       $base_dir = elgg_get_plugins_path() . 'messages';
 
        switch ($page[0]) {
                case 'inbox':
index 6f489f94d5280927e5f7aae53c72789dff89a255..00e981f7ba1d282ebb56f526656c3a23fc634237 100644 (file)
@@ -27,7 +27,7 @@ function notifications_plugin_init() {
        elgg_register_event_handler('create', 'friend', 'notifications_update_friend_notify');
        elgg_register_plugin_hook_handler('access:collections:add-user', 'collection', 'notifications_update_collection_notify');
 
-       $actions_base = elgg_get_plugin_path() . 'notifications/actions';
+       $actions_base = elgg_get_plugins_path() . 'notifications/actions';
        elgg_register_action("notificationsettings/save", "$actions_base/save.php");
        elgg_register_action("notificationsettings/groupsave", "$actions_base/groupsave.php");
 }
@@ -44,7 +44,7 @@ function notifications_page_handler($page) {
                $page[0] = 'personal';
        }
 
-       $base = elgg_get_plugin_path() . 'notifications';
+       $base = elgg_get_plugins_path() . 'notifications';
 
        switch ($page[0]) {
                case 'group':
index 678449dc1b5bc8bfa3bb49f349ab4f3bff718f9d..efbf243d6da17555e677420282efe6118d4acec1 100644 (file)
@@ -14,7 +14,7 @@ elgg_register_event_handler('init', 'system', 'pages_init');
 function pages_init() {
 
        // register a library of helper functions
-       elgg_register_library('elgg:pages', elgg_get_plugin_path() . 'pages/lib/pages.php');
+       elgg_register_library('elgg:pages', elgg_get_plugins_path() . 'pages/lib/pages.php');
 
        $item = new ElggMenuItem('pages', elgg_echo('pages'), 'pg/pages/all');
        elgg_register_menu_item('site', $item);
@@ -28,7 +28,7 @@ function pages_init() {
        register_extender_url_handler('pages_revision_url', 'annotation', 'page');
 
        // Register some actions
-       $action_base = elgg_get_plugin_path() . 'pages/actions/pages';
+       $action_base = elgg_get_plugins_path() . 'pages/actions/pages';
        elgg_register_action("pages/edit", "$action_base/edit.php");
        elgg_register_action("pages/editwelcome", "$action_base/editwelcome.php");
        elgg_register_action("pages/delete", "$action_base/delete.php");
@@ -105,7 +105,7 @@ function pages_page_handler($page) {
 
        elgg_push_breadcrumb(elgg_echo('pages'), 'pg/pages/all');
 
-       $base_dir = elgg_get_plugin_path() . 'pages';
+       $base_dir = elgg_get_plugins_path() . 'pages';
 
        $page_type = $page[0];
        switch ($page_type) {
index 4cb5bea12f51b75be09d1718f136914ac2d24ecc..360e868f7d451ef72c83c8c8c81e610a0e17b666 100644 (file)
@@ -36,7 +36,7 @@ function reportedcontent_init() {
                        'admin');
 
        // Register actions
-       $action_path = elgg_get_plugin_path() . "reportedcontent/actions";
+       $action_path = elgg_get_plugins_path() . "reportedcontent/actions";
        elgg_register_action('reportedcontent/add', "$action_path/add.php");
        elgg_register_action('reportedcontent/delete', "$action_path/delete.php", 'admin');
        elgg_register_action('reportedcontent/archive', "$action_path/archive.php", 'admin');
index 5f2a7dc6b3d2447bc34bd8088a2517ec9212d3e7..e2c8065dbfb396f39f71def23f3c46220504614b 100644 (file)
@@ -51,7 +51,7 @@ function sitepages_init() {
        // hook into the walled garden pages
        elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'sitepages_public_pages');
 
-       $action_path = elgg_get_plugin_path() . 'sitepages/actions';
+       $action_path = elgg_get_plugins_path() . 'sitepages/actions';
        elgg_register_action('settings/sitepages/save', "$action_path/edit_settings.php");
        
 }
index 6aba3aff6e320e1ba5187bc783005c95085abfe7..1c984d7927261bb164cb542ca04db45d39a0b73d 100644 (file)
@@ -90,7 +90,7 @@ function rest_wire_post($username, $text) {
                        // Listen to notification events and supply a more useful message for SMS'
                        elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'thewire_notify_message');
 
-                       $action_path = elgg_get_plugin_path() . 'thewire/actions';
+                       $action_path = elgg_get_plugins_path() . 'thewire/actions';
                        elgg_register_action("thewire/add", "$action_path/add.php");
                        elgg_register_action("thewire/delete", "$action_path/delete.php");
                }
index 2b6e7895ffa9e19e984ada149574d01780851ede..14885ffc1c7c05748446e4938d597ba4c180f96e 100644 (file)
@@ -27,7 +27,7 @@ function twitterservice_init() {
                elgg_delete_admin_notice($notice_id);
                
                // require libraries
-               $base = elgg_get_plugin_path() . 'twitterservice';
+               $base = elgg_get_plugins_path() . 'twitterservice';
                require_once "$base/vendors/twitteroauth/twitterOAuth.php";
                require_once "$base/twitterservice_lib.php";
                
index a64fa72163650c69213215433f7026e8fa2da7a6..ff1abee1e956a7b45a6ce555e9e556ed0d6fa071 100644 (file)
@@ -127,7 +127,7 @@ if ($categories) {
 $screenshot_html = '';
 $screenshots = $plugin->manifest->getScreenshots();
 if ($screenshots) {
-       $base_url = elgg_get_plugin_path() . $plugin->getID() . '/';
+       $base_url = elgg_get_plugins_path() . $plugin->getID() . '/';
        $limit = 4;
        foreach ($screenshots as $screenshot) {
                if ($limit <= 0) {