mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify
This commit is contained in:
commit
2500489c93
@ -42,6 +42,7 @@ var promiseForCategory = new Promise(function (resolve) {
|
|||||||
})
|
})
|
||||||
level++;
|
level++;
|
||||||
}
|
}
|
||||||
|
console.log(all_categories)
|
||||||
resolve(all_categories);
|
resolve(all_categories);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -59,6 +60,24 @@ promiseForCategory.then(function (categories_list) {
|
|||||||
$('.' + index).append("<option value='" + value2.id + "'" + selected + ">" + value2.name + "</option>");
|
$('.' + index).append("<option value='" + value2.id + "'" + selected + ">" + value2.name + "</option>");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
level++;
|
||||||
|
crud({
|
||||||
|
'level': level,
|
||||||
|
"cat": id_list['cat' + Object.keys(id_list).length]
|
||||||
|
}, '/class/ajaxCategory', 'POST', function (callback) {
|
||||||
|
|
||||||
|
if(callback.length > 0)
|
||||||
|
{
|
||||||
|
$('.category-row').append(CategoryField('cat'+level, level));
|
||||||
|
$.each(callback, function (index2, value2) {
|
||||||
|
selected = "";
|
||||||
|
|
||||||
|
$('.' + 'cat'+level).append("<option value='" + value2.id + "'" + selected + ">" + value2.name + "</option>");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -118,8 +118,11 @@ class UploadController extends AdminController
|
|||||||
$path = explode('/', $parsed['path']);
|
$path = explode('/', $parsed['path']);
|
||||||
$filename = end($path);
|
$filename = end($path);
|
||||||
|
|
||||||
$isImageUser = FilesFilesEntryModel::query()->where('created_by_id', Auth::id())
|
$isImageUser = FilesFilesEntryModel::query();
|
||||||
->where('name', $filename)->first();
|
if (!auth()->user()->hasRole('admin')) {
|
||||||
|
$isImageUser = $isImageUser->where('created_by_id', Auth::id());
|
||||||
|
}
|
||||||
|
$isImageUser = $isImageUser->where('name', $filename)->first();
|
||||||
if ($isImageUser != null) {
|
if ($isImageUser != null) {
|
||||||
WaterMark::make(Storage::path('images/' . $filename))->rotate(90)
|
WaterMark::make(Storage::path('images/' . $filename))->rotate(90)
|
||||||
->save(app_storage_path() . '/files-module/local/images/' . $filename);
|
->save(app_storage_path() . '/files-module/local/images/' . $filename);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user