1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 13:21:54 +02:00

Image to Bbcode routines and batch conversion option added to admin News area (when in debug mode)

This commit is contained in:
Cameron
2017-12-27 20:58:59 -08:00
parent 66cb38cb85
commit 2788e9745c
5 changed files with 228 additions and 66 deletions

View File

@@ -3458,6 +3458,8 @@ class e_admin_controller_ui extends e_admin_controller
//something like handleListUrlTypeBatch(); for custom handling of 'url_type' field name
$method = 'handle'.$actionName.$this->getRequest()->camelize($field).'Batch';
e107::getDebug()->log("Checking for batch method: ".$method);
if(method_exists($this, $method)) // callback handling
{
$this->$method($selected, $value);
@@ -3467,6 +3469,7 @@ class e_admin_controller_ui extends e_admin_controller
//handleListBatch(); for custom handling of all field names
if(empty($selected)) return $this;
$method = 'handle'.$actionName.'Batch';
e107::getDebug()->log("Checking for batch method: ".$method);
if(method_exists($this, $method))
{
$this->$method($selected, $field, $value);
@@ -4787,6 +4790,19 @@ class e_admin_ui extends e_admin_controller_ui
parent::manageColumns();
}
/**
* Detect if a batch function has been fired.
* @param $batchKey
* @return bool
*/
public function batchTriggered($batchKey)
{
return (!empty($_POST['e__execute_batch']) && (varset($_POST['etrigger_batch']) == $batchKey));
}
/**
* Catch batch submit
* @param string $batch_trigger