| 1 | ## bMotion plugins loader: admin |
|---|
| 2 | # |
|---|
| 3 | # $Id$ |
|---|
| 4 | # |
|---|
| 5 | |
|---|
| 6 | ############################################################################### |
|---|
| 7 | # This is a bMotion plugin |
|---|
| 8 | # Copyright (C) James Michael Seward 2000-2002 |
|---|
| 9 | # |
|---|
| 10 | # This program is covered by the GPL, please refer the to LICENCE file in the |
|---|
| 11 | # distribution; further information can be found in the headers of the scripts |
|---|
| 12 | # in the modules directory. |
|---|
| 13 | ############################################################################### |
|---|
| 14 | |
|---|
| 15 | set currentlang $bMotionInfo(language) |
|---|
| 16 | set languages [split $bMotionSettings(languages) ","] |
|---|
| 17 | foreach bMotion_language $languages { |
|---|
| 18 | set bMotionInfo(language) $bMotion_language |
|---|
| 19 | bMotion_putloglev 2 * "bMotion: loading admin plugins language = $bMotion_language" |
|---|
| 20 | set files [glob -nocomplain "$bMotionPlugins/$bMotion_language/admin_*.tcl"] |
|---|
| 21 | foreach f $files { |
|---|
| 22 | set count [llength [array names bMotion_plugins_admin]] |
|---|
| 23 | bMotion_putloglev 1 * "bMotion: loading ($bMotion_language) admin plugin file $f" |
|---|
| 24 | catch { |
|---|
| 25 | source $f |
|---|
| 26 | } err |
|---|
| 27 | set newcount [llength [array names bMotion_plugins_admin]] |
|---|
| 28 | if {($bMotion_testing == 0) && ($newcount == $count)} { |
|---|
| 29 | putlog "bMotion: ALERT! admin plugin file $f added no plugins" |
|---|
| 30 | putlog "Possible error: $err" |
|---|
| 31 | } |
|---|
| 32 | } |
|---|
| 33 | } |
|---|
| 34 | set bMotionInfo(language) $currentlang |
|---|
| 35 | unset currentlang |
|---|
| 36 | |
|---|
| 37 | # load default admin stuff regardless |
|---|
| 38 | set files [glob -nocomplain "$bMotionPlugins/admin_*.tcl"] |
|---|
| 39 | foreach f $files { |
|---|
| 40 | bMotion_putloglev 1 * "bMotion: loading (generic) admin plugin file $f" |
|---|
| 41 | catch { |
|---|
| 42 | source $f |
|---|
| 43 | } |
|---|
| 44 | } |
|---|