diff --git a/.gitignore b/.gitignore index b24d71e..784e90c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,50 +1,100 @@ -# These are some examples of commonly ignored file patterns. -# You should customize this list as applicable to your project. -# Learn more about .gitignore: -# https://www.atlassian.com/git/tutorials/saving-changes/gitignore +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 -# Node artifact files -node_modules/ -dist/ +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf +.idea -# Compiled Java class files -*.class +# Generated files +.idea/**/contentModel.xml -# Compiled Python bytecode -*.py[cod] +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml -# Log files -*.log +# Gradle +.idea/**/gradle.xml +.idea/**/libraries +Pi Control.iml +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr -# Package files -*.jar +# CMake +cmake-build-*/ -# Maven -target/ -dist/ +# Mongo Explorer plugin +.idea/**/mongoSettings.xml -# JetBrains IDE -.idea/ +# File-based project format +*.iws -# Unit test reports -TEST*.xml +# IntelliJ +out/ -# Generated by MacOS -.DS_Store +# mpeltonen/sbt-idea plugin +.idea_modules/ -# Generated by Windows -Thumbs.db +# JIRA plugin +atlassian-ide-plugin.xml -# Applications -*.app -*.exe -*.war +# Cursive Clojure plugin +.idea/replstate.xml -# Large media files -*.mp4 -*.tiff -*.avi -*.flv -*.mov -*.wmv +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### ZendFramework template +# Composer files +composer.phar +vendor/ + +# Local configs +config/autoload/*.local.php + +# Binary gettext files +*.mo + +# Data +data/logs/ +data/cache/ +data/sessions/ +data/tmp/ +temp/ + +#Doctrine 2 +data/DoctrineORMModule/Proxy/ +data/DoctrineORMModule/cache/ + +# Legacy ZF1 +demos/ +extras/documentation diff --git a/api/v1/statistic.php b/api/v1/statistic.php index 8de3923..23c17af 100644 --- a/api/v1/statistic.php +++ b/api/v1/statistic.php @@ -1,5 +1,5 @@ loadStatistics(); - + if (($name = $controller->getStatisticName($_POST['id'])) !== false) { if (isset($_POST['plugin']) && trim($_POST['plugin']) != '') pluginLanguage(trim($_POST['plugin'])); - + $builder = new StatisticBuilder(); $builder->loadFromFile($name, (isset($_POST['plugin']) && trim($_POST['plugin']) != '') ? $_POST['plugin'] : NULL); $statistic = $builder->getArray(); - + $log = new LogStatistic(); $log->setFile(LOG_PATH.$statistic['raw'].'.csv'); - + $arr = $info = array(); - + foreach ($statistic['columns'] as $column) $arr['cols'][] = array('id' => '', 'label' => _t($column['label']), 'type' => $column['type']); - + getRowsFromLog($arr, $info, $log->getAll(), $statistic['columns'], $statistic['cycle']); - + if (isset($arr['rows'])) { if (isset($_POST['type']) && $_POST['type'] == 'googleChart') $arr['rows'] = convertForGoogleChart($arr['rows']); - + $arr['rows'] = array_slice($arr['rows'], -2016); $arr['periods'] = $info['periods']; - + foreach (array('min', 'max') as $type) { if ($statistic['limits'][$type]['use'] == 'multiply') @@ -54,7 +54,7 @@ if (isset($_POST['id'])) $arr[$type] = round($info[$type]); } } - + $api->addData('statistic', $arr); } else @@ -67,23 +67,22 @@ else { $statistics = array(); $hiddenStatistics = unserialize(htmlspecialchars_decode(getConfig('main:statistic.hidden', 'a:0:{}'))); - + $controller = new StatisticController(); $controller->loadStatistics(); - + foreach ($controller->getStatistics() as $statistic) { $builder = new StatisticBuilder(); $builder->loadFromFile($statistic); - + $array = $builder->getArray(); if (!in_array($builder->getId(), $hiddenStatistics)) $statistics[] = array('array' => $array); } - + $api->addData('statistics', $statistics); $api->addData('hidden', $hiddenStatistics); } $api->display(); -?> \ No newline at end of file diff --git a/index.php b/index.php index a900e75..5c6d6eb 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ tplDraw === false) $tpl->draw(); } catch(Exception $e) { $errorHandler[] = 'Fehler [TPL]: '.$e->getFile().':'.$e->getLine().' => '.$e->getMessage(); - + echo '
@@ -91,4 +91,4 @@ catch(Exception $e) '; } -?> \ No newline at end of file +?> diff --git a/install/public_html/templates/install_requirement.tpl.php b/install/public_html/templates/install_requirement.tpl.php index e4f2699..5c8aeb3 100644 --- a/install/public_html/templates/install_requirement.tpl.php +++ b/install/public_html/templates/install_requirement.tpl.php @@ -41,12 +41,12 @@| = 5.5'); ?> | += 7.0'); ?> | ||
| - | '._t('Anleitung zur Installation').''; ?> | +'._t('Anleitung zur Installation').''; ?> | |
| @@ -58,7 +58,7 @@ | |||
| - | '._t('Anleitung zur Installation').''; ?> | +'._t('Anleitung zur Installation').''; ?> | |
| diff --git a/install/resources/content/install_requirement.php b/install/resources/content/install_requirement.php index e64369a..99a87cf 100644 --- a/install/resources/content/install_requirement.php +++ b/install/resources/content/install_requirement.php @@ -19,7 +19,7 @@ $otherDistribution = array('version' => rpi_getDistribution(), 'status' => false $otherCookie = array('status' => false); $error = false; -if (version_compare(PHP_VERSION, '5.5.0') >= 0) +if (version_compare(PHP_VERSION, '7.0.0') >= 0) $phpVersion['status'] = true; if (extension_loaded('ssh2')) @@ -28,7 +28,7 @@ if (extension_loaded('ssh2')) //if (function_exists('mcrypt_encrypt') !== false) $phpMcrypt['status'] = true; -if (trim(exec('dpkg -s php5-cli | grep Status: ')) != '' || trim(exec('dpkg -s php7.0-cli | grep Status: ')) || trim(exec('dpkg -s php7.3-cli | grep Status: ')) != '') +if (trim(exec('dpkg -s php7.3-cli | grep Status: ')) != '' || trim(exec('dpkg -s php7.4-cli | grep Status: ')) != '') $phpCLI['status'] = true; if (function_exists('curl_init') !== false) @@ -52,7 +52,7 @@ foreach ($filesFolders as $file => $info) $filesFoldersExist['count'] += 1; $filesFoldersExist['status'] = false; } - + if ($info['permissionBool'] === false || $info['userGroupBool'] === false) { $filesFoldersPermission['count'] += 1; @@ -62,7 +62,7 @@ foreach ($filesFolders as $file => $info) } // Sonstiges -if ($otherDistribution['version'] == 'Raspbian GNU/Linux 7' || $otherDistribution['version'] == 'Raspbian GNU/Linux 8' || $otherDistribution['version'] == 'Raspbian GNU/Linux 9' || $otherDistribution['version'] == 'Raspbian GNU/Linux 10') +if ($otherDistribution['version'] == 'Raspbian GNU/Linux 10' || $otherDistribution['version'] == 'Raspbian GNU/Linux 11') $otherDistribution['status'] = true; if (isset($_COOKIE['_pi-control_install_language']) && $_COOKIE['_pi-control_install_language'] != '') @@ -90,4 +90,4 @@ $tpl->assign('langUrl', (isset($_GET['lang']) && $_GET['lang'] != '') ? '&la $tpl->assign('configHelp', $config['url']['help']); $tpl->draw('install_requirement'); -?> \ No newline at end of file +?> diff --git a/install/resources/init.php b/install/resources/init.php index e0ad5d7..827716c 100644 --- a/install/resources/init.php +++ b/install/resources/init.php @@ -16,7 +16,7 @@ if (!isset($config)) 'update' => 'https://pi-control.de/service/v1/update/', 'updateDownload' => 'https://pi-control.de/?service=update', 'updateNotification' => 'https://pi-control.de/?service=update_notification', - 'help' => 'https://pi-control.de/help/' + 'help' => 'https://www.die-schultes.eu/pi-control-hilfe/' ) ); } diff --git a/public_html/templates/html_footer.tpl.php b/public_html/templates/html_footer.tpl.php index 61b8762..bb1bab0 100644 --- a/public_html/templates/html_footer.tpl.php +++ b/public_html/templates/html_footer.tpl.php @@ -14,19 +14,17 @@ | - - |
+
+ ||
| der %s.', 'Raspberry Pi Foundation'); ?> |