Created
August 8, 2011 20:16
-
-
Save marcoscoelho/1132619 to your computer and use it in GitHub Desktop.
Helper file of the "Files module" to PyroCMS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('BASEPATH') OR exit('No direct script access allowed.'); | |
/** | |
* CodeIgniter Files Helpers | |
* | |
* @package CodeIgniter | |
* @subpackage Helpers | |
* @category Helpers | |
* @author PyroCMS development team | |
*/ | |
// ------------------------------------------------------------------------ | |
function get_file_folders() | |
{ | |
ci()->load->model('files/file_folders_m'); | |
$folders_tree = ci()->file_folders_m->get_folders(); | |
$arr = array('0=' . lang('select.pick')); | |
foreach ($folders_tree as $id => $folder) | |
{ | |
$arr[] = $id . '=' . str_repeat('» ', $folder->depth) . $folder->name; | |
} | |
return $arr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment