Skip to content

Commit

Permalink
Merge pull request causefx#578 from causefx/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
causefx committed Aug 16, 2017
2 parents 9ce5dce + 4e4a33f commit 455809d
Show file tree
Hide file tree
Showing 18 changed files with 3,219 additions and 1,647 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ config/users
config/users*.db
config/users*.bak.db
config/tmp/*

images/cache/*
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http:https://contributor-covenant.org/version/1/4][version]

[homepage]: http:https://contributor-covenant.org
[version]: http:https://contributor-covenant.org/version/1/4/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Average time to resolve an issue](http:https://isitmaintained.com/badge/resolution/causefx/Organizr.svg)](http:https://isitmaintained.com/project/causefx/Organizr "Average time to resolve an issue")
[![GitHub stars](https://img.shields.io/github/stars/causefx/Organizr.svg)](https://github.com/causefx/Organizr/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/causefx/Organizr.svg)](https://github.com/causefx/Organizr/network)
[![Docker pulls](https://img.shields.io/docker/pulls/lsiocommunity/organizr.svg)](https://hub.docker.com/r/lsiocommunity/organizr)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/causefx)

<p align="center"><img src="https://cloud.githubusercontent.com/assets/16184466/24440636/1e5e2002-140a-11e7-8da1-1cd68745cedd.png"></p>
Expand Down
31 changes: 28 additions & 3 deletions ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
if (isset($_GET['action'])) { $action = $_GET['action']; }
if (isset($_GET['a'])) { $action = $_GET['a']; }
unset($_POST['action']);

// No Action
if (!isset($action)) {
sendNotification(false, 'No Action Specified!');
Expand All @@ -27,6 +26,20 @@
switch ($_SERVER['REQUEST_METHOD']) {
case 'GET':
switch ($action) {
case 'get-backups':
qualifyUser("admin", true);
$response = implode("\n",getBackups());
break;
case 'get-calendar':
echo json_encode(getCalendar());
die();
break;
case 'show-file':
$auth = ($_SERVER['HTTP_REFERER'] ? true : false);
if ($auth === false) { die("WTF? Bro! This is an internal function only"); }
showFile();
die();
break;
case 'emby-image':
qualifyUser(EMBYHOMEAUTH, true);
getEmbyImage();
Expand Down Expand Up @@ -83,6 +96,9 @@
case 'tvdb-get':
$response = tvdbGet($_POST['id']);
break;
case 'tvdb-search':
$response = tvdbSearch($_POST['name'], $_POST['type']);
break;
case 'search-plex':
$response = searchPlex($_POST['searchtitle']);
break;
Expand Down Expand Up @@ -110,10 +126,17 @@
break;
case 'check-url':
sendResult(frameTest($_POST['checkurl']), "flask", $_POST['checkurl'], "IFRAME_CAN_BE_FRAMED", "IFRAME_CANNOT_BE_FRAMED");
break;
case 'backup-now':
sendResult(backupDB(), "database", "Backup", "BACKUP_CREATED", "BACKUP_ERROR");
break;
case 'upload-images':
uploadFiles('images/', array('jpg', 'png', 'svg', 'jpeg', 'bmp', 'gif'));
sendNotification(true);
break;
case 'upload-avatar':
uploadAvatar(USER_HOME.$GLOBALS['USER']->username.'/', array('jpg', 'png', 'svg', 'jpeg', 'bmp', 'gif'));
sendNotification(true);
break;
case 'remove-images':
removeFiles('images/'.(isset($_POST['file'])?$_POST['file']:''));
Expand All @@ -130,11 +153,13 @@
} else {
unlink('custom.css');
}
$response['parent']['reload'] = true;
$response['show_apply'] = true;
}
unset($_POST['customCSS']);
// Custom CSS Special Case END
$response['notify'] = sendNotification(updateDBOptions($_POST),false,false);
if (!empty($_POST)) {
$response['notify'] = sendNotification(updateDBOptions($_POST),false,false);
}
break;
case 'deleteDB':
deleteDatabase();
Expand Down
6 changes: 3 additions & 3 deletions error.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
999 => array('Not Logged In', 'You need to be logged in to access this page.', 'confused'),
);

$errorTitle = $codes[$status][0];
$message = $codes[$status][1];
$errorImage = $codes[$status][2];
$errorTitle = ($codes[$status][0]) ? $codes[$status][0] : "Error";
$message = ($codes[$status][1]) ? $codes[$status][1] : "An Error Occured";
$errorImage = ($codes[$status][2]) ? $codes[$status][2] : "confused";

?>

Expand Down
Loading

0 comments on commit 455809d

Please sign in to comment.