Clean up for move to .php files an phan checks
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
use \CoreLibs\Upload;
|
||||
|
||||
$DEBUG_ALL = 1;
|
||||
$ECHO_ALL = 0;
|
||||
$PRINT_ALL = 1;
|
||||
@@ -18,7 +16,7 @@ $MAX_UPLOAD_SIZE = $base->StringByteFormat(ini_get('upload_max_filesize'));
|
||||
$allowedExtensions = array ('csv', 'zip', 'jpg', 'pdf', 'bz2');
|
||||
$sizeLimit = $MAX_UPLOAD_SIZE; // as set in php ini
|
||||
$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
|
||||
$_action= $_POST['action'] ? $_POST['action'] : $_GET['action'];
|
||||
$_task_uid = $_POST['task_uid'] ? $_POST['task_uid'] : $_GET['task_uid'];
|
||||
|
||||
@@ -9,19 +9,19 @@ $edit_access = array (
|
||||
),
|
||||
'name' => array (
|
||||
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
||||
'output_name' => $this->l->__('Access Group Name'),
|
||||
'output_name' => 'Access Group Name',
|
||||
'mandatory' => 1,
|
||||
'type' => 'text',
|
||||
'error_check' => 'alphanumericspace|unique'
|
||||
),
|
||||
'description' => array (
|
||||
'value' => isset($GLOBALS['description']) ? $GLOBALS['description'] : '',
|
||||
'output_name' => $this->l->__('Description'),
|
||||
'output_name' => 'Description',
|
||||
'type' => 'textarea'
|
||||
),
|
||||
'color' => array (
|
||||
'value' => isset($GLOBALS['color']) ? $GLOBALS['color'] : '',
|
||||
'output_name' => $this->l->__('Color'),
|
||||
'output_name' => 'Color',
|
||||
'mandatory' => 0,
|
||||
'type' => 'text',
|
||||
'size' => 6,
|
||||
|
||||
@@ -9,13 +9,13 @@ $edit_menu_group = array (
|
||||
),
|
||||
'name' => array (
|
||||
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
||||
'output_name' => $this->l->__('Group name'),
|
||||
'output_name' => 'Group name',
|
||||
'mandatory' => 1,
|
||||
'type' => 'text'
|
||||
),
|
||||
'flag' => array (
|
||||
'value' => isset($GLOBALS['flag']) ? $GLOBALS['flag'] : '',
|
||||
'output_name' => $this->l->__('Flag'),
|
||||
'output_name' => 'Flag',
|
||||
'mandatory' => 1,
|
||||
'type' => 'text',
|
||||
'error_check' => 'alphanumeric|unique'
|
||||
|
||||
@@ -9,13 +9,13 @@ $edit_visible_group = array (
|
||||
),
|
||||
'name' => array (
|
||||
'value' => isset($GLOBALS['name']) ? $GLOBALS['name'] : '',
|
||||
'output_name' => $this->l->__('Group name'),
|
||||
'output_name' => 'Group name',
|
||||
'mandatory' => 1,
|
||||
'type' => 'text'
|
||||
),
|
||||
'flag' => array (
|
||||
'value' => isset($GLOBALS['flag']) ? $GLOBALS['flag'] : '',
|
||||
'output_name' => $this->l->__('Flag'),
|
||||
'output_name' => 'Flag',
|
||||
'mandatory' => 1,
|
||||
'type' => 'text',
|
||||
'error_check' => 'alphanumeric|unique'
|
||||
|
||||
@@ -770,6 +770,15 @@ class Login extends \CoreLibs\DB\IO
|
||||
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
|
||||
// PARAMS: set the minimum length
|
||||
// RETURN: true/false on success
|
||||
|
||||
@@ -435,7 +435,7 @@ class PgSQL
|
||||
return $offset;
|
||||
}
|
||||
} else {
|
||||
$offset = pg_array_parse($text, $output[], $limit, $offset + 1);
|
||||
$offset = $this->__dbArrayParse($text, $output[], $limit, $offset + 1);
|
||||
}
|
||||
} while ($limit > $offset);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace CoreLibs\Language\Core;
|
||||
|
||||
// Preloads entire file in memory first, then creates a StringReader
|
||||
// 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)
|
||||
{
|
||||
|
||||
@@ -369,7 +369,7 @@ class GetTextReader
|
||||
* Detects which plural form to take
|
||||
*
|
||||
* @access private
|
||||
* @param n count
|
||||
* @param string count
|
||||
* @return int array index of the right plural form
|
||||
*/
|
||||
private function select_string($n)
|
||||
|
||||
@@ -923,12 +923,12 @@ class Generate extends \CoreLibs\DB\Extended\ArrayIO
|
||||
}
|
||||
break;
|
||||
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']);
|
||||
}
|
||||
break;
|
||||
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']);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -25,7 +25,8 @@ class SmartyExtend extends SmartyBC
|
||||
SmartyBC::__construct();
|
||||
$this->l10n = new \CoreLibs\Language\L10n($lang);
|
||||
// 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;
|
||||
|
||||
use \FileUpload\Core\qqUploadedFileForm;
|
||||
use \FileUpload\Core\qqUploadedFileXhr;
|
||||
use \FileUpload\Core;
|
||||
|
||||
class qqFileUploader
|
||||
{
|
||||
@@ -21,9 +20,9 @@ class qqFileUploader
|
||||
$this->checkServerSettings();
|
||||
|
||||
if (isset($_GET['qqfile'])) {
|
||||
$this->file = new qqUploadedFileXhr();
|
||||
$this->file = new \FileUpload\Core\qqUploadedFileXhr();
|
||||
} elseif (isset($_FILES['qqfile'])) {
|
||||
$this->file = new qqUploadedFileForm();
|
||||
$this->file = new \FileUpload\Core\qqUploadedFileForm();
|
||||
} else {
|
||||
$this->file = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user