OSDN Git Service

ファイル幅高さチェックのエラー修正
authorCake <cake_67@users.sourceforge.jp>
Thu, 18 Feb 2010 05:46:59 +0000 (14:46 +0900)
committerCake <cake_67@users.sourceforge.jp>
Thu, 18 Feb 2010 05:46:59 +0000 (14:46 +0900)
app/controllers/users_controller.php
app/libs/core_plus.php
app/views/site_configs/admin_edit.ctp

index 4c30db0..9382eb4 100644 (file)
@@ -93,7 +93,7 @@ class UsersController extends ModuleController {
                                'file',
                        );
 
-                       // validate
+                       /* validate */
                        // ファイル容量
                        $filesize = Configure::read('Upload.imagefile.FileSizeMax');
                        if (empty($filesize) || $filesize <= 0) {
@@ -115,7 +115,7 @@ class UsersController extends ModuleController {
                                'fieldList' => $fieldList
                        ))) {
                                $this->Session->setFlash(__('The User image has been saved', true));
-//                             $this->redirect(array('action'=>'index'));
+                               $this->redirect(array('action'=>'edit_image'));
                        } else {
                                $this->Session->setFlash(__('The User image could not be saved. Please, try again.', true));
                                $this->data['User']['id'] = $id;
index e7f34e6..567a2ca 100644 (file)
@@ -49,7 +49,7 @@ class CorePlus extends Object {
                        } else {
                                $site_configs[$k] = $v;
                        }
-                       Configure::write($k, $v['value']);
+                       Configure::write($k, $site_configs[$k]['value']);
                }
 
                return $site_configs;
index 22de315..ed647f9 100644 (file)
@@ -49,7 +49,7 @@ $(function() {
 
 <table>
 <tr>
-<th><?php echo __('Upload Imagefile FileSize Max') ?></th>
+<th><?php echo __('Max File Size of Upload Imagefile') ?></th>
 <td class="sizeInput" id="Upload_imagefileFileSizeMax">
 <input name="data[SiteConfig][Upload.imagefile.FileSizeMax][value]" type="text" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.FileSizeMax']['value'];?>"> <?php __('kByte') ?>
 <input name="data[SiteConfig][Upload.imagefile.FileSizeMax][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.FileSizeMax']['id'];?>"><br>
@@ -57,18 +57,12 @@ $(function() {
 </td>
 </tr>
 <tr>
-<th><?php echo __('Upload Imagefile Width Max') ?></th>
-<td class="sizeInput" id="Upload_imagefileWidthMax">
-<input name="data[SiteConfig][Upload.imagefile.WidthMax][value]" type="text" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.WidthMax']['value'];?>"> <?php __('px') ?>
-<input name="data[SiteConfig][Upload.imagefile.WidthMax][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.WidthMax']['id'];?>"><br>
-<?php echo $html->div('caption', __('Zero or NULL means NO LIMIT.', true)); ?>
-</td>
-</tr>
-<tr>
-<th><?php echo __('Upload Imagefile Height Max') ?></th>
-<td class="sizeInput" id="Upload_imagefileHeightMax">
-<input name="data[SiteConfig][Upload.imagefile.HeightMax][value]" type="text" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.HeightMax']['value'];?>"> <?php __('px') ?>
-<input name="data[SiteConfig][Upload.imagefile.HeightMax][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.HeightMax']['id'];?>"><br>
+<th><?php echo __('Max Size of Upload Imagefile') ?></th>
+<td class="sizeInput" id="Upload_imagefileSizeMax">
+<div id="Upload_imagefileWidthMax"><?php __('Width') ?> <input name="data[SiteConfig][Upload.imagefile.WidthMax][value]" type="text" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.WidthMax']['value'];?>"> <?php __('px') ?><input name="data[SiteConfig][Upload.imagefile.WidthMax][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.WidthMax']['id'];?>"></div>
+<div id="Upload_imagefileHeightMax"><?php __('Height') ?> <input name="data[SiteConfig][Upload.imagefile.HeightMax][value]" type="text" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.HeightMax']['value'];?>"> <?php __('px') ?>
+<input name="data[SiteConfig][Upload.imagefile.HeightMax][id]" type="hidden" value="<?php echo $this->data['SiteConfig']['Upload.imagefile.HeightMax']['id'];?>"></div>
+<?php echo $html->div('caption', __('Both width and height must be determined.', true)); ?>
 <?php echo $html->div('caption', __('Zero or NULL means NO LIMIT.', true)); ?>
 </td>
 </tr>