本文整理汇总了PHP中jFile::move方法的典型用法代码示例。如果您正苦于以下问题:PHP jFile::move方法的具体用法?PHP jFile::move怎么用?PHP jFile::move使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jFile
的用法示例。
在下文中一共展示了jFile::move方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkData
//.........这里部分代码省略.........
$this->setError(JText::_('COM_JDOWNLOADS_BACKEND_FILESEDIT_INVALID_FILE_SIZE'));
return false;
}
}
// check the access handling
if ($user_rules->form_access == 0) {
// the access select field was not viewed so we use the default value when exist
if ($user_rules->uploads_default_access_level) {
$this->access = (int) $user_rules->uploads_default_access_level;
$default_access_value_used = true;
}
} else {
// the access select field was viewed
if ($this->access > 1) {
// user has selected a special access level so we do not use the access value from parent category
$default_access_value_used = true;
}
}
}
// this part is always used
if ($this->cat_id > 1) {
if ($isNew && !$default_access_value_used) {
// set access level value from parent
$query = "SELECT * FROM #__jdownloads_categories WHERE id = '{$this->cat_id}'";
$db->setQuery($query);
$parent_cat = $db->loadObject();
$this->access = $parent_cat->access;
}
}
// we need the rest only when the new item is not added by monitoring !!!
if (!$auto_added) {
// get the uploaded image files
$imagefiles = $jFileInput->get('file_upload_thumb', array(), 'array');
$movedmsg = '';
$errormsg = '';
$cat_dir_org = '';
$filename_org = '';
$marked_cat_id = '';
$file_cat_changed = false;
$invalid_filename = false;
$thumb_created = false;
$image_created = false;
$image_thumb_name = '';
$filename_renamed = false;
$filename_new_name = '';
$filename_old_name = '';
$use_xml_for_file_info = 0;
$selected_updatefile = 0;
// use xml install file to fill the file informations
if (isset($formdata['use_xml'])) {
$use_xml_for_file_info = (int) $formdata['use_xml'];
}
// marked cat id
if (isset($formdata['cat_id'])) {
$marked_cat_id = (int) $formdata['cat_id'];
} else {
// is download added about jdownloadsModeldownload::createDownload() ?
if ($this->cat_id > 0) {
$marked_cat_id = (int) $this->cat_id;
}
}
// prior marked cat id
$cat_dir_org = $jinput->get('cat_dir_org', 0, 'integer');
// original filename changed?
$filename_org = $jinput->get('filename_org', '', 'string');
if (!$isNew && $filename_org != '' && $formdata['url_download'] != '' && $filename_org != $formdata['url_download']) {