Skip to content

Commit

Permalink
Change naming and coding conventions (#1)
Browse files Browse the repository at this point in the history
* Add empty index.html files to all folders
* Add releases folder to gitignore
* Rename hook file to comply with naming conventions
* Add full name to LICENSE
* Make code comply with the PEAR standard
  • Loading branch information
runar committed Jan 23, 2022
1 parent 28fe608 commit 5715f4e
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.lvimrc
/releases
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 runar
Copyright (c) 2019 Runar Skaare Tveiten

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Empty file added dev/css/index.html
Empty file.
Empty file added dev/html/index.html
Empty file.
Empty file added dev/index.html
Empty file.
Empty file added dev/js/index.html
Empty file.
3 changes: 1 addition & 2 deletions dev/jslang.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?php

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

$lang = array(
);
$lang = array();
Empty file added dev/resources/index.html
Empty file.
25 changes: 12 additions & 13 deletions dev/setup/10000.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
//<?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;
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;
}
/**
* Step 1
*
* @return true
*/
public function step1()
{
return true;
}
}
Empty file added dev/setup/index.html
Empty file.
25 changes: 12 additions & 13 deletions dev/setup/install.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
//<?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;
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;
}
/**
* Step 1
*
* @return true
*/
public function step1()
{
return true;
}
}
4 changes: 3 additions & 1 deletion dev/versions.json
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{"10000":"1.0.0"}
{
"10000": "1.0.0"
}
25 changes: 25 additions & 0 deletions hooks/File_Amazon.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 the array with bucket settings
*
* @return string
*/
public static function displayName($settings)
{
if (!empty($settings['bucket_path'])) {
$settings['bucket'] .= "/${settings['bucket_path']}";
}

return parent::displayName($settings);
}
}
25 changes: 0 additions & 25 deletions hooks/ipsFileAmazon.php

This file was deleted.

0 comments on commit 5715f4e

Please sign in to comment.