-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.lvimrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# improve-storage-display-name | ||
# Improve Storage Configurations Display Name | ||
|
||
An Invision Community plugin that improves the display name of storage configurations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
$lang = array( | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
$lang = array( | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//<?php | ||
|
||
/* To prevent PHP errors (extending class does not exist) revealing path */ | ||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) | ||
{ | ||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); | ||
exit; | ||
} | ||
|
||
/** | ||
* 1.0.0 Upgrade Code | ||
*/ | ||
class ips_plugins_setup_upg_10000 | ||
{ | ||
/** | ||
* Step 1 | ||
* | ||
* @return true | ||
*/ | ||
public function step1() | ||
{ | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//<?php | ||
|
||
/* To prevent PHP errors (extending class does not exist) revealing path */ | ||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) | ||
{ | ||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); | ||
exit; | ||
} | ||
|
||
/** | ||
* Install Code | ||
*/ | ||
class ips_plugins_setup_install | ||
{ | ||
/** | ||
* Step 1 | ||
* | ||
* @return true | ||
*/ | ||
public function step1() | ||
{ | ||
return true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"10000":"1.0.0"} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//<?php | ||
|
||
/* To prevent PHP errors (extending class does not exist) revealing path */ | ||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) | ||
{ | ||
exit; | ||
} | ||
|
||
class hook77 extends _HOOK_CLASS_ | ||
{ | ||
/** | ||
* Display name | ||
* | ||
* @param array $settings Configuration settings | ||
* @return string | ||
*/ | ||
public static function displayName( $settings ) | ||
{ | ||
if ( ! empty( $settings['bucket_path'] ) ) | ||
{ | ||
$settings['bucket'] .= "/${settings['bucket_path']}"; | ||
} | ||
return parent::displayName( $settings ); | ||
} | ||
} |
Empty file.
70 changes: 70 additions & 0 deletions
70
releases/Improve Storage Configurations Display Name 1.0.0.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<plugin name="Improve Storage Configurations Display Name" version_long="10000" version_human="1.0.0" author="Runar Skaare Tveiten" website="" update_check="https://raw.githubusercontent.com/runar/invision-updates/master/improve-storage-display-name.json"><hooks><hook type="C" class="\IPS\File\Amazon" filename="ipsFileAmazon"><![CDATA[//<?php | ||
/* To prevent PHP errors (extending class does not exist) revealing path */ | ||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) | ||
{ | ||
exit; | ||
} | ||
class hook77 extends _HOOK_CLASS_ | ||
{ | ||
/** | ||
* Display name | ||
* | ||
* @param array $settings Configuration settings | ||
* @return string | ||
*/ | ||
public static function displayName( $settings ) | ||
{ | ||
try | ||
{ | ||
if ( ! empty( $settings['bucket_path'] ) ) | ||
{ | ||
$settings['bucket'] .= "/${settings['bucket_path']}"; | ||
} | ||
return parent::displayName( $settings ); | ||
} | ||
catch ( \RuntimeException $e ) | ||
{ | ||
if ( method_exists( get_parent_class(), __FUNCTION__ ) ) | ||
{ | ||
return \call_user_func_array( 'parent::' . __FUNCTION__, \func_get_args() ); | ||
} | ||
else | ||
{ | ||
throw $e; | ||
} | ||
} | ||
} | ||
} | ||
]]></hook></hooks><htmlFiles/><cssFiles/><jsFiles/><resourcesFiles/><lang/><versions><version long="10000" human="1.0.0"><![CDATA[//<?php | ||
/* To prevent PHP errors (extending class does not exist) revealing path */ | ||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) ) | ||
{ | ||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' ); | ||
exit; | ||
} | ||
/** | ||
* Install Code | ||
*/ | ||
class ips_plugins_setup_install | ||
{ | ||
/** | ||
* ... | ||
* | ||
* @return array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops) | ||
*/ | ||
public function step1() | ||
{ | ||
return TRUE; | ||
} | ||
// You can create as many additional methods (step2, step3, etc.) as is necessary. | ||
// Each step will be executed in a new HTTP request | ||
}]]></version></versions></plugin> |