Skip to content

Commit

Permalink
Release version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
runar committed Aug 23, 2019
1 parent 500ef94 commit 28fe608
Show file tree
Hide file tree
Showing 11 changed files with 155 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.lvimrc
3 changes: 2 additions & 1 deletion README.md
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.
4 changes: 4 additions & 0 deletions dev/jslang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

$lang = array(
);
4 changes: 4 additions & 0 deletions dev/lang.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?php

$lang = array(
);
24 changes: 24 additions & 0 deletions dev/setup/10000.php
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;
}
}
24 changes: 24 additions & 0 deletions dev/setup/install.php
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;
}
}
1 change: 1 addition & 0 deletions dev/versions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"10000":"1.0.0"}
Empty file added hooks/index.html
Empty file.
25 changes: 25 additions & 0 deletions hooks/ipsFileAmazon.php
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 added index.html
Empty file.
70 changes: 70 additions & 0 deletions releases/Improve Storage Configurations Display Name 1.0.0.xml
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>

0 comments on commit 28fe608

Please sign in to comment.