From 3b4012798f889d3ee97ea2d0af3a42d8e5aa45f2 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 30 Apr 2019 13:13:34 +0200 Subject: [PATCH] Fixed some comments typo --- application/controllers/system/Filters.php | 8 ++-- application/controllers/system/Navigation.php | 4 +- application/core/DB_Model.php | 4 +- application/helpers/hlp_language_helper.php | 8 ++-- application/libraries/ExtensionsLib.php | 6 +-- application/libraries/FiltersLib.php | 38 +++++++++---------- application/libraries/MessageLib.php | 2 +- application/libraries/NavigationLib.php | 8 ++-- application/libraries/PermissionLib.php | 4 +- application/libraries/PhrasesLib.php | 8 ++-- application/libraries/UDFLib.php | 4 +- application/models/person/Person_model.php | 2 +- application/models/system/Phrase_model.php | 2 +- application/views/templates/FHC-Header.php | 2 +- application/widgets/FilterWidget.php | 18 ++++----- 15 files changed, 59 insertions(+), 59 deletions(-) diff --git a/application/controllers/system/Filters.php b/application/controllers/system/Filters.php index ccbc880dd..3bdb6dde2 100644 --- a/application/controllers/system/Filters.php +++ b/application/controllers/system/Filters.php @@ -35,7 +35,7 @@ class Filters extends FHC_Controller // Public methods /** - * Retrives data about the current filter from the session and will be written on the output in JSON format + * Retrieves data about the current filter from the session and will be written on the output in JSON format */ public function getFilter() { @@ -43,7 +43,7 @@ class Filters extends FHC_Controller } /** - * Retrives the number of records present in the current dataset and will be written on the output in JSON format + * Retrieves the number of records present in the current dataset and will be written on the output in JSON format */ public function rowNumber() { @@ -243,11 +243,11 @@ class Filters extends FHC_Controller // If it is present in the HTTP GET if (isset($_GET[self::FILTER_PAGE_PARAM])) { - $filterPage = $this->input->get(self::FILTER_PAGE_PARAM); // is retrived from the HTTP GET + $filterPage = $this->input->get(self::FILTER_PAGE_PARAM); // is retrieved from the HTTP GET } elseif (isset($_POST[self::FILTER_PAGE_PARAM])) // Else if it is present in the HTTP POST { - $filterPage = $this->input->post(self::FILTER_PAGE_PARAM); // is retrived from the HTTP POST + $filterPage = $this->input->post(self::FILTER_PAGE_PARAM); // is retrieved from the HTTP POST } // Loads the FiltersLib that contains all the used logic diff --git a/application/controllers/system/Navigation.php b/application/controllers/system/Navigation.php index 7f10fadc8..1abf7d9a8 100644 --- a/application/controllers/system/Navigation.php +++ b/application/controllers/system/Navigation.php @@ -69,11 +69,11 @@ class Navigation extends Auth_Controller // If it is present in the HTTP GET if (isset($_GET[self::NAVIGATION_PAGE_PARAM])) { - $navigationPage = $this->input->get(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP GET + $navigationPage = $this->input->get(self::NAVIGATION_PAGE_PARAM); // is retrieved from the HTTP GET } elseif (isset($_POST[self::NAVIGATION_PAGE_PARAM])) // Else if it is present in the HTTP POST { - $navigationPage = $this->input->post(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP POST + $navigationPage = $this->input->post(self::NAVIGATION_PAGE_PARAM); // is retrieved from the HTTP POST } // Loads the NavigationLib that contains all the used logic diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index 16b9f2da9..df072a61c 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -704,7 +704,7 @@ class DB_Model extends FHC_Model } /** - * Get meda data info about the retrived fields after having executed a query + * Get meda data info about the retrieved fields after having executed a query */ public function getExecutedQueryMetaData() { @@ -861,7 +861,7 @@ class DB_Model extends FHC_Model $toBeConverterdArray = array(); // Fields to be converted $this->executedQueryMetaData = $result->field_data(); // Fields information - $this->executedQueryListFields = $result->list_fields(); // List of the retrived fields + $this->executedQueryListFields = $result->list_fields(); // List of the retrieved fields for ($i = 0; $i < count($this->executedQueryMetaData); $i++) // Looking for booleans and arrays { diff --git a/application/helpers/hlp_language_helper.php b/application/helpers/hlp_language_helper.php index ce01c5f0d..d80175fa7 100644 --- a/application/helpers/hlp_language_helper.php +++ b/application/helpers/hlp_language_helper.php @@ -17,8 +17,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); // ------------------------------------------------------------------------ /** - * Function to retrive the language of the logged user - * If is not possible to retrive it, then the default system language is returnd + * Function to retrieve the language of the logged user + * If is not possible to retrieve it, then the default system language is returnd * If as parameter is given a valid language the it's returned useful to avoid * to write the same control structures for the language */ @@ -28,9 +28,9 @@ function getUserLanguage($language = null) $ci =& get_instance(); // get CI instance - // Use the default system language, if it's possible retrives the language for the logged user + // Use the default system language, if it's possible retrieves the language for the logged user $language = DEFAULT_LANGUAGE; - // Checks if the user is authenticated to retrive the users's language + // Checks if the user is authenticated to retrieve the users's language // NOTE: this helper could be called when the user is not logged in the system // so this is why is checked if the function getAuthUID exists if (function_exists('getAuthUID')) diff --git a/application/libraries/ExtensionsLib.php b/application/libraries/ExtensionsLib.php index f678a0bc1..cec40a753 100644 --- a/application/libraries/ExtensionsLib.php +++ b/application/libraries/ExtensionsLib.php @@ -7,7 +7,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); */ class ExtensionsLib { - const SQL_DIRECTORY = 'sql'; // directory where to retrive SQL scripts + const SQL_DIRECTORY = 'sql'; // directory where to retrieve SQL scripts const SQL_FILE_EXTENSION = '.sql'; // SQL scripts file extension const FILE_INPUT_NAME = 'extension'; // name of the HTTP parameter containing the archive data @@ -200,7 +200,7 @@ class ExtensionsLib } /** - * Retrive the list of all the installed extensions + * Retrieve the list of all the installed extensions */ public function getInstalledExtensions() { @@ -253,7 +253,7 @@ class ExtensionsLib // If the upload was a success if ($this->_ci->upload->do_upload(ExtensionsLib::FILE_INPUT_NAME)) { - $uploadData = $this->_ci->upload->data(); // retrives data about the uploaded file + $uploadData = $this->_ci->upload->data(); // retrieves data about the uploaded file // Checks the file extension $uploadedFileExtension = '.'.pathinfo($uploadData['full_path'], PATHINFO_EXTENSION); if (!in_array($uploadedFileExtension, $this->ARCHIVE_EXTENSIONS)) diff --git a/application/libraries/FiltersLib.php b/application/libraries/FiltersLib.php index 975f27289..9d0d67584 100644 --- a/application/libraries/FiltersLib.php +++ b/application/libraries/FiltersLib.php @@ -23,7 +23,7 @@ class FiltersLib const SESSION_DATASET_REPRESENTATION = 'datasetRepresentation'; const SESSION_DATASET_REP_OPTIONS = 'datasetRepresentationOptions'; - // Alias for the dynamic table used to retrive the dataset + // Alias for the dynamic table used to retrieve the dataset const DATASET_TABLE_ALIAS = 'datasetFilterTable'; // Parameters names... @@ -40,7 +40,7 @@ class FiltersLib // ...to specify permissions that are needed to use this FilterWidget const REQUIRED_PERMISSIONS_PARAMETER = 'requiredPermissions'; - // ...stament to retrive the dataset + // ...stament to retrieve the dataset const QUERY_PARAMETER = 'query'; // ...to specify more columns or aliases for them @@ -136,7 +136,7 @@ class FiltersLib } /** - * Wrapper method to the session helper funtions to retrive the whole session for this filter + * Wrapper method to the session helper funtions to retrieve the whole session for this filter */ public function getSession() { @@ -144,7 +144,7 @@ class FiltersLib } /** - * Wrapper method to the session helper funtions to retrive one element from the session of this filter + * Wrapper method to the session helper funtions to retrieve one element from the session of this filter */ public function getSessionElement($name) { @@ -192,7 +192,7 @@ class FiltersLib $this->_ci->FiltersModel->addJoin('public.tbl_benutzer', 'person_id', 'LEFT'); // left join with benutzer table $this->_ci->FiltersModel->addSelect('system.tbl_filters.*'); // select only from table filters $this->_ci->FiltersModel->addOrder('sort', 'ASC'); // sort on column sort - $this->_ci->FiltersModel->addLimit(1); // if more than one filter is set as default only one will be retrived + $this->_ci->FiltersModel->addLimit(1); // if more than one filter is set as default only one will be retrieved $definition = null; $whereParameters = null; // where clause parameters @@ -206,7 +206,7 @@ class FiltersLib } else { - // If we can univocally retrive a filter + // If we can univocally retrieve a filter if ($app != null && $datasetName != null && $filterKurzbz != null) { $whereParameters = array( @@ -280,7 +280,7 @@ class FiltersLib } /** - * Generate the query to retrive the dataset for a filter + * Generate the query to retrieve the dataset for a filter */ public function generateDatasetQuery($query, $filters) { @@ -316,7 +316,7 @@ class FiltersLib } /** - * Retrives the dataset from the DB + * Retrieves the dataset from the DB */ public function getDataset($datasetQuery) { @@ -368,7 +368,7 @@ class FiltersLib // Checks the parameter selectedFields if (isset($selectedFields) && is_array($selectedFields) && count($selectedFields) > 0) { - // Retrives all the used fields by the current filter + // Retrieves all the used fields by the current filter $fields = $this->getSessionElement(self::SESSION_FIELDS); // Checks that the given selected fields are present in all the used fields by the current filter @@ -393,9 +393,9 @@ class FiltersLib // Checks the parameter selectedField if (!isEmptyString($selectedField)) { - // Retrives all the used fields by the current filter + // Retrieves all the used fields by the current filter $fields = $this->getSessionElement(self::SESSION_FIELDS); - // Retrives the selected fields by the current filter + // Retrieves the selected fields by the current filter $selectedFields = $this->getSessionElement(self::SESSION_SELECTED_FIELDS); // Checks that the given selected field is present in the list of all the used fields by the current filter @@ -427,9 +427,9 @@ class FiltersLib // Checks the parameter selectedField if (!isEmptyString($selectedField)) { - // Retrives all the used fields by the current filter + // Retrieves all the used fields by the current filter $fields = $this->getSessionElement(self::SESSION_FIELDS); - // Retrives the selected fields by the current filter + // Retrieves the selected fields by the current filter $selectedFields = $this->getSessionElement(self::SESSION_SELECTED_FIELDS); // Checks that the given selected field is present in the list of all the used fields by the current filter @@ -456,9 +456,9 @@ class FiltersLib // Checks the parameter appliedFilter if (!isEmptyString($appliedFilter)) { - // Retrives all the used fields by the current filter + // Retrieves all the used fields by the current filter $fields = $this->getSessionElement(self::SESSION_FIELDS); - // Retrives the applied filters by the current filter + // Retrieves the applied filters by the current filter $filters = $this->getSessionElement(self::SESSION_FILTERS); // Checks that the given applied filter is present in the list of all the used fields by the current filter @@ -493,7 +493,7 @@ class FiltersLib if (isset($appliedFilters) && is_array($appliedFilters) && isset($appliedFiltersOperations) && is_array($appliedFiltersOperations)) { - $fields = $this->getSessionElement(self::SESSION_FIELDS); // Retrives all the used fields by the current filter + $fields = $this->getSessionElement(self::SESSION_FIELDS); // Retrieves all the used fields by the current filter // Checks that the given applied filters are present in all the used fields by the current filter if (!array_diff($appliedFilters, $fields)) @@ -544,9 +544,9 @@ class FiltersLib // Checks the parameter filter if (!isEmptyString($filter)) { - // Retrives all the used fields by the current filter + // Retrieves all the used fields by the current filter $fields = $this->getSessionElement(self::SESSION_FIELDS); - // Retrives the applied filters by the current filter + // Retrieves the applied filters by the current filter $filters = $this->getSessionElement(self::SESSION_FILTERS); // Checks that the given applied filter is present in the list of all the used fields by the current filter @@ -619,7 +619,7 @@ class FiltersLib // Generates the "column" property $jsonDeifinition->columns = array(); - $selectedFields = $this->getSessionElement(self::SESSION_SELECTED_FIELDS); // retrived the selected fields + $selectedFields = $this->getSessionElement(self::SESSION_SELECTED_FIELDS); // retrieved the selected fields for ($i = 0; $i < count($selectedFields); $i++) { // Each element is an object with a property called "name" diff --git a/application/libraries/MessageLib.php b/application/libraries/MessageLib.php index cb691ec93..74ccce703 100644 --- a/application/libraries/MessageLib.php +++ b/application/libraries/MessageLib.php @@ -297,7 +297,7 @@ class MessageLib $result = $this->_ci->PersonModel->load($receiver_id); if (hasData($result)) { - // Retrives the language of the logged user + // Retrieves the language of the logged user $sprache = getUserLanguage(); // Loads template data diff --git a/application/libraries/NavigationLib.php b/application/libraries/NavigationLib.php index 1a2f15023..e2492cef4 100644 --- a/application/libraries/NavigationLib.php +++ b/application/libraries/NavigationLib.php @@ -88,7 +88,7 @@ class NavigationLib } /** - * Wrapper method to the session helper funtions to retrive the whole session for this navigation widget + * Wrapper method to the session helper funtions to retrieve the whole session for this navigation widget */ public function getSessionMenu() { @@ -103,7 +103,7 @@ class NavigationLib } /** - * Wrapper method to the session helper funtions to retrive the whole session for this navigation widget + * Wrapper method to the session helper funtions to retrieve the whole session for this navigation widget */ public function getSessionHeader() { @@ -118,7 +118,7 @@ class NavigationLib } /** - * Wrapper method to the session helper funtions to retrive one element from the session of this navigation widget + * Wrapper method to the session helper funtions to retrieve one element from the session of this navigation widget */ public function getSessionElementMenu($name) { @@ -133,7 +133,7 @@ class NavigationLib } /** - * Wrapper method to the session helper funtions to retrive one element from the session of this navigation widget + * Wrapper method to the session helper funtions to retrieve one element from the session of this navigation widget */ public function getSessionElementHeader($name) { diff --git a/application/libraries/PermissionLib.php b/application/libraries/PermissionLib.php index 76a2fe2c5..b84359216 100644 --- a/application/libraries/PermissionLib.php +++ b/application/libraries/PermissionLib.php @@ -100,7 +100,7 @@ class PermissionLib * - convert the required permissions to an array if needed * - loops through the required permissions * - checks if the permission is well formatted - * - retrives permission and required access type from the $requiredPermissions array + * - retrieves permission and required access type from the $requiredPermissions array * - checks if the required access type is compliant with the HTTP method (GET => r, POST => w) * - if the user has one of the permissions than exit the loop * - checks if the user has the same required permissiond with the same required access type @@ -142,7 +142,7 @@ class PermissionLib // Checks if the permission is well formatted if (strpos($permissions[$pCounter], PermissionLib::PERMISSION_SEPARATOR) !== false) { - // Retrives permission and required access type from the $requiredPermissions array + // Retrieves permission and required access type from the $requiredPermissions array list($permission, $requiredAccessType) = explode(PermissionLib::PERMISSION_SEPARATOR, $permissions[$pCounter]); $accessType = ''; diff --git a/application/libraries/PhrasesLib.php b/application/libraries/PhrasesLib.php index 6793f38e0..80552053b 100644 --- a/application/libraries/PhrasesLib.php +++ b/application/libraries/PhrasesLib.php @@ -5,7 +5,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); class PhrasesLib { private $_ci; // Code igniter instance - private $_phrases; // Contains the retrived phrases + private $_phrases; // Contains the retrieved phrases /** * Loads parser library @@ -89,7 +89,7 @@ class PhrasesLib } /** - * getPhrases() - Retrives phrases from the DB + * getPhrases() - Retrieves phrases from the DB * The given parameter are the same needed to read from the table system.tb_phrase */ public function getPhrases($app, $sprache, $phrase = null, $orgeinheit_kurzbz = null, $orgform_kurzbz = null, $blockTags = null) @@ -177,7 +177,7 @@ class PhrasesLib } /** - * Retrives a phrases from the the property _phrases with the given parameters + * Retrieves a phrases from the the property _phrases with the given parameters * It also replace parameters inside the phrase if they are provided * @param string $category Category name which is used to categorize the phrase. * @param string $phrase Phrase name. @@ -241,7 +241,7 @@ class PhrasesLib $categories = array($categories); } - // Retrives the language of the logged user + // Retrieves the language of the logged user $language = getUserLanguage(count($parameters) == 2 ? $parameters[1] : null); // If only categories is not an empty array then loads phrases diff --git a/application/libraries/UDFLib.php b/application/libraries/UDFLib.php index 1e46eaade..6166b44a9 100644 --- a/application/libraries/UDFLib.php +++ b/application/libraries/UDFLib.php @@ -43,7 +43,7 @@ class UDFLib const CHKBOX_TYPE = 'checkbox'; // UDF checkbox type - const PHRASES_APP_NAME = 'core'; // Name of the app parameter used to retrive phrases + const PHRASES_APP_NAME = 'core'; // Name of the app parameter used to retrieve phrases private $_ci; // Code igniter instance @@ -620,7 +620,7 @@ class UDFLib { $parameters = $jsonSchema->{UDFLib::LIST_VALUES}->enum; } - // If the list of values to show should be retrived with a SQL statement + // If the list of values to show should be retrieved with a SQL statement elseif (isset($jsonSchema->{UDFLib::LIST_VALUES}->sql)) { // UDFModel is loaded in method _loadUDF that is called before the current method diff --git a/application/models/person/Person_model.php b/application/models/person/Person_model.php index 7a42532e1..b689f4fcb 100644 --- a/application/models/person/Person_model.php +++ b/application/models/person/Person_model.php @@ -200,7 +200,7 @@ class Person_model extends DB_Model } /** - * Retrives the language of the user by the UID + * Retrieves the language of the user by the UID * Gets all the persons related to the given UID and starting from the most recent person in DB * tries to find a valid language (!= null), if found is returned, otherwise is returned the * default global language of the system diff --git a/application/models/system/Phrase_model.php b/application/models/system/Phrase_model.php index 50b36a429..c7414d408 100644 --- a/application/models/system/Phrase_model.php +++ b/application/models/system/Phrase_model.php @@ -57,7 +57,7 @@ class Phrase_model extends DB_Model /** * Loads phrases using category(s) and language as keys - * The retrived fields are category, phrase, orgeinheit_kurzbz, orgform_kurzbz and text + * The retrieved fields are category, phrase, orgeinheit_kurzbz, orgform_kurzbz and text * They are ordered by p.category, p.phrase, pt.orgeinheit_kurzbz DESC and pt.orgform_kurzbz DESC' */ public function getPhrasesByCategoryAndLanguage($categories, $language) diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index c2fd3915c..43112dd7b 100644 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -2,7 +2,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); - // Retrives the name of the index page, the URL path of the called controller and the called controller + // Retrieves the name of the index page, the URL path of the called controller and the called controller // NOTE: placed here because it doesn't work inside functions $indexPage = $this->config->item('index_page'); $calledPath = $this->router->directory.$this->router->class; diff --git a/application/widgets/FilterWidget.php b/application/widgets/FilterWidget.php index b4e81788f..84a4d138b 100644 --- a/application/widgets/FilterWidget.php +++ b/application/widgets/FilterWidget.php @@ -170,13 +170,13 @@ class FilterWidget extends Widget $this->_datasetRepresentation = null; $this->_datasetRepresentationOptions = null; - // Retrived the required permissions parameter if present + // Retrieved the required permissions parameter if present if (isset($args[FiltersLib::REQUIRED_PERMISSIONS_PARAMETER])) { $this->_requiredPermissions = $args[FiltersLib::REQUIRED_PERMISSIONS_PARAMETER]; } - // Parameters needed to retrive univocally a filter from DB + // Parameters needed to retrieve univocally a filter from DB if (isset($args[FiltersLib::APP_PARAMETER])) { $this->_app = $args[FiltersLib::APP_PARAMETER]; @@ -197,7 +197,7 @@ class FilterWidget extends Widget $this->_filterId = $args[FiltersLib::FILTER_ID]; } - // How to retrive data for the filter: SQL statement or a result from DB + // How to retrieve data for the filter: SQL statement or a result from DB if (isset($args[FiltersLib::QUERY_PARAMETER])) { $this->_query = $args[FiltersLib::QUERY_PARAMETER]; @@ -329,7 +329,7 @@ class FilterWidget extends Widget // If session is NOT empty -> a filter was already loaded if ($session != null) { - // Retrive the filterId stored in the session + // Retrieve the filterId stored in the session $sessionFilterId = $this->filterslib->getSessionElement(FiltersLib::FILTER_ID); // If the filter loaded in session is NOT the same that is being requested then empty the session @@ -355,7 +355,7 @@ class FilterWidget extends Widget $this->filterslib->getSessionElement(FiltersLib::SESSION_FILTERS) ); - // Then retrive dataset from DB + // Then retrieve dataset from DB $dataset = $this->filterslib->getDataset($datasetQuery); // Save changes into session if data are valid @@ -392,7 +392,7 @@ class FilterWidget extends Widget // Generate dataset query $datasetQuery = $this->filterslib->generateDatasetQuery($this->_query, $parsedFilterJson->filters); - // Then retrive dataset from DB + // Then retrieve dataset from DB $dataset = $this->filterslib->getDataset($datasetQuery); // Try to load the name of the filter using the PhrasesLib @@ -448,7 +448,7 @@ class FilterWidget extends Widget /** * Calls the method _markRow and _formatRow to marks rows using markRow and format rowns using formatRow - * NOTE: this method operates directly on the retrived dataset: parameter passed by reference + * NOTE: this method operates directly on the retrieved dataset: parameter passed by reference */ private function _formatDataset(&$rawDataset) { @@ -471,7 +471,7 @@ class FilterWidget extends Widget * - converts booleans into strings "true" and "false" * - format dates using the format string defined in DEFAULT_DATE_FORMAT * Calls the parameter formatRow if it was given and if it is a valid funtion - * NOTE: this method operates directly on the retrived dataset: parameter passed by reference + * NOTE: this method operates directly on the retrieved dataset: parameter passed by reference */ private function _formatRow(&$rawDatasetRow) { @@ -514,7 +514,7 @@ class FilterWidget extends Widget } /** - * Utility method that retrives the name of the columns present in a filter JSON definition + * Utility method that retrieves the name of the columns present in a filter JSON definition */ private function _getColumnsNames($columns) {