mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
- Added function isEmptyString to fhc_helper
- Added function isEmptyArray to fhc_helper - Adapted the code in application/* to use as much as possible this two new functions - Removed the php function empty almost everywhere
This commit is contained in:
@@ -48,7 +48,7 @@ class Phrases extends FHC_Controller
|
||||
*/
|
||||
public function view($phrase_id)
|
||||
{
|
||||
if (empty($phrase_id))
|
||||
if (!is_numeric($phrase_id))
|
||||
show_error('Invalid phrase_id parameter');
|
||||
|
||||
$phrase = $this->phraseslib->getPhrase($phrase_id);
|
||||
@@ -71,7 +71,7 @@ class Phrases extends FHC_Controller
|
||||
*/
|
||||
public function deltext($phrasentext_id, $phrase_id)
|
||||
{
|
||||
if (empty($phrasentext_id) || empty($phrase_id))
|
||||
if (!is_numeric($phrasentext_id) || !is_numeric($phrase_id))
|
||||
show_error('Invalid phrasentext_id or phrase_id parameter');
|
||||
|
||||
$phrase_inhalt = $this->phraseslib->delPhrasentext($phrasentext_id);
|
||||
@@ -86,7 +86,7 @@ class Phrases extends FHC_Controller
|
||||
*/
|
||||
public function edit($phrase_id = null)
|
||||
{
|
||||
if (empty($phrase_id)) return;
|
||||
if (!is_numeric($phrase_id)) return;
|
||||
|
||||
$phrase = $this->phraseslib->getPhrase($phrase_id);
|
||||
if ($phrase->error)
|
||||
|
||||
Reference in New Issue
Block a user