diff options
| author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-10 22:05:49 +0000 | 
|---|---|---|
| committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-10 22:05:49 +0000 | 
| commit | adae1958a95d7e801de91d673e927cac348236d9 (patch) | |
| tree | deb60ecca44c95abc5301b0d64bcd08585e85798 /mod/file/start.php | |
| parent | ea14bfe87eda3af8e8002c64ad909cf592d7fe76 (diff) | |
| download | elgg-adae1958a95d7e801de91d673e927cac348236d9.tar.gz elgg-adae1958a95d7e801de91d673e927cac348236d9.tar.bz2 | |
Fixes #2228: Major cleanup of urls -- remove leading pg/ and trailing / from most urls in core and plugins
git-svn-id: http://code.elgg.org/elgg/trunk@8653 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/start.php')
| -rw-r--r-- | mod/file/start.php | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/mod/file/start.php b/mod/file/start.php index c2f445d5d..f7642c166 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -16,7 +16,7 @@ function file_init() {  	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'); +	$item = new ElggMenuItem('file', elgg_echo('file'), 'file/all');  	elgg_register_menu_item('site', $item);  	// Extend CSS @@ -67,13 +67,13 @@ function file_init() {  /**   * Dispatches file pages.   * URLs take the form of - *  All files:       pg/file/all - *  User's files:    pg/file/owner/<username> - *  Friends' files:  pg/file/friends/<username> - *  View file:       pg/file/view/<guid>/<title> - *  New file:        pg/file/add/<guid> - *  Edit file:       pg/file/edit/<guid> - *  Group files:     pg/file/group/<guid>/owner + *  All files:       file/all + *  User's files:    file/owner/<username> + *  Friends' files:  file/friends/<username> + *  View file:       file/view/<guid>/<title> + *  New file:        file/add/<guid> + *  Edit file:       file/edit/<guid> + *  Group files:     file/group/<guid>/owner   *   * Title is ignored   * @@ -132,7 +132,7 @@ function file_notify_message($hook, $entity_type, $returnvalue, $params) {  	if (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'file')) {  		$descr = $entity->description;  		$title = $entity->title; -		$url = elgg_get_site_url() . "pg/view/" . $entity->guid; +		$url = elgg_get_site_url() . "view/" . $entity->guid;  		$owner = $entity->getOwnerEntity();  		return $owner->name . ' ' . elgg_echo("file:via") . ': ' . $entity->title . "\n\n" . $descr . "\n\n" . $entity->getURL();  	} @@ -144,12 +144,12 @@ function file_notify_message($hook, $entity_type, $returnvalue, $params) {   */  function file_owner_block_menu($hook, $type, $return, $params) {  	if (elgg_instanceof($params['entity'], 'user')) { -		$url = "pg/file/owner/{$params['entity']->username}"; +		$url = "file/owner/{$params['entity']->username}";  		$item = new ElggMenuItem('file', elgg_echo('file'), $url);  		$return[] = $item;  	} else {  		if ($params['entity']->files_enable != "no") { -			$url = "pg/file/group/{$params['entity']->guid}/owner"; +			$url = "file/group/{$params['entity']->guid}/owner";  			$item = new ElggMenuItem('file', elgg_echo('file:group'), $url);  			$return[] = $item;  		} @@ -261,7 +261,7 @@ function get_filetype_cloud($owner_guid = "", $friends = false) {  function file_url_override($entity) {  	$title = $entity->title;  	$title = elgg_get_friendly_title($title); -	return "pg/file/view/" . $entity->getGUID() . "/" . $title; +	return "file/view/" . $entity->getGUID() . "/" . $title;  }  /** | 
