コード例 #1
0
ファイル: actions.php プロジェクト: pathumego/easykarma
/**
 *  DUPLICATOR_DELETE
 *  Deletes the zip file and database record entries for the
 *  selected ids.  Supports 1 to many deletes
 *
 *  @return string   A message about the action.  
 * 		- see: duplicator_unlink
 */
function duplicator_delete()
{
    try {
        $uniqueid = isset($_POST['duplicator_delid']) ? trim($_POST['duplicator_delid']) : null;
        if ($uniqueid != null) {
            $unique_list = explode(",", $uniqueid);
            foreach ($unique_list as $id) {
                $msg = duplicator_unlink($id);
            }
        }
        die($msg);
    } catch (Exception $e) {
        die("log:fun__delete=>runtime error: " . $e);
    }
}
コード例 #2
0
/**
 *  DUPLICATOR_DELETE
 *  Deletes the zip file and database record entries for the
 *  selected ids.  Supports 1 to many deletes
 *
 *  @return string   A message about the action.  
 * 		- see: duplicator_unlink
 */
function duplicator_delete()
{
    //post data un-stripped, as WP magic quotes _POST for some reason...
    $post = stripslashes_deep($_POST);
    try {
        $uniqueid = isset($post['duplicator_delid']) ? trim($post['duplicator_delid']) : null;
        if ($uniqueid != null) {
            $unique_list = explode(",", $uniqueid);
            foreach ($unique_list as $id) {
                $msg = duplicator_unlink($id);
            }
        }
        die($msg);
    } catch (Exception $e) {
        die("log:fun__delete=>runtime error: " . $e);
    }
}