Dotclear


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.admincombos.php

    r2566 r2679  
    5151     */ 
    5252     public static function getPostStatusesCombo() { 
    53           $status_combo =  array(); 
     53          $status_combo =      array(); 
    5454          foreach (self::$core->blog->getAllPostStatus() as $k => $v) { 
    5555               $status_combo[$v] = (string) $k; 
     
    141141 
    142142     /** 
    143      Returns a combo containing all available formaters in admin 
    144  
    145      @return   <b>array</b> the combo box (form::combo -compatible format) 
    146      */ 
    147      public static function getFormatersCombo() { 
    148           foreach (self::$core->getFormaters() as $v) { 
    149                $formaters_combo[$v] = $v; 
    150           } 
     143     Returns a combo containing all available editors in admin 
     144 
     145     @return   <b>array</b> the combo box (form::combo -compatible format) 
     146     */ 
     147     public static function getEditorsCombo() 
     148     { 
     149          $editors_combo = array(); 
     150 
     151          foreach (self::$core->getEditors() as $v) { 
     152               $editors_combo[$v] = $v; 
     153          } 
     154           
     155          return $editors_combo; 
     156     } 
     157 
     158     /** 
     159     Returns a combo containing all available formaters by editor in admin 
     160 
     161     @param    editor_id <b>string</b>  Editor id (dcLegacyEditor, dcCKEditor, ...) 
     162     @return   <b>array</b> the combo box (form::combo -compatible format) 
     163     */ 
     164     public static function getFormatersCombo($editor_id='') 
     165     { 
     166          $formaters_combo = array(); 
     167 
     168        if (!empty($editor_id)) { 
     169            foreach (self::$core->getFormaters($editor_id) as $formater) { 
     170                $formaters_combo[$formater] = $formater; 
     171            } 
     172        } else { 
     173            foreach (self::$core->getFormaters() as $editor => $formaters) { 
     174                foreach ($formaters as $formater) { 
     175                    $formaters_combo[$editor][$formater] = $formater; 
     176                } 
     177            } 
     178        } 
     179 
    151180          return $formaters_combo; 
    152181     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map