Clean up for move to .php files an phan checks
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use \CoreLibs\Upload;
|
|
||||||
|
|
||||||
$DEBUG_ALL = 1;
|
$DEBUG_ALL = 1;
|
||||||
$ECHO_ALL = 0;
|
$ECHO_ALL = 0;
|
||||||
$PRINT_ALL = 1;
|
$PRINT_ALL = 1;
|
||||||
@@ -18,7 +16,7 @@ $MAX_UPLOAD_SIZE = $base->StringByteFormat(ini_get('upload_max_filesize'));
|
|||||||
$allowedExtensions = array ('csv', 'zip', 'jpg', 'pdf', 'bz2');
|
$allowedExtensions = array ('csv', 'zip', 'jpg', 'pdf', 'bz2');
|
||||||
$sizeLimit = $MAX_UPLOAD_SIZE; // as set in php ini
|
$sizeLimit = $MAX_UPLOAD_SIZE; // as set in php ini
|
||||||
$base->debug('AJAX UPLOAD', 'Size: '.$sizeLimit.', Memory Limit: '.ini_get('memory_limit'));
|
$base->debug('AJAX UPLOAD', 'Size: '.$sizeLimit.', Memory Limit: '.ini_get('memory_limit'));
|
||||||
$uploader = new CoreLibs\Upload\qqFileUploader($allowedExtensions, $sizeLimit);
|
$uploader = new FileUpload\qqFileUploader($allowedExtensions, $sizeLimit);
|
||||||
// either in post or get
|
// either in post or get
|
||||||
$_action= $_POST['action'] ? $_POST['action'] : $_GET['action'];
|
$_action= $_POST['action'] ? $_POST['action'] : $_GET['action'];
|
||||||
$_task_uid = $_POST['task_uid'] ? $_POST['task_uid'] : $_GET['task_uid'];
|
$_task_uid = $_POST['task_uid'] ? $_POST['task_uid'] : $_GET['task_uid'];
|
||||||
|
|||||||
@@ -9,19 +9,19 @@ $edit_access = array (
|
|||||||
),
|
),
|
||||||
'name' => array (
|
'name' => array (
|
||||||
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
||||||
'output_name' => $this->l->__('Access Group Name'),
|
'output_name' => 'Access Group Name',
|
||||||
'mandatory' => 1,
|
'mandatory' => 1,
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'error_check' => 'alphanumericspace|unique'
|
'error_check' => 'alphanumericspace|unique'
|
||||||
),
|
),
|
||||||
'description' => array (
|
'description' => array (
|
||||||
'value' => isset($GLOBALS['description']) ? $GLOBALS['description'] : '',
|
'value' => isset($GLOBALS['description']) ? $GLOBALS['description'] : '',
|
||||||
'output_name' => $this->l->__('Description'),
|
'output_name' => 'Description',
|
||||||
'type' => 'textarea'
|
'type' => 'textarea'
|
||||||
),
|
),
|
||||||
'color' => array (
|
'color' => array (
|
||||||
'value' => isset($GLOBALS['color']) ? $GLOBALS['color'] : '',
|
'value' => isset($GLOBALS['color']) ? $GLOBALS['color'] : '',
|
||||||
'output_name' => $this->l->__('Color'),
|
'output_name' => 'Color',
|
||||||
'mandatory' => 0,
|
'mandatory' => 0,
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'size' => 6,
|
'size' => 6,
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ $edit_menu_group = array (
|
|||||||
),
|
),
|
||||||
'name' => array (
|
'name' => array (
|
||||||
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
||||||
'output_name' => $this->l->__('Group name'),
|
'output_name' => 'Group name',
|
||||||
'mandatory' => 1,
|
'mandatory' => 1,
|
||||||
'type' => 'text'
|
'type' => 'text'
|
||||||
),
|
),
|
||||||
'flag' => array (
|
'flag' => array (
|
||||||
'value' => isset($GLOBALS['flag']) ? $GLOBALS['flag'] : '',
|
'value' => isset($GLOBALS['flag']) ? $GLOBALS['flag'] : '',
|
||||||
'output_name' => $this->l->__('Flag'),
|
'output_name' => 'Flag',
|
||||||
'mandatory' => 1,
|
'mandatory' => 1,
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'error_check' => 'alphanumeric|unique'
|
'error_check' => 'alphanumeric|unique'
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ $edit_visible_group = array (
|
|||||||
),
|
),
|
||||||
'name' => array (
|
'name' => array (
|
||||||
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
||||||
'output_name' => $this->l->__('Group name'),
|
'output_name' => 'Group name',
|
||||||
'mandatory' => 1,
|
'mandatory' => 1,
|
||||||
'type' => 'text'
|
'type' => 'text'
|
||||||
),
|
),
|
||||||
'flag' => array (
|
'flag' => array (
|
||||||
'value' => isset($GLOBALS['flag']) ? $GLOBALS['flag'] : '',
|
'value' => isset($GLOBALS['flag']) ? $GLOBALS['flag'] : '',
|
||||||
'output_name' => $this->l->__('Flag'),
|
'output_name' => 'Flag',
|
||||||
'mandatory' => 1,
|
'mandatory' => 1,
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'error_check' => 'alphanumeric|unique'
|
'error_check' => 'alphanumeric|unique'
|
||||||
|
|||||||
@@ -770,6 +770,15 @@ class Login extends \CoreLibs\DB\IO
|
|||||||
return $is_valid_password;
|
return $is_valid_password;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// METHOD: loginPasswordForgot
|
||||||
|
// PARAMS: none
|
||||||
|
// RETURN: none
|
||||||
|
// DESC : dummy declare for password forget
|
||||||
|
private function loginPasswordForgot()
|
||||||
|
{
|
||||||
|
// will do some password recovert, eg send email
|
||||||
|
}
|
||||||
|
|
||||||
// METHOD: loginSetPasswordMinLength
|
// METHOD: loginSetPasswordMinLength
|
||||||
// PARAMS: set the minimum length
|
// PARAMS: set the minimum length
|
||||||
// RETURN: true/false on success
|
// RETURN: true/false on success
|
||||||
|
|||||||
@@ -435,7 +435,7 @@ class PgSQL
|
|||||||
return $offset;
|
return $offset;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$offset = pg_array_parse($text, $output[], $limit, $offset + 1);
|
$offset = $this->__dbArrayParse($text, $output[], $limit, $offset + 1);
|
||||||
}
|
}
|
||||||
} while ($limit > $offset);
|
} while ($limit > $offset);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace CoreLibs\Language\Core;
|
|||||||
|
|
||||||
// Preloads entire file in memory first, then creates a StringReader
|
// Preloads entire file in memory first, then creates a StringReader
|
||||||
// over it (it assumes knowledge of StringReader internals)
|
// over it (it assumes knowledge of StringReader internals)
|
||||||
class CachedFileReader extends CoreLibs\Language\Core\StringReader
|
class CachedFileReader extends \CoreLibs\Language\Core\StringReader
|
||||||
{
|
{
|
||||||
public function __construct($filename)
|
public function __construct($filename)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ class GetTextReader
|
|||||||
* Detects which plural form to take
|
* Detects which plural form to take
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
* @param n count
|
* @param string count
|
||||||
* @return int array index of the right plural form
|
* @return int array index of the right plural form
|
||||||
*/
|
*/
|
||||||
private function select_string($n)
|
private function select_string($n)
|
||||||
|
|||||||
@@ -923,12 +923,12 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'date': // YYYY-MM-DD
|
case 'date': // YYYY-MM-DD
|
||||||
if (!check_date($this->table_array[$key]['value'], 1)) {
|
if (!$this->checkDate($this->table_array[$key]['value'], 1)) {
|
||||||
$this->msg .= sprintf($this->l->__('Please enter a vailid date (YYYY-MM-DD) for the <b>%s</b> Field!<br>'), $this->table_array[$key]['output_name']);
|
$this->msg .= sprintf($this->l->__('Please enter a vailid date (YYYY-MM-DD) for the <b>%s</b> Field!<br>'), $this->table_array[$key]['output_name']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'time': // HH:MM[:SS]
|
case 'time': // HH:MM[:SS]
|
||||||
if (!check_time($this->table_array[$key]['value'])) {
|
if (!$this->checkDateTime($this->table_array[$key]['value'])) {
|
||||||
$this->msg .= sprintf($this->l->__('Please enter a vailid time (HH:MM[:SS]) for the <b>%s</b> Field!<br>'), $this->table_array[$key]['output_name']);
|
$this->msg .= sprintf($this->l->__('Please enter a vailid time (HH:MM[:SS]) for the <b>%s</b> Field!<br>'), $this->table_array[$key]['output_name']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ class SmartyExtend extends SmartyBC
|
|||||||
SmartyBC::__construct();
|
SmartyBC::__construct();
|
||||||
$this->l10n = new \CoreLibs\Language\L10n($lang);
|
$this->l10n = new \CoreLibs\Language\L10n($lang);
|
||||||
// variable variable register
|
// variable variable register
|
||||||
$this->register_modifier('getvar', array(&$this, 'get_template_vars'));
|
// $this->register_modifier('getvar', array(&$this, 'get_template_vars'));
|
||||||
|
$this->registerPlugin('modifier', 'getvar', array(&$this, 'get_template_vars'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
namespace FileUpload;
|
namespace FileUpload;
|
||||||
|
|
||||||
use \FileUpload\Core\qqUploadedFileForm;
|
use \FileUpload\Core;
|
||||||
use \FileUpload\Core\qqUploadedFileXhr;
|
|
||||||
|
|
||||||
class qqFileUploader
|
class qqFileUploader
|
||||||
{
|
{
|
||||||
@@ -21,9 +20,9 @@ class qqFileUploader
|
|||||||
$this->checkServerSettings();
|
$this->checkServerSettings();
|
||||||
|
|
||||||
if (isset($_GET['qqfile'])) {
|
if (isset($_GET['qqfile'])) {
|
||||||
$this->file = new qqUploadedFileXhr();
|
$this->file = new \FileUpload\Core\qqUploadedFileXhr();
|
||||||
} elseif (isset($_FILES['qqfile'])) {
|
} elseif (isset($_FILES['qqfile'])) {
|
||||||
$this->file = new qqUploadedFileForm();
|
$this->file = new \FileUpload\Core\qqUploadedFileForm();
|
||||||
} else {
|
} else {
|
||||||
$this->file = false;
|
$this->file = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user