Skip to content

Commit e5bda56

Browse files
committed
Updated Grocery CRUD to v1.5.1
1 parent 7ea6c0a commit e5bda56

File tree

635 files changed

+10191
-10014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

635 files changed

+10191
-10014
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions

README.md

Lines changed: 5 additions & 5 deletions

applications/backend/config/grocery_crud.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
//Make sure that the number of grocery_crud_default_per_page variable is included to this array.
2929
$config['grocery_crud_paging_options'] = array('10','25','50','100');
3030

31-
//The environment is important so we can have specific configurations for specific environments
31+
//Default theme for grocery CRUD
3232
$config['grocery_crud_default_theme'] = 'flexigrid';
3333

3434
//The environment is important so we can have specific configurations for specific environments

applications/backend/libraries/Grocery_CRUD.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,13 @@ protected function upload_file($state_info)
13831383
header('Access-Control-Allow-Headers: X-File-Name, X-File-Type, X-File-Size');
13841384

13851385
$allowed_files = $this->config->file_upload_allow_file_types;
1386-
$reg_exp = '/(\\.|\\/)('.$allowed_files.')$/i';
1386+
1387+
$reg_exp = '';
1388+
if(!empty($upload_info->allowed_file_types)){
1389+
$reg_exp = '/(\\.|\\/)('.$upload_info->allowed_file_types.')$/i';
1390+
}else{
1391+
$reg_exp = '/(\\.|\\/)('.$allowed_files.')$/i';
1392+
}
13871393

13881394
$max_file_size_ui = $this->config->file_upload_max_file_size;
13891395
$max_file_size_bytes = $this->_convert_bytes_ui_to_bytes($max_file_size_ui);
@@ -2111,10 +2117,12 @@ protected function get_layout()
21112117
}
21122118

21132119
if ($this->unset_bootstrap) {
2114-
unset($js_files[sha1($this->default_theme_path.'/twitter-bootstrap/js/libs/bootstrap/bootstrap.min.js')]);
2115-
unset($js_files[sha1($this->default_theme_path.'/twitter-bootstrap/js/libs/bootstrap/application.js')]);
2116-
unset($css_files[sha1($this->default_theme_path.'/twitter-bootstrap/css/bootstrap-responsive.min.css')]);
2117-
unset($css_files[sha1($this->default_theme_path.'/twitter-bootstrap/css/bootstrap.min.css')]);
2120+
unset($js_files[sha1($this->default_theme_path.'/bootstrap/js/bootstrap/dropdown.js')]);
2121+
unset($js_files[sha1($this->default_theme_path.'/bootstrap/js/bootstrap/modal.js')]);
2122+
unset($js_files[sha1($this->default_theme_path.'/bootstrap/js/bootstrap/dropdown.min.js')]);
2123+
unset($js_files[sha1($this->default_theme_path.'/bootstrap/js/bootstrap/modal.min.js')]);
2124+
unset($css_files[sha1($this->default_theme_path.'/bootstrap/css/bootstrap/bootstrap.css')]);
2125+
unset($css_files[sha1($this->default_theme_path.'/bootstrap/css/bootstrap/bootstrap.min.css')]);
21182126
}
21192127

21202128
if($this->echo_and_die === false)
@@ -3995,8 +4003,7 @@ protected function _load_date_format()
39954003
{
39964004
list($php_day, $php_month, $php_year) = array('d','m','Y');
39974005
list($js_day, $js_month, $js_year) = array('dd','mm','yy');
3998-
list($ui_day, $ui_month, $ui_year) = array('dd','mm','yyyy');
3999-
//@todo ui_day, ui_month, ui_year has to be lang strings
4006+
list($ui_day, $ui_month, $ui_year) = array($this->l('ui_day'), $this->l('ui_month'), $this->l('ui_year'));
40004007

40014008
$date_format = $this->config->date_format;
40024009
switch ($date_format) {
@@ -5137,7 +5144,7 @@ public function set_relation_n_n($field_name, $relation_table, $selection_table,
51375144
* @param string $upload_path
51385145
* @return Grocery_CRUD
51395146
*/
5140-
public function set_field_upload($field_name, $upload_dir = '')
5147+
public function set_field_upload($field_name, $upload_dir = '', $allowed_file_types = '')
51415148
{
51425149
$upload_dir = !empty($upload_dir) && substr($upload_dir,-1,1) == '/'
51435150
? substr($upload_dir,0,-1)
@@ -5153,6 +5160,7 @@ public function set_field_upload($field_name, $upload_dir = '')
51535160
$this->upload_fields[$field_name] = (object) array(
51545161
'field_name' => $field_name,
51555162
'upload_path' => $upload_dir,
5163+
'allowed_file_types' => $allowed_file_types,
51565164
'encrypted_field_name' => $this->_unique_field_name($field_name));
51575165
return $this;
51585166
}

applications/backend/libraries/image_moo.php

100755100644
File mode changed.

assets/grocery_crud/config/index.html

100755100644
File mode changed.

assets/grocery_crud/config/language_alias.php

100755100644
File mode changed.

assets/grocery_crud/config/translit_chars.php

100755100644
File mode changed.

assets/grocery_crud/css/index.html

100755100644
File mode changed.

assets/grocery_crud/css/jquery_plugins/chosen/chosen-sprite.png

100755100644
File mode changed.

0 commit comments

Comments
 (0)