mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-16 12:26:23 -04:00
Tack on the void return type onto the Employee:logout method.
This commit is contained in:
@@ -31,13 +31,13 @@ class Attributes extends Secure_Controller
|
||||
/**
|
||||
* Returns customer table data rows. This will be called with AJAX.
|
||||
*/
|
||||
public function search(): void
|
||||
public function getSearch(): void
|
||||
{
|
||||
$search = $this->request->getGet('search', FILTER_SANITIZE_STRING);
|
||||
$limit = $this->request->getGet('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getGet('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getGet('sort', FILTER_SANITIZE_STRING);
|
||||
$order = $this->request->getGet('order', FILTER_SANITIZE_STRING);
|
||||
$search = $this->request->getVar('search', FILTER_SANITIZE_STRING);
|
||||
$limit = $this->request->getVar('limit', FILTER_SANITIZE_NUMBER_INT);
|
||||
$offset = $this->request->getVar('offset', FILTER_SANITIZE_NUMBER_INT);
|
||||
$sort = $this->request->getVar('sort', FILTER_SANITIZE_STRING);
|
||||
$order = $this->request->getVar('order', FILTER_SANITIZE_STRING);
|
||||
|
||||
$attributes = $this->attribute->search($search, $limit, $offset, $sort, $order);
|
||||
$total_rows = $this->attribute->get_found_rows($search);
|
||||
@@ -55,7 +55,7 @@ class Attributes extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function save_attribute_value(): void
|
||||
public function postSave_attribute_value(): void
|
||||
{
|
||||
$success = $this->attribute->save_value(
|
||||
$this->request->getPost('attribute_value', FILTER_SANITIZE_STRING),
|
||||
@@ -70,7 +70,7 @@ class Attributes extends Secure_Controller
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function delete_attribute_value(): void
|
||||
public function postDelete_attribute_value(): void
|
||||
{
|
||||
$success = $this->attribute->delete_value(
|
||||
$this->request->getPost('attribute_value', FILTER_SANITIZE_STRING),
|
||||
@@ -84,7 +84,7 @@ class Attributes extends Secure_Controller
|
||||
* @param int $definition_id
|
||||
* @return void
|
||||
*/
|
||||
public function save_definition(int $definition_id = NO_DEFINITION_ID): void
|
||||
public function postSave_definition(int $definition_id = NO_DEFINITION_ID): void
|
||||
{
|
||||
$definition_flags = 0;
|
||||
|
||||
@@ -144,7 +144,7 @@ class Attributes extends Secure_Controller
|
||||
echo json_encode([
|
||||
'success' => FALSE,
|
||||
'message' => lang('Attributes.definition_error_adding_updating', ['definition_name' => $definition_name]),
|
||||
'id' => -1
|
||||
'id' => NEW_ENTRY
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -155,12 +155,12 @@ class Attributes extends Secure_Controller
|
||||
*/
|
||||
public function suggest_attribute(int $definition_id): void
|
||||
{
|
||||
$suggestions = $this->attribute->get_suggestions($definition_id, $this->request->getGet('term', FILTER_SANITIZE_STRING));
|
||||
$suggestions = $this->attribute->get_suggestions($definition_id, $this->request->getVar('term', FILTER_SANITIZE_STRING));
|
||||
|
||||
echo json_encode($suggestions);
|
||||
}
|
||||
|
||||
public function get_row(int $row_id): void
|
||||
public function getRow(int $row_id): void
|
||||
{
|
||||
$attribute_definition_info = $this->attribute->get_info($row_id);
|
||||
$attribute_definition_info->definition_flags = $this->get_attributes($attribute_definition_info->definition_flags);
|
||||
@@ -182,7 +182,7 @@ class Attributes extends Secure_Controller
|
||||
return $definition_flag_names;
|
||||
}
|
||||
|
||||
public function view(int $definition_id = NO_DEFINITION_ID): void
|
||||
public function getView(int $definition_id = NO_DEFINITION_ID): void
|
||||
{
|
||||
$info = $this->attribute->get_info($definition_id);
|
||||
foreach(get_object_vars($info) as $property => $value)
|
||||
@@ -204,12 +204,12 @@ class Attributes extends Secure_Controller
|
||||
echo view('attributes/form', $data);
|
||||
}
|
||||
|
||||
public function delete_value(int $attribute_id): bool //TODO: This function appears to never be used in the codebase. Is it needed?
|
||||
public function postDelete_value(int $attribute_id): bool //TODO: This function appears to never be used in the codebase. Is it needed?
|
||||
{
|
||||
return $this->attribute->delete_value($attribute_id, NO_DEFINITION_ID);
|
||||
}
|
||||
|
||||
public function delete(): void
|
||||
public function postDelete(): void
|
||||
{
|
||||
$attributes_to_delete = $this->request->getPost('ids', FILTER_SANITIZE_STRING);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user