From 29d847e44366d4c5af10280bd38c06d79e4988c3 Mon Sep 17 00:00:00 2001 From: YuCheng Hu Date: Sun, 13 Jun 2010 23:30:23 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=20trunk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@336 a2543c7e-f6e9-4f8a-8bff-1ffc34733512 --- .../com_content/admin.content.html.php | 925 +++++++++++ .../components/com_content/admin.content.php | 137 ++ .../components/com_content/config.xml | 106 ++ .../components/com_content/content.xml | 14 + .../components/com_content/controller.php | 1469 +++++++++++++++++ .../com_content/elements/article.php | 60 + .../com_content/elements/author.php | 38 + .../com_content/elements/index.html | 1 + .../components/com_content/helper.php | 122 ++ .../components/com_content/helper/content.php | 72 + .../components/com_content/helper/index.html | 1 + .../components/com_content/index.html | 1 + .../components/com_content/models/article.xml | 97 ++ .../components/com_content/models/element.php | 156 ++ .../components/com_content/models/index.html | 1 + .../com_content/toolbar.content.html.php | 84 + .../com_content/toolbar.content.php | 48 + .../com_content/views/element/index.html | 1 + .../com_content/views/element/view.php | 204 +++ .../components/com_content/views/index.html | 1 + .../components/com_media/assets/delete.png | Bin 0 -> 715 bytes .../components/com_media/assets/index.html | 1 + .../com_media/assets/medialist-details.css | 39 + .../com_media/assets/medialist-thumbs.css | 105 ++ .../com_media/assets/mediamanager.css | 106 ++ .../com_media/assets/mediamanager.js | 180 ++ .../components/com_media/assets/mootree.gif | Bin 0 -> 14839 bytes .../com_media/assets/popup-imagelist.css | 54 + .../com_media/assets/popup-imagemanager.css | 114 ++ .../com_media/assets/popup-imagemanager.js | 246 +++ .../components/com_media/assets/progress.gif | Bin 0 -> 790 bytes .../components/com_media/assets/upload.png | Bin 0 -> 758 bytes .../components/com_media/config.xml | 32 + .../components/com_media/controller.php | 90 + .../components/com_media/controllers/file.php | 188 +++ .../com_media/controllers/folder.php | 130 ++ .../com_media/controllers/index.html | 1 + .../components/com_media/helpers/index.html | 1 + .../components/com_media/helpers/media.php | 186 +++ .../components/com_media/images/btnBack.gif | Bin 0 -> 603 bytes .../com_media/images/btnFolderNew.gif | Bin 0 -> 604 bytes .../com_media/images/btnFolderUp.gif | Bin 0 -> 599 bytes .../components/com_media/images/con_info.png | Bin 0 -> 855 bytes .../components/com_media/images/dots.gif | Bin 0 -> 181 bytes .../com_media/images/edit_pencil.gif | Bin 0 -> 138 bytes .../com_media/images/edit_trash.gif | Bin 0 -> 145 bytes .../components/com_media/images/folder.gif | Bin 0 -> 1293 bytes .../components/com_media/images/folder.png | Bin 0 -> 2199 bytes .../components/com_media/images/folder_sm.png | Bin 0 -> 703 bytes .../components/com_media/images/folderup.png | Bin 0 -> 682 bytes .../com_media/images/folderup_16.png | Bin 0 -> 682 bytes .../com_media/images/folderup_32.png | Bin 0 -> 1833 bytes .../components/com_media/images/index.html | 1 + .../components/com_media/images/info.png | Bin 0 -> 553 bytes .../com_media/images/mime-icon-16/avi.png | Bin 0 -> 731 bytes .../com_media/images/mime-icon-16/doc.png | Bin 0 -> 537 bytes .../com_media/images/mime-icon-16/index.html | 1 + .../com_media/images/mime-icon-16/mov.png | Bin 0 -> 747 bytes .../com_media/images/mime-icon-16/mp3.png | Bin 0 -> 756 bytes .../com_media/images/mime-icon-16/mp4.png | Bin 0 -> 731 bytes .../com_media/images/mime-icon-16/odc.png | Bin 0 -> 741 bytes .../com_media/images/mime-icon-16/odd.png | Bin 0 -> 772 bytes .../com_media/images/mime-icon-16/odt.png | Bin 0 -> 578 bytes .../com_media/images/mime-icon-16/ogg.png | Bin 0 -> 759 bytes .../com_media/images/mime-icon-16/pdf.png | Bin 0 -> 633 bytes .../com_media/images/mime-icon-16/ppt.png | Bin 0 -> 592 bytes .../com_media/images/mime-icon-16/rar.png | Bin 0 -> 751 bytes .../com_media/images/mime-icon-16/rtf.png | Bin 0 -> 525 bytes .../com_media/images/mime-icon-16/svg.png | Bin 0 -> 685 bytes .../com_media/images/mime-icon-16/sxd.png | Bin 0 -> 789 bytes .../com_media/images/mime-icon-16/tar.png | Bin 0 -> 749 bytes .../com_media/images/mime-icon-16/tgz.png | Bin 0 -> 757 bytes .../com_media/images/mime-icon-16/wma.png | Bin 0 -> 554 bytes .../com_media/images/mime-icon-16/wmv.png | Bin 0 -> 748 bytes .../com_media/images/mime-icon-16/xls.png | Bin 0 -> 698 bytes .../com_media/images/mime-icon-16/zip.png | Bin 0 -> 768 bytes .../com_media/images/mime-icon-32/avi.png | Bin 0 -> 1705 bytes .../com_media/images/mime-icon-32/doc.png | Bin 0 -> 1110 bytes .../com_media/images/mime-icon-32/index.html | 1 + .../com_media/images/mime-icon-32/mov.png | Bin 0 -> 1667 bytes .../com_media/images/mime-icon-32/mp3.png | Bin 0 -> 1879 bytes .../com_media/images/mime-icon-32/mp4.png | Bin 0 -> 1705 bytes .../com_media/images/mime-icon-32/odc.png | Bin 0 -> 1480 bytes .../com_media/images/mime-icon-32/odd.png | Bin 0 -> 1689 bytes .../com_media/images/mime-icon-32/odt.png | Bin 0 -> 1278 bytes .../com_media/images/mime-icon-32/ogg.png | Bin 0 -> 1884 bytes .../com_media/images/mime-icon-32/pdf.png | Bin 0 -> 1267 bytes .../com_media/images/mime-icon-32/ppt.png | Bin 0 -> 1275 bytes .../com_media/images/mime-icon-32/rar.png | Bin 0 -> 1446 bytes .../com_media/images/mime-icon-32/rtf.png | Bin 0 -> 1135 bytes .../com_media/images/mime-icon-32/svg.png | Bin 0 -> 1198 bytes .../com_media/images/mime-icon-32/sxd.png | Bin 0 -> 1719 bytes .../com_media/images/mime-icon-32/tar.png | Bin 0 -> 1428 bytes .../com_media/images/mime-icon-32/tgz.png | Bin 0 -> 1423 bytes .../com_media/images/mime-icon-32/wma.png | Bin 0 -> 965 bytes .../com_media/images/mime-icon-32/wmv.png | Bin 0 -> 1677 bytes .../com_media/images/mime-icon-32/xls.png | Bin 0 -> 1399 bytes .../com_media/images/mime-icon-32/zip.png | Bin 0 -> 1440 bytes .../components/com_media/images/noimages.gif | Bin 0 -> 780 bytes .../com_media/images/presentation_16.png | Bin 0 -> 501 bytes .../components/com_media/images/remove.png | Bin 0 -> 588 bytes .../com_media/images/spreadsheet_16.png | Bin 0 -> 545 bytes .../com_media/images/terminal_16.png | Bin 0 -> 748 bytes .../components/com_media/images/uploading.gif | Bin 0 -> 1046 bytes .../components/com_media/index.html | 1 + .../components/com_media/media.php | 77 + .../components/com_media/media.xml | 12 + .../components/com_media/models/index.html | 1 + .../components/com_media/models/list.php | 194 +++ .../components/com_media/models/manager.php | 133 ++ .../com_media/views/images/index.html | 1 + .../com_media/views/images/tmpl/default.php | 93 ++ .../com_media/views/images/tmpl/index.html | 1 + .../com_media/views/images/view.html.php | 61 + .../com_media/views/imageslist/index.html | 1 + .../views/imageslist/tmpl/default.php | 26 + .../views/imageslist/tmpl/default_folder.php | 6 + .../views/imageslist/tmpl/default_image.php | 6 + .../views/imageslist/tmpl/index.html | 1 + .../com_media/views/imageslist/view.html.php | 73 + .../com_media/views/media/index.html | 1 + .../com_media/views/media/tmpl/default.php | 83 + .../views/media/tmpl/default_folders.php | 6 + .../com_media/views/media/tmpl/index.html | 1 + .../com_media/views/media/view.html.php | 133 ++ .../com_media/views/medialist/index.html | 1 + .../views/medialist/tmpl/default.php | 0 .../views/medialist/tmpl/details.php | 39 + .../views/medialist/tmpl/details_doc.php | 20 + .../views/medialist/tmpl/details_folder.php | 20 + .../views/medialist/tmpl/details_img.php | 19 + .../views/medialist/tmpl/details_up.php | 13 + .../com_media/views/medialist/tmpl/index.html | 1 + .../com_media/views/medialist/tmpl/thumbs.php | 26 + .../views/medialist/tmpl/thumbs_doc.php | 16 + .../views/medialist/tmpl/thumbs_folder.php | 16 + .../views/medialist/tmpl/thumbs_img.php | 18 + .../views/medialist/tmpl/thumbs_up.php | 15 + .../com_media/views/medialist/view.html.php | 90 + .../components/com_menus/admin.menus.php | 24 + .../com_menus/assets/images/blank.gif | Bin 0 -> 210 bytes .../com_menus/assets/images/blankbottom.gif | Bin 0 -> 205 bytes .../com_menus/assets/images/empty.gif | Bin 0 -> 62 bytes .../com_menus/assets/images/folder.gif | Bin 0 -> 278 bytes .../com_menus/assets/images/folderopen.gif | Bin 0 -> 398 bytes .../com_menus/assets/images/gradient.gif | Bin 0 -> 214 bytes .../com_menus/assets/images/index.html | 1 + .../com_menus/assets/images/join.gif | Bin 0 -> 59 bytes .../com_menus/assets/images/joinbottom.gif | Bin 0 -> 105 bytes .../com_menus/assets/images/line.gif | Bin 0 -> 71 bytes .../com_menus/assets/images/minus.gif | Bin 0 -> 204 bytes .../com_menus/assets/images/minusbottom.gif | Bin 0 -> 259 bytes .../com_menus/assets/images/node.gif | Bin 0 -> 75 bytes .../com_menus/assets/images/nolines_minus.gif | Bin 0 -> 201 bytes .../com_menus/assets/images/nolines_plus.gif | Bin 0 -> 201 bytes .../com_menus/assets/images/page.gif | Bin 0 -> 67 bytes .../com_menus/assets/images/plus.gif | Bin 0 -> 214 bytes .../com_menus/assets/images/plusbottom.gif | Bin 0 -> 210 bytes .../components/com_menus/assets/index.html | 1 + .../com_menus/assets/rtl_images/blank.gif | Bin 0 -> 210 bytes .../assets/rtl_images/blankbottom.gif | Bin 0 -> 206 bytes .../com_menus/assets/rtl_images/empty.gif | Bin 0 -> 62 bytes .../com_menus/assets/rtl_images/folder.gif | Bin 0 -> 274 bytes .../assets/rtl_images/folderopen.gif | Bin 0 -> 398 bytes .../com_menus/assets/rtl_images/gradient.gif | Bin 0 -> 214 bytes .../com_menus/assets/rtl_images/index.html | 1 + .../com_menus/assets/rtl_images/join.gif | Bin 0 -> 60 bytes .../assets/rtl_images/joinbottom.gif | Bin 0 -> 106 bytes .../com_menus/assets/rtl_images/line.gif | Bin 0 -> 72 bytes .../com_menus/assets/rtl_images/minus.gif | Bin 0 -> 204 bytes .../assets/rtl_images/minusbottom.gif | Bin 0 -> 258 bytes .../com_menus/assets/rtl_images/node.gif | Bin 0 -> 76 bytes .../assets/rtl_images/nolines_minus.gif | Bin 0 -> 201 bytes .../assets/rtl_images/nolines_plus.gif | Bin 0 -> 202 bytes .../com_menus/assets/rtl_images/page.gif | Bin 0 -> 67 bytes .../com_menus/assets/rtl_images/plus.gif | Bin 0 -> 214 bytes .../assets/rtl_images/plusbottom.gif | Bin 0 -> 211 bytes .../components/com_menus/assets/type.css | 59 + .../components/com_menus/assets/type_rtl.css | 59 + .../components/com_menus/classes/ilink.php | 390 +++++ .../components/com_menus/classes/index.html | 1 + .../components/com_menus/config.xml | 6 + .../components/com_menus/controller.php | 797 +++++++++ .../components/com_menus/helpers/helper.php | 171 ++ .../components/com_menus/helpers/index.html | 1 + .../components/com_menus/index.html | 1 + .../components/com_menus/menus.xml | 12 + .../components/com_menus/models/index.html | 1 + .../components/com_menus/models/item.php | 792 +++++++++ .../components/com_menus/models/list.php | 749 +++++++++ .../components/com_menus/models/menutype.php | 280 ++++ .../com_menus/models/metadata/component.xml | 24 + .../com_menus/models/metadata/index.html | 1 + .../com_menus/models/metadata/menulink.xml | 11 + .../com_menus/models/metadata/separator.xml | 11 + .../com_menus/models/metadata/url.xml | 11 + .../components/com_menus/views/index.html | 1 + .../com_menus/views/item/index.html | 1 + .../com_menus/views/item/tmpl/form.php | 204 +++ .../com_menus/views/item/tmpl/index.html | 1 + .../com_menus/views/item/tmpl/type.php | 46 + .../components/com_menus/views/item/view.php | 187 +++ .../com_menus/views/list/index.html | 1 + .../com_menus/views/list/tmpl/copy.php | 50 + .../com_menus/views/list/tmpl/default.php | 130 ++ .../com_menus/views/list/tmpl/index.html | 1 + .../com_menus/views/list/tmpl/move.php | 52 + .../components/com_menus/views/list/view.php | 188 +++ .../com_menus/views/menus/index.html | 1 + .../com_menus/views/menus/tmpl/copy.php | 63 + .../com_menus/views/menus/tmpl/default.php | 135 ++ .../com_menus/views/menus/tmpl/delete.php | 42 + .../com_menus/views/menus/tmpl/edit.php | 88 + .../com_menus/views/menus/tmpl/index.html | 1 + .../components/com_menus/views/menus/view.php | 142 ++ .../com_messages/admin.messages.html.php | 296 ++++ .../com_messages/admin.messages.php | 300 ++++ .../components/com_messages/index.html | 1 + .../components/com_messages/messages.xml | 12 + .../components/com_messages/tables/index.html | 1 + .../com_messages/tables/message.php | 187 +++ .../com_messages/toolbar.messages.html.php | 55 + .../com_messages/toolbar.messages.php | 39 + .../com_modules/admin.modules.html.php | 633 +++++++ .../components/com_modules/admin.modules.php | 34 + .../components/com_modules/controller.php | 830 ++++++++++ .../components/com_modules/helpers/index.html | 1 + .../components/com_modules/helpers/xml.php | 46 + .../components/com_modules/index.html | 1 + .../components/com_modules/models/index.html | 1 + .../components/com_modules/models/module.php | 170 ++ .../components/com_modules/modules.xml | 12 + .../com_modules/toolbar.modules.html.php | 73 + .../com_modules/toolbar.modules.php | 36 + .../com_newsfeeds/admin.newsfeeds.html.php | 352 ++++ .../com_newsfeeds/admin.newsfeeds.php | 464 ++++++ .../components/com_newsfeeds/config.xml | 46 + .../com_newsfeeds/elements/index.html | 1 + .../com_newsfeeds/elements/newsfeed.php | 59 + .../components/com_newsfeeds/index.html | 1 + .../components/com_newsfeeds/newsfeeds.xml | 12 + .../com_newsfeeds/tables/index.html | 1 + .../com_newsfeeds/tables/newsfeed.php | 79 + .../com_newsfeeds/toolbar.newsfeeds.html.php | 54 + .../com_newsfeeds/toolbar.newsfeeds.php | 32 + 245 files changed, 14786 insertions(+) create mode 100644 oss/joomla/trunk/administrator/components/com_content/admin.content.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/admin.content.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/config.xml create mode 100644 oss/joomla/trunk/administrator/components/com_content/content.xml create mode 100644 oss/joomla/trunk/administrator/components/com_content/controller.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/elements/article.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/elements/author.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/elements/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_content/helper.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/helper/content.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/helper/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_content/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_content/models/article.xml create mode 100644 oss/joomla/trunk/administrator/components/com_content/models/element.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/models/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_content/toolbar.content.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/toolbar.content.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/views/element/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_content/views/element/view.php create mode 100644 oss/joomla/trunk/administrator/components/com_content/views/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/delete.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/medialist-details.css create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/medialist-thumbs.css create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/mediamanager.css create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/mediamanager.js create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/mootree.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/popup-imagelist.css create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/popup-imagemanager.css create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/popup-imagemanager.js create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/progress.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/assets/upload.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/config.xml create mode 100644 oss/joomla/trunk/administrator/components/com_media/controller.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/controllers/file.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/controllers/folder.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/controllers/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/helpers/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/helpers/media.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/btnBack.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/btnFolderNew.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/btnFolderUp.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/con_info.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/dots.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/edit_pencil.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/edit_trash.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/folder.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/folder.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/folder_sm.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/folderup.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/folderup_16.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/folderup_32.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/info.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/avi.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/doc.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/mov.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/mp3.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/mp4.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/odc.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/odd.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/odt.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/ogg.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/pdf.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/ppt.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/rar.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/rtf.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/svg.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/sxd.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/tar.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/tgz.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/wma.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/wmv.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/xls.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/zip.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/avi.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/doc.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mov.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mp3.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mp4.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/odc.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/odd.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/odt.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/ogg.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/pdf.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/ppt.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/rar.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/rtf.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/svg.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/sxd.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/tar.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/tgz.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/wma.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/wmv.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/xls.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/zip.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/noimages.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/presentation_16.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/remove.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/spreadsheet_16.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/terminal_16.png create mode 100644 oss/joomla/trunk/administrator/components/com_media/images/uploading.gif create mode 100644 oss/joomla/trunk/administrator/components/com_media/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/media.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/media.xml create mode 100644 oss/joomla/trunk/administrator/components/com_media/models/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/models/list.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/models/manager.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/images/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/images/tmpl/default.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/images/tmpl/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/images/view.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/imageslist/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default_folder.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default_image.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/imageslist/view.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/media/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/default.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/default_folders.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/media/view.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/default.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_doc.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_folder.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_img.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_up.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_doc.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_folder.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_img.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_up.php create mode 100644 oss/joomla/trunk/administrator/components/com_media/views/medialist/view.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/admin.menus.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/blank.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/blankbottom.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/empty.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/folder.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/folderopen.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/gradient.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/join.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/joinbottom.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/line.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/minus.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/minusbottom.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/node.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/nolines_minus.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/nolines_plus.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/page.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/plus.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/images/plusbottom.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/blank.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/blankbottom.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/empty.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/folder.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/folderopen.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/gradient.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/join.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/joinbottom.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/line.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/minus.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/minusbottom.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/node.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/nolines_minus.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/nolines_plus.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/page.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/plus.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/plusbottom.gif create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/type.css create mode 100644 oss/joomla/trunk/administrator/components/com_menus/assets/type_rtl.css create mode 100644 oss/joomla/trunk/administrator/components/com_menus/classes/ilink.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/classes/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/config.xml create mode 100644 oss/joomla/trunk/administrator/components/com_menus/controller.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/helpers/helper.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/helpers/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/menus.xml create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/item.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/list.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/menutype.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/metadata/component.xml create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/metadata/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/metadata/menulink.xml create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/metadata/separator.xml create mode 100644 oss/joomla/trunk/administrator/components/com_menus/models/metadata/url.xml create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/item/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/form.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/type.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/item/view.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/list/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/copy.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/default.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/move.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/list/view.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/menus/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/copy.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/default.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/delete.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/edit.php create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_menus/views/menus/view.php create mode 100644 oss/joomla/trunk/administrator/components/com_messages/admin.messages.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_messages/admin.messages.php create mode 100644 oss/joomla/trunk/administrator/components/com_messages/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_messages/messages.xml create mode 100644 oss/joomla/trunk/administrator/components/com_messages/tables/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_messages/tables/message.php create mode 100644 oss/joomla/trunk/administrator/components/com_messages/toolbar.messages.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_messages/toolbar.messages.php create mode 100644 oss/joomla/trunk/administrator/components/com_modules/admin.modules.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_modules/admin.modules.php create mode 100644 oss/joomla/trunk/administrator/components/com_modules/controller.php create mode 100644 oss/joomla/trunk/administrator/components/com_modules/helpers/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_modules/helpers/xml.php create mode 100644 oss/joomla/trunk/administrator/components/com_modules/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_modules/models/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_modules/models/module.php create mode 100644 oss/joomla/trunk/administrator/components/com_modules/modules.xml create mode 100644 oss/joomla/trunk/administrator/components/com_modules/toolbar.modules.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_modules/toolbar.modules.php create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/admin.newsfeeds.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/admin.newsfeeds.php create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/config.xml create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/elements/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/elements/newsfeed.php create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/newsfeeds.xml create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/tables/index.html create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/tables/newsfeed.php create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/toolbar.newsfeeds.html.php create mode 100644 oss/joomla/trunk/administrator/components/com_newsfeeds/toolbar.newsfeeds.php diff --git a/oss/joomla/trunk/administrator/components/com_content/admin.content.html.php b/oss/joomla/trunk/administrator/components/com_content/admin.content.html.php new file mode 100644 index 00000000..2a12497e --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/admin.content.html.php @@ -0,0 +1,925 @@ + +
+ + + + + + +
+ : + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + getNullDate(); + for ($i=0, $n=count( $rows ); $i < $n; $i++) + { + $row = &$rows[$i]; + + $link = 'index.php?option=com_content§ionid='. $redirect .'&task=edit&cid[]='. $row->id; + + $row->sect_link = JRoute::_( 'index.php?option=com_sections&task=edit&cid[]='. $row->sectionid ); + $row->cat_link = JRoute::_( 'index.php?option=com_categories&task=edit&cid[]='. $row->catid ); + + $publish_up =& JFactory::getDate($row->publish_up); + $publish_down =& JFactory::getDate($row->publish_down); + $publish_up->setOffset($config->getValue('config.offset')); + $publish_down->setOffset($config->getValue('config.offset')); + if ( $now->toUnix() <= $publish_up->toUnix() && $row->state == 1 ) { + $img = 'publish_y.png'; + $alt = JText::_( 'Published' ); + } else if ( ( $now->toUnix() <= $publish_down->toUnix() || $row->publish_down == $nullDate ) && $row->state == 1 ) { + $img = 'publish_g.png'; + $alt = JText::_( 'Published' ); + } else if ( $now->toUnix() > $publish_down->toUnix() && $row->state == 1 ) { + $img = 'publish_r.png'; + $alt = JText::_( 'Expired' ); + } else if ( $row->state == 0 ) { + $img = 'publish_x.png'; + $alt = JText::_( 'Unpublished' ); + } else if ( $row->state == -1 ) { + $img = 'disabled.png'; + $alt = JText::_( 'Archived' ); + } + $times = ''; + if (isset($row->publish_up)) { + if ($row->publish_up == $nullDate) { + $times .= JText::_( 'Start: Always' ); + } else { + $times .= JText::_( 'Start' ) .": ". $publish_up->toFormat(); + } + } + if (isset($row->publish_down)) { + if ($row->publish_down == $nullDate) { + $times .= "
". JText::_( 'Finish: No Expiry' ); + } else { + $times .= "
". JText::_( 'Finish' ) .": ". $publish_down->toFormat(); + } + } + + if ( $user->authorize( 'com_users', 'manage' ) ) { + if ( $row->created_by_alias ) { + $author = $row->created_by_alias; + } else { + $linkA = 'index.php?option=com_users&task=edit&cid[]='. $row->created_by; + $author = ''. $row->author .''; + } + } else { + if ( $row->created_by_alias ) { + $author = $row->created_by_alias; + } else { + $author = $row->author; + } + } + + $access = JHTML::_('grid.access', $row, $i, $row->state ); + $checked = JHTML::_('grid.checkedout', $row, $i ); + ?> + "> + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ getListFooter(); ?> +
+ getRowOffset( $i ); ?> + + + + get ('id'), $row->checked_out ) ) { + echo $row->title; + } else if ($row->state == -1) { + echo htmlspecialchars($row->title, ENT_QUOTES, 'UTF-8'); + echo ' [ '. JText::_( 'Archived' ) .' ]'; + } else { + ?> + + title, ENT_QUOTES); ?> + + + + <?php echo $alt; ?> + + + <?php echo ( $row->frontpage ) ? JText::_( 'Yes' ) : JText::_( 'No' );?> + + orderUpIcon( $i, ($row->catid == @$rows[$i-1]->catid), 'orderup', 'Move Up', $ordering); ?> + orderDownIcon( $i, $n, ($row->catid == @$rows[$i+1]->catid), 'orderdown', 'Move Down', $ordering ); ?> + + class="text_area" style="text-align: center" /> + + + + + section_name; ?> + + + name; ?> + + + + created, JText::_('DATE_FORMAT_LC4') ); ?> + + hits ?> + + id; ?> +
+ + + + + + + + + +
+ + +
+ + + + + + +
+ : + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + cat_link = JRoute::_( 'index.php?option=com_categories&task=edit&cid[]='. $row->catid ); + $row->sec_link = JRoute::_( 'index.php?option=com_sections&task=edit&cid[]='. $row->sectionid ); + + if ( $user->authorize( 'com_users', 'manage' ) ) { + if ( $row->created_by_alias ) { + $author = $row->created_by_alias; + } else { + $linkA = JRoute::_( 'index.php?option=com_users&task=edit&cid[]='. $row->created_by ); + $author = ''. $row->author .''; + } + } else { + if ( $row->created_by_alias ) { + $author = $row->created_by_alias; + } else { + $author = $row->author; + } + } + + ?> + "> + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ getListFooter(); ?> +
+ getRowOffset( $i ); ?> + + id ); ?> + + title; ?> + + id; ?> + + + sectname; ?> + + + name; ?> + + + + created, JText::_( 'DATE_FORMAT_LC4' ) ); ?> +
+
+ + + + + + + + + + +
+ $row is passed with the id + * property set to 0. + * @param JTableContent The category object + * @param string The html for the groups select list + */ + function editContent( &$row, $section, &$lists, &$sectioncategories, $option, &$form ) + { + JRequest::setVar( 'hidemainmenu', 1 ); + + jimport('joomla.html.pane'); + JFilterOutput::objectHTMLSafe( $row ); + + $db = &JFactory::getDBO(); + $editor = &JFactory::getEditor(); + // TODO: allowAllClose should default true in J!1.6, so remove the array when it does. + $pane = &JPane::getInstance('sliders', array('allowAllClose' => true)); + + JHTML::_('behavior.tooltip'); + ?> + + +
+ + + + + + +
+ + + + + +
+ display( 'text', $row->text , '100%', '550', '75', '20' ) ; + ?> +
+
+ startPane("content-pane"); + echo $pane->startPanel( $title, "detail-page" ); + echo $form->render('details'); + + $title = JText::_( 'Parameters - Advanced' ); + echo $pane->endPanel(); + echo $pane->startPanel( $title, "params-page" ); + echo $form->render('params', 'advanced'); + + $title = JText::_( 'Metadata Information' ); + echo $pane->endPanel(); + echo $pane->startPanel( $title, "metadata-page" ); + echo $form->render('meta', 'metadata'); + + echo $pane->endPanel(); + echo $pane->endPane(); + ?> +
+ + + + + + + + +
+ + + +
+ + + + + + +
+ : +
+ +

+
+ : +
+ "; + foreach ( $items as $item ) { + echo "
  • ". $item->title ."
  • "; + } + echo ""; + ?> +
    +

    + + + + + "; + } + ?> + +
    + + +
    + + + + + + +
    + : +
    + +

    +
    + : +
    + "; + foreach ( $items as $item ) { + echo "
  • ". $item->title ."
  • "; + } + echo ""; + ?> +
    +

    + + + + + "; + } + ?> + +
    + setLink(JURI::root()); + + JHTML::_('behavior.caption'); + + ?> + + + + + + + + + +
    + + + +
    + + + + + + + + + +
    + + + +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + getNullDate(); + + // used to hide "Reset Hits" when hits = 0 + if ( !$row->hits ) { + $visibility = 'style="display: none; visibility: hidden;"'; + } else { + $visibility = ''; + } + + ?> + + id ) { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + +
    + : + + id; ?> +
    + + + state > 0 ? JText::_( 'Published' ) : ($row->state < 0 ? JText::_( 'Archived' ) : JText::_( 'Draft Unpublished' ) );?> +
    + + + hits;?> + > + + +
    + + + version;?> +
    + + + created == $nullDate ) { + echo JText::_( 'New document' ); + } else { + echo JHTML::_('date', $row->created, JText::_('DATE_FORMAT_LC2') ); + } + ?> +
    + + + modified == $nullDate ) { + echo JText::_( 'Not modified' ); + } else { + echo JHTML::_('date', $row->modified, JText::_('DATE_FORMAT_LC2')); + } + ?> +
    + execute( $task ); + $controller->redirect(); + break; + + case 'add' : + case 'new' : + ContentController::editContent(false); + break; + + case 'edit' : + ContentController::editContent(true); + break; + + case 'go2menu' : + case 'go2menuitem' : + case 'resethits' : + case 'menulink' : + case 'apply' : + case 'save' : + ContentController::saveContent(); + break; + + case 'remove' : + ContentController::removeContent(); + break; + + case 'publish' : + ContentController::changeContent(1); + break; + + case 'unpublish' : + ContentController::changeContent(0); + break; + + case 'toggle_frontpage' : + ContentController::toggleFrontPage(); + break; + + case 'archive' : + ContentController::changeContent(-1); + break; + + case 'unarchive' : + ContentController::changeContent(0); + break; + + case 'cancel' : + ContentController::cancelContent(); + break; + + case 'orderup' : + ContentController::orderContent(-1); + break; + + case 'orderdown' : + ContentController::orderContent(1); + break; + + //case 'showarchive' : + // JContentController::viewArchive(); + // break; + + case 'movesect' : + ContentController::moveSection(); + break; + + case 'movesectsave' : + ContentController::moveSectionSave(); + break; + + case 'copy' : + ContentController::copyItem(); + break; + + case 'copysave' : + ContentController::copyItemSave(); + break; + + case 'accesspublic' : + ContentController::accessMenu(0); + break; + + case 'accessregistered' : + ContentController::accessMenu(1); + break; + + case 'accessspecial' : + ContentController::accessMenu(2); + break; + + case 'saveorder' : + ContentController::saveOrder(); + break; + + case 'preview' : + ContentController::previewContent(); + break; + + case 'ins_pagebreak' : + ContentController::insertPagebreak(); + break; + + default : + ContentController::viewContent(); + break; +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/config.xml b/oss/joomla/trunk/administrator/components/com_content/config.xml new file mode 100644 index 00000000..900926cf --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/config.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/content.xml b/oss/joomla/trunk/administrator/components/com_content/content.xml new file mode 100644 index 00000000..bdee0dd0 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/content.xml @@ -0,0 +1,14 @@ + + + Content Page + Joomla! Project + April 2006 + + Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. + + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + admin@joomla.org + www.joomla.org + 1.5.0 + DESCCONTENT + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/controller.php b/oss/joomla/trunk/administrator/components/com_content/controller.php new file mode 100644 index 00000000..cc75668c --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/controller.php @@ -0,0 +1,1469 @@ +getModel( 'element' ); + $view = &$this->getView( 'element'); + $view->setModel( $model, true ); + $view->display(); + } + + /** + * Compiles a list of installed or defined modules + * @param database A database connector object + */ + function viewContent() + { + global $mainframe; + + // Initialize variables + $db =& JFactory::getDBO(); + $filter = null; + + // Get some variables from the request + $sectionid = JRequest::getVar( 'sectionid', -1, '', 'int' ); + $redirect = $sectionid; + $option = JRequest::getCmd( 'option' ); + $context = 'com_content.viewcontent'; + $filter_order = $mainframe->getUserStateFromRequest( $context.'filter_order', 'filter_order', '', 'cmd' ); + $filter_order_Dir = $mainframe->getUserStateFromRequest( $context.'filter_order_Dir', 'filter_order_Dir', '', 'word' ); + $filter_state = $mainframe->getUserStateFromRequest( $context.'filter_state', 'filter_state', '', 'word' ); + $catid = $mainframe->getUserStateFromRequest( $context.'catid', 'catid', 0, 'int' ); + $filter_authorid = $mainframe->getUserStateFromRequest( $context.'filter_authorid', 'filter_authorid', 0, 'int' ); + $filter_sectionid = $mainframe->getUserStateFromRequest( $context.'filter_sectionid', 'filter_sectionid', -1, 'int' ); + $search = $mainframe->getUserStateFromRequest( $context.'search', 'search', '', 'string' ); + $search = JString::strtolower($search); + + $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); + $limitstart = $mainframe->getUserStateFromRequest($context.'limitstart', 'limitstart', 0, 'int'); + + // In case limit has been changed, adjust limitstart accordingly + $limitstart = ( $limit != 0 ? (floor($limitstart / $limit) * $limit) : 0 ); + + //$where[] = "c.state >= 0"; + $where[] = 'c.state != -2'; + + if (!$filter_order) { + $filter_order = 'section_name'; + } + if ($filter_order == 'c.ordering') { + $order = ' ORDER BY section_name, cc.title, c.ordering '. $filter_order_Dir; + } else { + $order = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', section_name, cc.title, c.ordering'; + } + $all = 1; + + if ($filter_sectionid >= 0) { + $filter = ' WHERE cc.section = '. (int) $filter_sectionid; + } + $section->title = 'All Articles'; + $section->id = 0; + + /* + * Add the filter specific information to the where clause + */ + // Section filter + if ($filter_sectionid >= 0) { + $where[] = 'c.sectionid = ' . (int) $filter_sectionid; + } + // Category filter + if ($catid > 0) { + $where[] = 'c.catid = ' . (int) $catid; + } + // Author filter + if ($filter_authorid > 0) { + $where[] = 'c.created_by = ' . (int) $filter_authorid; + } + // Content state filter + if ($filter_state) { + if ($filter_state == 'P') { + $where[] = 'c.state = 1'; + } else { + if ($filter_state == 'U') { + $where[] = 'c.state = 0'; + } else if ($filter_state == 'A') { + $where[] = 'c.state = -1'; + } else { + $where[] = 'c.state != -2'; + } + } + } + // Keyword filter + if ($search) { + $where[] = '(LOWER( c.title ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ) . + ' OR c.id = ' . (int) $search . ')'; + } + + // Build the where clause of the content record query + $where = (count($where) ? ' WHERE '.implode(' AND ', $where) : ''); + + // Get the total number of records + $query = 'SELECT COUNT(*)' . + ' FROM #__content AS c' . + ' LEFT JOIN #__categories AS cc ON cc.id = c.catid' . + ' LEFT JOIN #__sections AS s ON s.id = c.sectionid' . + $where; + $db->setQuery($query); + $total = $db->loadResult(); + + + // Create the pagination object + jimport('joomla.html.pagination'); + $pagination = new JPagination($total, $limitstart, $limit); + + // Get the articles + $query = 'SELECT c.*, g.name AS groupname, cc.title AS name, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author' . + ' FROM #__content AS c' . + ' LEFT JOIN #__categories AS cc ON cc.id = c.catid' . + ' LEFT JOIN #__sections AS s ON s.id = c.sectionid' . + ' LEFT JOIN #__groups AS g ON g.id = c.access' . + ' LEFT JOIN #__users AS u ON u.id = c.checked_out' . + ' LEFT JOIN #__users AS v ON v.id = c.created_by' . + ' LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id' . + $where . + $order; + $db->setQuery($query, $pagination->limitstart, $pagination->limit); + $rows = $db->loadObjectList(); + + // If there is a database query error, throw a HTTP 500 and exit + if ($db->getErrorNum()) { + JError::raiseError( 500, $db->stderr() ); + return false; + } + + // get list of categories for dropdown filter + $query = 'SELECT cc.id AS value, cc.title AS text, section' . + ' FROM #__categories AS cc' . + ' INNER JOIN #__sections AS s ON s.id = cc.section ' . + $filter . + ' ORDER BY s.ordering, cc.ordering'; + $lists['catid'] = ContentHelper::filterCategory($query, $catid); + + // get list of sections for dropdown filter + $javascript = 'onchange="document.adminForm.submit();"'; + $lists['sectionid'] = JHTML::_('list.section', 'filter_sectionid', $filter_sectionid, $javascript); + + // get list of Authors for dropdown filter + $query = 'SELECT c.created_by, u.name' . + ' FROM #__content AS c' . + ' INNER JOIN #__sections AS s ON s.id = c.sectionid' . + ' LEFT JOIN #__users AS u ON u.id = c.created_by' . + ' WHERE c.state <> -1' . + ' AND c.state <> -2' . + ' GROUP BY u.name' . + ' ORDER BY u.name'; + $authors[] = JHTML::_('select.option', '0', '- '.JText::_('Select Author').' -', 'created_by', 'name'); + $db->setQuery($query); + $authors = array_merge($authors, $db->loadObjectList()); + $lists['authorid'] = JHTML::_('select.genericlist', $authors, 'filter_authorid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'created_by', 'name', $filter_authorid); + + // state filter + $lists['state'] = JHTML::_('grid.state', $filter_state, 'Published', 'Unpublished', 'Archived'); + + // table ordering + $lists['order_Dir'] = $filter_order_Dir; + $lists['order'] = $filter_order; + + // search filter + $lists['search'] = $search; + + ContentView::showContent($rows, $lists, $pagination, $redirect); + } + + /** + * Shows a list of archived articles + * @param int The section id + */ + function viewArchive() + { + global $mainframe; + + // Initialize variables + $db =& JFactory::getDBO(); + + $sectionid = JRequest::getVar( 'sectionid', 0, '', 'int' ); + $option = JRequest::getCmd( 'option' ); + + $filter_order = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.filter_order", 'filter_order', 'sectname', 'cmd'); + $filter_order_Dir = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.filter_order_Dir", 'filter_order_Dir', '', 'word'); + $catid = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.catid", 'catid', 0, 'int'); + $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); + $limitstart = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.limitstart", 'limitstart', 0, 'int'); + $filter_authorid = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.filter_authorid", 'filter_authorid', 0, 'int'); + $filter_sectionid = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.filter_sectionid", 'filter_sectionid', 0, 'int'); + $search = $mainframe->getUserStateFromRequest("$option.$sectionid.viewarchive.search", 'search', '', 'string'); + $search = JString::strtolower($search); + $redirect = $sectionid; + + // A section id of zero means view all articles [all sections] + if ($sectionid == 0) + { + $where = array ('c.state = -1', 'c.catid = cc.id', 'cc.section = s.id', 's.scope = "content"'); + $filter = ' , #__sections AS s WHERE s.id = c.section'; + $all = 1; + } + else + { + //We are viewing a specific section + $where = array ('c.state = -1', 'c.catid = cc.id', 'cc.section = s.id', 's.scope = "content"', 'c.sectionid= '.(int) $sectionid); + $filter = ' WHERE section = '.$db->Quote($sectionid); + $all = NULL; + } + + // Section filter + if ($filter_sectionid > 0) + { + $where[] = 'c.sectionid = ' . (int) $filter_sectionid; + } + // Author filter + if ($filter_authorid > 0) + { + $where[] = 'c.created_by = ' . (int) $filter_authorid; + } + // Category filter + if ($catid > 0) + { + $where[] = 'c.catid = ' . (int) $catid; + } + // Keyword filter + if ($search) + { + $where[] = 'LOWER( c.title ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ); + } + + // TODO: Sanitise $filter_order + $filter_order_Dir = ($filter_order_Dir == 'ASC' ? 'ASC' : 'DESC'); + $orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', sectname, cc.name, c.ordering'; + $where = (count($where) ? ' WHERE '.implode(' AND ', $where) : ''); + + // get the total number of records + $query = 'SELECT COUNT(*)' . + ' FROM #__content AS c' . + ' LEFT JOIN #__categories AS cc ON cc.id = c.catid' . + ' LEFT JOIN #__sections AS s ON s.id = c.sectionid' . + $where; + $db->setQuery($query); + $total = $db->loadResult(); + + jimport('joomla.html.pagination'); + $pagination = new JPagination($total, $limitstart, $limit); + + $query = 'SELECT c.*, g.name AS groupname, cc.name, v.name AS author, s.title AS sectname' . + ' FROM #__content AS c' . + ' LEFT JOIN #__categories AS cc ON cc.id = c.catid' . + ' LEFT JOIN #__sections AS s ON s.id = c.sectionid' . + ' LEFT JOIN #__groups AS g ON g.id = c.access' . + ' LEFT JOIN #__users AS v ON v.id = c.created_by' . + $where . + $orderby; + $db->setQuery($query, $pagination->limitstart, $pagination->limit); + $rows = $db->loadObjectList(); + + // If there is a database query error, throw a HTTP 500 and exit + if ($db->getErrorNum()) + { + JError::raiseError( 500, $db->stderr() ); + return false; + } + + // get list of categories for dropdown filter + $query = 'SELECT c.id AS value, c.title AS text' . + ' FROM #__categories AS c' . + $filter . + ' ORDER BY c.ordering'; + $lists['catid'] = ContentHelper::filterCategory($query, $catid); + + // get list of sections for dropdown filter + $javascript = 'onchange="document.adminForm.submit();"'; + $lists['sectionid'] = JAdminMenus::SelectSection('filter_sectionid', $filter_sectionid, $javascript); + + $section = & JTable::getInstance('section'); + $section->load($sectionid); + + // get list of Authors for dropdown filter + $query = 'SELECT c.created_by, u.name' . + ' FROM #__content AS c' . + ' INNER JOIN #__sections AS s ON s.id = c.sectionid' . + ' LEFT JOIN #__users AS u ON u.id = c.created_by' . + ' WHERE c.state = -1' . + ' GROUP BY u.name' . + ' ORDER BY u.name'; + $db->setQuery($query); + $authors[] = JHTML::_('select.option', '0', '- '.JText::_('Select Author').' -', 'created_by', 'name'); + $authors = array_merge($authors, $db->loadObjectList()); + $lists['authorid'] = JHTML::_('select.genericlist', $authors, 'filter_authorid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'created_by', 'name', $filter_authorid); + + // table ordering + $lists['order_Dir'] = $filter_order_Dir; + $lists['order'] = $filter_order; + + // search filter + $lists['search'] = $search; + + ContentView::showArchive($rows, $section, $lists, $pagination, $option, $all, $redirect); + } + + /** + * Compiles information to add or edit the record + * + * @param database A database connector object + * @param integer The unique id of the record to edit (0 if new) + * @param integer The id of the content section + */ + function editContent($edit) + { + global $mainframe; + + // Initialize variables + $db = & JFactory::getDBO(); + $user = & JFactory::getUser(); + + $cid = JRequest::getVar( 'cid', array(0), '', 'array' ); + JArrayHelper::toInteger($cid, array(0)); + $id = JRequest::getVar( 'id', $cid[0], '', 'int' ); + $option = JRequest::getCmd( 'option' ); + $nullDate = $db->getNullDate(); + $contentSection = ''; + $sectionid = 0; + + // Create and load the content table row + $row = & JTable::getInstance('content'); + if($edit) + $row->load($id); + + if ($id) { + $sectionid = $row->sectionid; + if ($row->state < 0) { + $mainframe->redirect('index.php?option=com_content', JText::_('You cannot edit an archived item')); + } + } + + // A sectionid of zero means grab from all sections + if ($sectionid == 0) { + $where = ' WHERE section NOT LIKE "%com_%"'; + } else { + // Grab from the specific section + $where = ' WHERE section = '. $db->Quote( $sectionid ); + } + + /* + * If the item is checked out we cannot edit it... unless it was checked + * out by the current user. + */ + if ( JTable::isCheckedOut($user->get ('id'), $row->checked_out )) + { + $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('The item'), $row->title); + $mainframe->redirect('index.php?option=com_content', $msg); + } + + if ($id) + { + $row->checkout($user->get('id')); + + if (trim($row->images)) { + $row->images = explode("\n", $row->images); + } else { + $row->images = array (); + } + + $query = 'SELECT name' . + ' FROM #__users'. + ' WHERE id = '. (int) $row->created_by; + $db->setQuery($query); + $row->creator = $db->loadResult(); + + // test to reduce unneeded query + if ($row->created_by == $row->modified_by) { + $row->modifier = $row->creator; + } else { + $query = 'SELECT name' . + ' FROM #__users' . + ' WHERE id = '. (int) $row->modified_by; + $db->setQuery($query); + $row->modifier = $db->loadResult(); + } + + $query = 'SELECT COUNT(content_id)' . + ' FROM #__content_frontpage' . + ' WHERE content_id = '. (int) $row->id; + $db->setQuery($query); + $row->frontpage = $db->loadResult(); + if (!$row->frontpage) { + $row->frontpage = 0; + } + } + else + { + if (!$sectionid && JRequest::getInt('filter_sectionid')) { + $sectionid =JRequest::getInt('filter_sectionid'); + } + + if (JRequest::getInt('catid')) + { + $row->catid = JRequest::getInt('catid'); + $category = & JTable::getInstance('category'); + $category->load($row->catid); + $sectionid = $category->section; + } else { + $row->catid = NULL; + } + $createdate =& JFactory::getDate(); + $row->sectionid = $sectionid; + $row->version = 0; + $row->state = 1; + $row->ordering = 0; + $row->images = array (); + $row->publish_up = $createdate->toUnix(); + $row->publish_down = JText::_('Never'); + $row->creator = ''; + $row->created = $createdate->toUnix(); + $row->modified = $nullDate; + $row->modifier = ''; + $row->frontpage = 0; + + } + + $javascript = "onchange=\"changeDynaList( 'catid', sectioncategories, document.adminForm.sectionid.options[document.adminForm.sectionid.selectedIndex].value, 0, 0);\""; + + $query = 'SELECT s.id, s.title' . + ' FROM #__sections AS s' . + ' ORDER BY s.ordering'; + $db->setQuery($query); + + $sections[] = JHTML::_('select.option', '-1', '- '.JText::_('Select Section').' -', 'id', 'title'); + $sections[] = JHTML::_('select.option', '0', JText::_('Uncategorized'), 'id', 'title'); + $sections = array_merge($sections, $db->loadObjectList()); + $lists['sectionid'] = JHTML::_('select.genericlist', $sections, 'sectionid', 'class="inputbox" size="1" '.$javascript, 'id', 'title', intval($row->sectionid)); + + foreach ($sections as $section) + { + $section_list[] = (int) $section->id; + // get the type name - which is a special category + if ($row->sectionid) { + if ($section->id == $row->sectionid) { + $contentSection = $section->title; + } + } else { + if ($section->id == $sectionid) { + $contentSection = $section->title; + } + } + } + + $sectioncategories = array (); + $sectioncategories[-1] = array (); + $sectioncategories[-1][] = JHTML::_('select.option', '-1', JText::_( 'Select Category' ), 'id', 'title'); + $section_list = implode('\', \'', $section_list); + + $query = 'SELECT id, title, section' . + ' FROM #__categories' . + ' WHERE section IN ( \''.$section_list.'\' )' . + ' ORDER BY ordering'; + $db->setQuery($query); + $cat_list = $db->loadObjectList(); + + // Uncategorized category mapped to uncategorized section + $uncat = new stdClass(); + $uncat->id = 0; + $uncat->title = JText::_('Uncategorized'); + $uncat->section = 0; + $cat_list[] = $uncat; + foreach ($sections as $section) + { + $sectioncategories[$section->id] = array (); + $rows2 = array (); + foreach ($cat_list as $cat) + { + if ($cat->section == $section->id) { + $rows2[] = $cat; + } + } + foreach ($rows2 as $row2) { + $sectioncategories[$section->id][] = JHTML::_('select.option', $row2->id, $row2->title, 'id', 'title'); + } + } + $sectioncategories['-1'][] = JHTML::_('select.option', '-1', JText::_( 'Select Category' ), 'id', 'title'); + $categories = array(); + foreach ($cat_list as $cat) { + if($cat->section == $row->sectionid) + $categories[] = $cat; + } + + $categories[] = JHTML::_('select.option', '-1', JText::_( 'Select Category' ), 'id', 'title'); + $lists['catid'] = JHTML::_('select.genericlist', $categories, 'catid', 'class="inputbox" size="1"', 'id', 'title', intval($row->catid)); + + // build the html select list for ordering + $query = 'SELECT ordering AS value, title AS text' . + ' FROM #__content' . + ' WHERE catid = ' . (int) $row->catid . + ' AND state >= 0' . + ' ORDER BY ordering'; + if($edit) + $lists['ordering'] = JHTML::_('list.specificordering', $row, $id, $query, 1); + else + $lists['ordering'] = JHTML::_('list.specificordering', $row, '', $query, 1); + + // build the html radio buttons for frontpage + $lists['frontpage'] = JHTML::_('select.booleanlist', 'frontpage', '', $row->frontpage); + + // build the html radio buttons for published + $lists['state'] = JHTML::_('select.booleanlist', 'state', '', $row->state); + + /* + * We need to unify the introtext and fulltext fields and have the + * fields separated by the {readmore} tag, so lets do that now. + */ + if (JString::strlen($row->fulltext) > 1) { + $row->text = $row->introtext . "
    " . $row->fulltext; + } else { + $row->text = $row->introtext; + } + + // Create the form + $form = new JParameter('', JPATH_COMPONENT.DS.'models'.DS.'article.xml'); + + // Details Group + $active = (intval($row->created_by) ? intval($row->created_by) : $user->get('id')); + $form->set('created_by', $active); + $form->set('access', $row->access); + $form->set('created_by_alias', $row->created_by_alias); + + $form->set('created', JHTML::_('date', $row->created, '%Y-%m-%d %H:%M:%S')); + $form->set('publish_up', JHTML::_('date', $row->publish_up, '%Y-%m-%d %H:%M:%S')); + if (JHTML::_('date', $row->publish_down, '%Y') <= 1969 || $row->publish_down == $db->getNullDate()) { + $form->set('publish_down', JText::_('Never')); + } else { + $form->set('publish_down', JHTML::_('date', $row->publish_down, '%Y-%m-%d %H:%M:%S')); + } + + // Advanced Group + $form->loadINI($row->attribs); + + // Metadata Group + $form->set('description', $row->metadesc); + $form->set('keywords', $row->metakey); + $form->loadINI($row->metadata); + + ContentView::editContent($row, $contentSection, $lists, $sectioncategories, $option, $form); + } + + /** + * Saves the article an edit form submit + * @param database A database connector object + */ + function saveContent() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + $user = & JFactory::getUser(); + $dispatcher = & JDispatcher::getInstance(); + JPluginHelper::importPlugin('content'); + + $details = JRequest::getVar( 'details', array(), 'post', 'array'); + $option = JRequest::getCmd( 'option' ); + $task = JRequest::getCmd( 'task' ); + $sectionid = JRequest::getVar( 'sectionid', 0, '', 'int' ); + $redirect = JRequest::getVar( 'redirect', $sectionid, 'post', 'int' ); + $menu = JRequest::getVar( 'menu', 'mainmenu', 'post', 'cmd' ); + $menuid = JRequest::getVar( 'menuid', 0, 'post', 'int' ); + $nullDate = $db->getNullDate(); + + $row = & JTable::getInstance('content'); + if (!$row->bind(JRequest::get('post'))) { + JError::raiseError( 500, $db->stderr() ); + return false; + } + $row->bind($details); + + // sanitise id field + $row->id = (int) $row->id; + + $isNew = true; + // Are we saving from an item edit? + if ($row->id) { + $isNew = false; + $datenow =& JFactory::getDate(); + $row->modified = $datenow->toMySQL(); + $row->modified_by = $user->get('id'); + } + + $row->created_by = $row->created_by ? $row->created_by : $user->get('id'); + + if ($row->created && strlen(trim( $row->created )) <= 10) { + $row->created .= ' 00:00:00'; + } + + $config =& JFactory::getConfig(); + $tzoffset = $config->getValue('config.offset'); + $date =& JFactory::getDate($row->created, $tzoffset); + $row->created = $date->toMySQL(); + + // Append time if not added to publish date + if (strlen(trim($row->publish_up)) <= 10) { + $row->publish_up .= ' 00:00:00'; + } + + $date =& JFactory::getDate($row->publish_up, $tzoffset); + $row->publish_up = $date->toMySQL(); + + // Handle never unpublish date + if (trim($row->publish_down) == JText::_('Never') || trim( $row->publish_down ) == '') + { + $row->publish_down = $nullDate; + } + else + { + if (strlen(trim( $row->publish_down )) <= 10) { + $row->publish_down .= ' 00:00:00'; + } + $date =& JFactory::getDate($row->publish_down, $tzoffset); + $row->publish_down = $date->toMySQL(); + } + + // Get a state and parameter variables from the request + $row->state = JRequest::getVar( 'state', 0, '', 'int' ); + $params = JRequest::getVar( 'params', null, 'post', 'array' ); + + // Build parameter INI string + if (is_array($params)) + { + $txt = array (); + foreach ($params as $k => $v) { + $txt[] = "$k=$v"; + } + $row->attribs = implode("\n", $txt); + } + + // Get metadata string + $metadata = JRequest::getVar( 'meta', null, 'post', 'array'); + if (is_array($metadata)) + { + $txt = array(); + foreach ($metadata as $k => $v) { + if ($k == 'description') { + $row->metadesc = $v; + } elseif ($k == 'keywords') { + $row->metakey = $v; + } else { + $txt[] = "$k=$v"; + } + } + $row->metadata = implode("\n", $txt); + } + + // Prepare the content for saving to the database + ContentHelper::saveContentPrep( $row ); + + // Make sure the data is valid + if (!$row->check()) { + JError::raiseError( 500, $db->stderr() ); + return false; + } + + // Increment the content version number + $row->version++; + + $result = $dispatcher->trigger('onBeforeContentSave', array(&$row, $isNew)); + if(in_array(false, $result, true)) { + JError::raiseError(500, $row->getError()); + return false; + } + + // Store the content to the database + if (!$row->store()) { + JError::raiseError( 500, $db->stderr() ); + return false; + } + + // Check the article and update item order + $row->checkin(); + $row->reorder('catid = '.(int) $row->catid.' AND state >= 0'); + + /* + * We need to update frontpage status for the article. + * + * First we include the frontpage table and instantiate an instance of it. + */ + require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_frontpage'.DS.'tables'.DS.'frontpage.php'); + $fp = new TableFrontPage($db); + + // Is the article viewable on the frontpage? + if (JRequest::getVar( 'frontpage', 0, '', 'int' )) + { + // Is the item already viewable on the frontpage? + if (!$fp->load($row->id)) + { + // Insert the new entry + $query = 'INSERT INTO #__content_frontpage' . + ' VALUES ( '. (int) $row->id .', 1 )'; + $db->setQuery($query); + if (!$db->query()) + { + JError::raiseError( 500, $db->stderr() ); + return false; + } + $fp->ordering = 1; + } + } + else + { + // Delete the item from frontpage if it exists + if (!$fp->delete($row->id)) { + $msg .= $fp->stderr(); + } + $fp->ordering = 0; + } + $fp->reorder(); + + $cache = & JFactory::getCache('com_content'); + $cache->clean(); + + $dispatcher->trigger('onAfterContentSave', array(&$row, $isNew)); + + switch ($task) + { + case 'go2menu' : + $mainframe->redirect('index.php?option=com_menus&menutype='.$menu); + break; + + case 'go2menuitem' : + $mainframe->redirect('index.php?option=com_menus&menutype='.$menu.'&task=edit&id='.$menuid); + break; + + case 'menulink' : + ContentHelper::menuLink($redirect, $row->id); + break; + + case 'resethits' : + ContentHelper::resetHits($redirect, $row->id); + break; + + case 'apply' : + $msg = JText::sprintf('SUCCESSFULLY SAVED CHANGES TO ARTICLE', $row->title); + $mainframe->redirect('index.php?option=com_content§ionid='.$redirect.'&task=edit&cid[]='.$row->id, $msg); + break; + + case 'save' : + default : + $msg = JText::sprintf('Successfully Saved Article', $row->title); + $mainframe->redirect('index.php?option=com_content§ionid='.$redirect, $msg); + break; + } + } + + /** + * Changes the state of one or more content pages + * + * @param string The name of the category section + * @param integer A unique category id (passed from an edit form) + * @param array An array of unique category id numbers + * @param integer 0 if unpublishing, 1 if publishing + * @param string The name of the current user + */ + function changeContent( $state = 0 ) + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + $user = & JFactory::getUser(); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + $option = JRequest::getCmd( 'option' ); + $task = JRequest::getCmd( 'task' ); + $rtask = JRequest::getCmd( 'returntask', '', 'post' ); + if ($rtask) { + $rtask = '&task='.$rtask; + } + + if (count($cid) < 1) { + $redirect = JRequest::getVar( 'redirect', '', 'post', 'int' ); + $action = ($state == 1) ? 'publish' : ($state == -1 ? 'archive' : 'unpublish'); + $msg = JText::_('Select an item to') . ' ' . JText::_($action); + $mainframe->redirect('index.php?option='.$option.$rtask.'§ionid='.$redirect, $msg, 'error'); + } + + // Get some variables for the query + $uid = $user->get('id'); + $total = count($cid); + $cids = implode(',', $cid); + + $query = 'UPDATE #__content' . + ' SET state = '. (int) $state . + ' WHERE id IN ( '. $cids .' ) AND ( checked_out = 0 OR (checked_out = '. (int) $uid .' ) )'; + $db->setQuery($query); + if (!$db->query()) { + JError::raiseError( 500, $db->getErrorMsg() ); + return false; + } + + if (count($cid) == 1) { + $row = & JTable::getInstance('content'); + $row->checkin($cid[0]); + } + + switch ($state) + { + case -1 : + $msg = JText::sprintf('Item(s) successfully Archived', $total); + break; + + case 1 : + $msg = JText::sprintf('Item(s) successfully Published', $total); + break; + + case 0 : + default : + if ($task == 'unarchive') { + $msg = JText::sprintf('Item(s) successfully Unarchived', $total); + } else { + $msg = JText::sprintf('Item(s) successfully Unpublished', $total); + } + break; + } + + $cache = & JFactory::getCache('com_content'); + $cache->clean(); + + // Get some return/redirect information from the request + $redirect = JRequest::getVar( 'redirect', $row->sectionid, 'post', 'int' ); + + $mainframe->redirect('index.php?option='.$option.$rtask.'§ionid='.$redirect, $msg); + } + + /** + * Changes the frontpage state of one or more articles + * + */ + function toggleFrontPage() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db =& JFactory::getDBO(); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + $option = JRequest::getCmd( 'option' ); + $msg = null; + + JArrayHelper::toInteger($cid); + + if (count($cid) < 1) { + $msg = JText::_('Select an item to toggle'); + $mainframe->redirect('index.php?option='.$option, $msg, 'error'); + } + + /* + * We need to update frontpage status for the articles. + * + * First we include the frontpage table and instantiate an instance of + * it. + */ + require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_frontpage'.DS.'tables'.DS.'frontpage.php'); + $fp = new TableFrontPage($db); + + foreach ($cid as $id) + { + // toggles go to first place + if ($fp->load($id)) { + if (!$fp->delete($id)) { + $msg .= $fp->stderr(); + } + $fp->ordering = 0; + } else { + // new entry + $query = 'INSERT INTO #__content_frontpage' . + ' VALUES ( '. (int) $id .', 0 )'; + $db->setQuery($query); + if (!$db->query()) { + JError::raiseError( 500, $db->stderr() ); + return false; + } + $fp->ordering = 0; + } + $fp->reorder(); + } + + $cache = & JFactory::getCache('com_content'); + $cache->clean(); + + $mainframe->redirect('index.php?option='.$option, $msg); + } + + function removeContent() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + $option = JRequest::getCmd( 'option' ); + $return = JRequest::getCmd( 'returntask', '', 'post' ); + $nullDate = $db->getNullDate(); + + JArrayHelper::toInteger($cid); + + if (count($cid) < 1) { + $msg = JText::_('Select an item to delete'); + $mainframe->redirect('index.php?option='.$option, $msg, 'error'); + } + + // Removed content gets put in the trash [state = -2] and ordering is always set to 0 + $state = '-2'; + $ordering = '0'; + + // Get the list of content id numbers to send to trash. + $cids = implode(',', $cid); + + // Update articles in the database + $query = 'UPDATE #__content' . + ' SET state = '.(int) $state . + ', ordering = '.(int) $ordering . + ', checked_out = 0, checked_out_time = '.$db->Quote($nullDate). + ' WHERE id IN ( '. $cids. ' )'; + $db->setQuery($query); + if (!$db->query()) + { + JError::raiseError( 500, $db->getErrorMsg() ); + return false; + } + + $cache = & JFactory::getCache('com_content'); + $cache->clean(); + + $msg = JText::sprintf('Item(s) sent to the Trash', count($cid)); + $mainframe->redirect('index.php?option='.$option.'&task='.$return, $msg); + } + + /** + * Cancels an edit operation + */ + function cancelContent() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + + // Check the article in if checked out + $row = & JTable::getInstance('content'); + $row->bind(JRequest::get('post')); + $row->checkin(); + + $mainframe->redirect('index.php?option=com_content'); + } + + /** + * Moves the order of a record + * @param integer The increment to reorder by + */ + function orderContent($direction) + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + + if (isset( $cid[0] )) + { + $row = & JTable::getInstance('content'); + $row->load( (int) $cid[0] ); + $row->move($direction, 'catid = ' . (int) $row->catid . ' AND state >= 0' ); + + $cache = & JFactory::getCache('com_content'); + $cache->clean(); + } + + $mainframe->redirect('index.php?option=com_content'); + } + + /** + * Form for moving item(s) to a different section and category + */ + function moveSection() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db =& JFactory::getDBO(); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + $sectionid = JRequest::getVar( 'sectionid', 0, '', 'int' ); + + JArrayHelper::toInteger($cid); + + if (count($cid) < 1) { + $msg = JText::_('Select an item to move'); + $mainframe->redirect('index.php?option=com_content', $msg, 'error'); + } + + //seperate contentids + $cids = implode(',', $cid); + // Articles query + $query = 'SELECT a.title' . + ' FROM #__content AS a' . + ' WHERE ( a.id IN ( '. $cids .' ) )' . + ' ORDER BY a.title'; + $db->setQuery($query); + $items = $db->loadObjectList(); + + $query = 'SELECT CONCAT_WS( ", ", s.id, c.id ) AS `value`, CONCAT_WS( " / ", s.title, c.title ) AS `text`' . + ' FROM #__sections AS s' . + ' INNER JOIN #__categories AS c ON c.section = s.id' . + ' WHERE s.scope = "content"' . + ' ORDER BY s.title, c.title'; + $db->setQuery($query); + $rows[] = JHTML::_('select.option', "0, 0", JText::_('UNCATEGORIZED')); + $rows = array_merge($rows, $db->loadObjectList()); + // build the html select list + $sectCatList = JHTML::_('select.genericlist', $rows, 'sectcat', 'class="inputbox" size="8"', 'value', 'text', null); + + ContentView::moveSection($cid, $sectCatList, 'com_content', $sectionid, $items); + } + + /** + * Save the changes to move item(s) to a different section and category + */ + function moveSectionSave() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + $user = & JFactory::getUser(); + + $cid = JRequest::getVar( 'cid', array(0), 'post', 'array' ); + $sectionid = JRequest::getVar( 'sectionid', 0, '', 'int' ); + $option = JRequest::getCmd( 'option' ); + + JArrayHelper::toInteger($cid, array(0)); + + $sectcat = JRequest::getVar( 'sectcat', '', 'post', 'string' ); + $sectcat = explode(',', $sectcat); + $newsect = (int) @$sectcat[0]; + $newcat = (int) @$sectcat[1]; + + if ((!$newsect || !$newcat) && ($sectcat !== array('0', ' 0'))) { + $mainframe->redirect("index.php?option=com_content§ionid=$sectionid", JText::_('An error has occurred')); + } + + // find section name + $query = 'SELECT a.title' . + ' FROM #__sections AS a' . + ' WHERE a.id = '. (int) $newsect; + $db->setQuery($query); + $section = $db->loadResult(); + + // find category name + $query = 'SELECT a.title' . + ' FROM #__categories AS a' . + ' WHERE a.id = '. (int) $newcat; + $db->setQuery($query); + $category = $db->loadResult(); + + $total = count($cid); + $cids = implode(',', $cid); + $uid = $user->get('id'); + + $row = & JTable::getInstance('content'); + // update old orders - put existing items in last place + foreach ($cid as $id) + { + $row->load(intval($id)); + $row->ordering = 0; + $row->store(); + $row->reorder('catid = '.(int) $row->catid.' AND state >= 0'); + } + + $query = 'UPDATE #__content SET sectionid = '.(int) $newsect.', catid = '.(int) $newcat. + ' WHERE id IN ( '.$cids.' )' . + ' AND ( checked_out = 0 OR ( checked_out = '.(int) $uid.' ) )'; + $db->setQuery($query); + if (!$db->query()) + { + JError::raiseError( 500, $db->getErrorMsg() ); + return false; + } + + // update new orders - put items in last place + foreach ($cid as $id) + { + $row->load(intval($id)); + $row->ordering = 0; + $row->store(); + $row->reorder('catid = '.(int) $row->catid.' AND state >= 0'); + } + + if ($section && $category) { + $msg = JText::sprintf('Item(s) successfully moved to Section', $total, $section, $category); + } else { + $msg = JText::sprintf('ITEM(S) SUCCESSFULLY MOVED TO UNCATEGORIZED', $total); + } + + $mainframe->redirect('index.php?option='.$option.'§ionid='.$sectionid, $msg); + } + + /** + * Form for copying item(s) + **/ + function copyItem() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + $sectionid = JRequest::getVar( 'sectionid', 0, '', 'int' ); + $option = JRequest::getCmd( 'option' ); + + JArrayHelper::toInteger($cid); + + if (count($cid) < 1) { + $msg = JText::_('Select an item to move'); + $mainframe->redirect('index.php?option='.$option, $msg, 'error'); + } + + //seperate contentids + $cids = implode(',', $cid); + ## Articles query + $query = 'SELECT a.title' . + ' FROM #__content AS a' . + ' WHERE ( a.id IN ( '. $cids .' ) )' . + ' ORDER BY a.title'; + $db->setQuery($query); + $items = $db->loadObjectList(); + + ## Section & Category query + $query = 'SELECT CONCAT_WS(",",s.id,c.id) AS `value`, CONCAT_WS(" / ", s.title, c.title) AS `text`' . + ' FROM #__sections AS s' . + ' INNER JOIN #__categories AS c ON c.section = s.id' . + ' WHERE s.scope = "content"' . + ' ORDER BY s.title, c.title'; + $db->setQuery($query); + + // Add a row for uncategorized content + $uncat = JHTML::_('select.option', '0,0', JText::_('UNCATEGORIZED')); + $rows = $db->loadObjectList(); + array_unshift($rows, $uncat); + // build the html select list + $sectCatList = JHTML::_('select.genericlist', $rows, 'sectcat', 'class="inputbox" size="10"', 'value', 'text', NULL); + + ContentView::copySection($option, $cid, $sectCatList, $sectionid, $items); + } + + /** + * saves Copies of items + **/ + function copyItemSave() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + $sectionid = JRequest::getVar( 'sectionid', 0, '', 'int' ); + $option = JRequest::getCmd( 'option' ); + + JArrayHelper::toInteger($cid); + + $item = null; + $sectcat = JRequest::getVar( 'sectcat', '-1,-1', 'post', 'string' ); + //seperate sections and categories from selection + $sectcat = explode(',', $sectcat); + $newsect = (int) @$sectcat[0]; + $newcat = (int) @$sectcat[1]; + + if (($newsect == -1) || ($newcat == -1)) { + $mainframe->redirect('index.php?option=com_content§ionid='.$sectionid, JText::_('An error has occurred')); + } + + // find section name + $query = 'SELECT a.title' . + ' FROM #__sections AS a' . + ' WHERE a.id = '. (int) $newsect; + $db->setQuery($query); + $section = $db->loadResult(); + + // find category name + $query = 'SELECT a.title' . + ' FROM #__categories AS a' . + ' WHERE a.id = '. (int) $newcat; + $db->setQuery($query); + $category = $db->loadResult(); + + if (($newsect == 0) && ($newcat == 0)) + { + $section = JText::_('UNCATEGORIZED'); + $category = JText::_('UNCATEGORIZED'); + } + + $total = count($cid); + for ($i = 0; $i < $total; $i ++) + { + $row = & JTable::getInstance('content'); + + // main query + $query = 'SELECT a.*' . + ' FROM #__content AS a' . + ' WHERE a.id = '.(int) $cid[$i]; + $db->setQuery($query, 0, 1); + $item = $db->loadObject(); + + // values loaded into array set for store + $row->id = NULL; + $row->sectionid = $newsect; + $row->catid = $newcat; + $row->hits = '0'; + $row->ordering = '0'; + $row->title = $item->title; + $row->alias = $item->alias; + $row->title_alias = $item->title_alias; + $row->introtext = $item->introtext; + $row->fulltext = $item->fulltext; + $row->state = $item->state; + $row->mask = $item->mask; + $row->created = $item->created; + $row->created_by = $item->created_by; + $row->created_by_alias = $item->created_by_alias; + $row->modified = $item->modified; + $row->modified_by = $item->modified_by; + $row->checked_out = $item->checked_out; + $row->checked_out_time = $item->checked_out_time; + $row->publish_up = $item->publish_up; + $row->publish_down = $item->publish_down; + $row->images = $item->images; + $row->attribs = $item->attribs; + $row->version = $item->parentid; + $row->parentid = $item->parentid; + $row->metakey = $item->metakey; + $row->metadesc = $item->metadesc; + $row->access = $item->access; + $row->metadata = $item->metadata; + + if (!$row->check()) { + JError::raiseError( 500, $row->getError() ); + return false; + } + + if (!$row->store()) { + JError::raiseError( 500, $row->getError() ); + return false; + } + $row->reorder('catid='.(int) $row->catid.' AND state >= 0'); + } + + $msg = JText::sprintf('Item(s) successfully copied to Section', $total, $section, $category); + $mainframe->redirect('index.php?option='.$option.'§ionid='.$sectionid, $msg); + } + + /** + * @param integer The id of the article + * @param integer The new access level + * @param string The URL option + */ + function accessMenu($access) + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + + $cid = JRequest::getVar( 'cid', array(0), 'post', 'array' ); + $option = JRequest::getCmd( 'option' ); + $cid = $cid[0]; + + // Create and load the article table object + $row = & JTable::getInstance('content'); + $row->load($cid); + $row->access = $access; + + // Ensure the article object is valid + if (!$row->check()) { + JError::raiseError( 500, $row->getError() ); + return false; + } + + // Store the changes + if (!$row->store()) { + JError::raiseError( 500, $row->getError() ); + return false; + } + + $cache = & JFactory::getCache('com_content'); + $cache->clean(); + + $mainframe->redirect('index.php?option='.$option); + } + + function saveOrder() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize variables + $db = & JFactory::getDBO(); + + $cid = JRequest::getVar( 'cid', array(0), 'post', 'array' ); + $order = JRequest::getVar( 'order', array (0), 'post', 'array' ); + $redirect = JRequest::getVar( 'redirect', 0, 'post', 'int' ); + $rettask = JRequest::getVar( 'returntask', '', 'post', 'cmd' ); + $total = count($cid); + $conditions = array (); + + JArrayHelper::toInteger($cid, array(0)); + JArrayHelper::toInteger($order, array(0)); + + // Instantiate an article table object + $row = & JTable::getInstance('content'); + + // Update the ordering for items in the cid array + for ($i = 0; $i < $total; $i ++) + { + $row->load( (int) $cid[$i] ); + if ($row->ordering != $order[$i]) { + $row->ordering = $order[$i]; + if (!$row->store()) { + JError::raiseError( 500, $db->getErrorMsg() ); + return false; + } + // remember to updateOrder this group + $condition = 'catid = '.(int) $row->catid.' AND state >= 0'; + $found = false; + foreach ($conditions as $cond) + if ($cond[1] == $condition) { + $found = true; + break; + } + if (!$found) + $conditions[] = array ($row->id, $condition); + } + } + + // execute updateOrder for each group + foreach ($conditions as $cond) + { + $row->load($cond[0]); + $row->reorder($cond[1]); + } + + $cache = & JFactory::getCache('com_content'); + $cache->clean(); + + $msg = JText::_('New ordering saved'); + switch ($rettask) + { + case 'showarchive' : + $mainframe->redirect('index.php?option=com_content&task=showarchive§ionid='.$redirect, $msg); + break; + + default : + $mainframe->redirect('index.php?option=com_content§ionid='.$redirect, $msg); + break; + } + } + + function previewContent() + { + // Initialize variables + $document =& JFactory::getDocument(); + $db =& JFactory::getDBO(); + $id = JRequest::getVar( 'id', 0, '', 'int' ); + $option = JRequest::getCmd( 'option' ); + + // Get the current default template + $query = 'SELECT template' . + ' FROM #__templates_menu' . + ' WHERE client_id = 0' . + ' AND menuid = 0'; + $db->setQuery($query); + $template = $db->loadResult(); + + // check if template editor stylesheet exists + if (!file_exists( JPATH_SITE.DS.'templates'.DS.$template.DS.'css'.DS.'editor.css' )) { + $template = 'system'; + } + + // Set page title + $document->setTitle(JText::_('Article Preview')); + $document->addStyleSheet(JURI::root() . 'templates/'.$template.'/css/editor.css'); + $document->setBase(JUri::root()); + + // Render article preview + ContentView::previewContent(); + } + + function insertPagebreak() + { + $document =& JFactory::getDocument(); + $document->setTitle(JText::_('PGB ARTICLE PAGEBRK')); + ContentView::insertPagebreak(); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_content/elements/article.php b/oss/joomla/trunk/administrator/components/com_content/elements/article.php new file mode 100644 index 00000000..0e8853b4 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/elements/article.php @@ -0,0 +1,60 @@ +getTemplate(); + $fieldName = $control_name.'['.$name.']'; + $article =& JTable::getInstance('content'); + if ($value) { + $article->load($value); + } else { + $article->title = JText::_('Select an Article'); + } + + $js = " + function jSelectArticle(id, title, object) { + document.getElementById(object + '_id').value = id; + document.getElementById(object + '_name').value = title; + document.getElementById('sbox-window').close(); + }"; + $doc->addScriptDeclaration($js); + + $link = 'index.php?option=com_content&task=element&tmpl=component&object='.$name; + + JHTML::_('behavior.modal', 'a.modal'); + $html = "\n".'
    '; +// $html .= "\n   "; + $html .= '
    '."\n"; + $html .= "\n".''; + + return $html; + } +} diff --git a/oss/joomla/trunk/administrator/components/com_content/elements/author.php b/oss/joomla/trunk/administrator/components/com_content/elements/author.php new file mode 100644 index 00000000..61fd0f34 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/elements/author.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/helper.php b/oss/joomla/trunk/administrator/components/com_content/helper.php new file mode 100644 index 00000000..4a4092d6 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/helper.php @@ -0,0 +1,122 @@ +', '
    ', $text ); + + // Search for the {readmore} tag and split the text up accordingly. + $pattern = '##i'; + $tagPos = preg_match($pattern, $text); + + if ( $tagPos == 0 ) + { + $row->introtext = $text; + } else + { + list($row->introtext, $row->fulltext) = preg_split($pattern, $text, 2); + } + + // Filter settings + jimport( 'joomla.application.component.helper' ); + $config = JComponentHelper::getParams( 'com_content' ); + $user = &JFactory::getUser(); + $gid = $user->get( 'gid' ); + + $filterGroups = $config->get( 'filter_groups' ); + + // convert to array if one group selected + if ( (!is_array($filterGroups) && (int) $filterGroups > 0) ) { + $filterGroups = array($filterGroups); + } + + if (is_array($filterGroups) && in_array( $gid, $filterGroups )) + { + $filterType = $config->get( 'filter_type' ); + $filterTags = preg_split( '#[,\s]+#', trim( $config->get( 'filter_tags' ) ) ); + $filterAttrs = preg_split( '#[,\s]+#', trim( $config->get( 'filter_attritbutes' ) ) ); + switch ($filterType) + { + case 'NH': + $filter = new JFilterInput(); + break; + case 'WL': + $filter = new JFilterInput( $filterTags, $filterAttrs, 0, 0, 0); // turn off xss auto clean + break; + case 'BL': + default: + $filter = new JFilterInput( $filterTags, $filterAttrs, 1, 1 ); + break; + } + $row->introtext = $filter->clean( $row->introtext ); + $row->fulltext = $filter->clean( $row->fulltext ); + } elseif(empty($filterGroups) && $gid != '25') { // no default filtering for super admin (gid=25) + $filter = new JFilterInput( array(), array(), 1, 1 ); + $row->introtext = $filter->clean( $row->introtext ); + $row->fulltext = $filter->clean( $row->fulltext ); + } + return true; + } + + /** + * Function to reset Hit count of an article + * + */ + function resetHits($redirect, $id) + { + global $mainframe; + + // Initialize variables + $db = & JFactory::getDBO(); + + // Instantiate and load an article table + $row = & JTable::getInstance('content'); + $row->Load($id); + $row->hits = 0; + $row->store(); + $row->checkin(); + + $msg = JText::_('Successfully Reset Hit count'); + $mainframe->redirect('index.php?option=com_content§ionid='.$redirect.'&task=edit&id='.$id, $msg); + } + + function filterCategory($query, $active = NULL) + { + // Initialize variables + $db = & JFactory::getDBO(); + + $categories[] = JHTML::_('select.option', '0', '- '.JText::_('Select Category').' -'); + $db->setQuery($query); + $categories = array_merge($categories, $db->loadObjectList()); + + $category = JHTML::_('select.genericlist', $categories, 'catid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', $active); + + return $category; + } + +} diff --git a/oss/joomla/trunk/administrator/components/com_content/helper/content.php b/oss/joomla/trunk/administrator/components/com_content/helper/content.php new file mode 100644 index 00000000..4ad556a9 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/helper/content.php @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + +
    + <?php echo JText::_( 'Pending' ); ?> + + | + + <?php echo JText::_( 'Visible' ); ?> + + | + + <?php echo JText::_( 'Finished' ); ?> + + | + + <?php echo JText::_( 'Finished' ); ?> + + | + + <?php echo JText::_( 'Archived' ); ?> + + +
    + +
    + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/index.html b/oss/joomla/trunk/administrator/components/com_content/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/models/article.xml b/oss/joomla/trunk/administrator/components/com_content/models/article.xml new file mode 100644 index 00000000..d3612a3e --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/models/article.xml @@ -0,0 +1,97 @@ + +
    + Article Edit Form + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/oss/joomla/trunk/administrator/components/com_content/models/element.php b/oss/joomla/trunk/administrator/components/com_content/models/element.php new file mode 100644 index 00000000..73acffcb --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/models/element.php @@ -0,0 +1,156 @@ +_list)) { + return $this->_list; + } + + // Initialize variables + $db =& $this->getDBO(); + $filter = null; + + // Get some variables from the request + $sectionid = JRequest::getVar( 'sectionid', -1, '', 'int' ); + $redirect = $sectionid; + $option = JRequest::getCmd( 'option' ); + $filter_order = $mainframe->getUserStateFromRequest('articleelement.filter_order', 'filter_order', '', 'cmd'); + $filter_order_Dir = $mainframe->getUserStateFromRequest('articleelement.filter_order_Dir', 'filter_order_Dir', '', 'word'); + $catid = $mainframe->getUserStateFromRequest('articleelement.catid', 'catid', 0, 'int'); + $filter_authorid = $mainframe->getUserStateFromRequest('articleelement.filter_authorid', 'filter_authorid', 0, 'int'); + $filter_sectionid = $mainframe->getUserStateFromRequest('articleelement.filter_sectionid', 'filter_sectionid', -1, 'int'); + $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); + $limitstart = $mainframe->getUserStateFromRequest('articleelement.limitstart', 'limitstart', 0, 'int'); + $search = $mainframe->getUserStateFromRequest('articleelement.search', 'search', '', 'string'); + $search = JString::strtolower($search); + + //$where[] = "c.state >= 0"; + $where[] = "c.state != -2"; + + if (!$filter_order) { + $filter_order = 'section_name'; + } + $order = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', section_name, cc.name, c.ordering'; + $all = 1; + + if ($filter_sectionid >= 0) { + $filter = ' WHERE cc.section = '.$db->Quote($filter_sectionid); + } + $section->title = 'All Articles'; + $section->id = 0; + + /* + * Add the filter specific information to the where clause + */ + // Section filter + if ($filter_sectionid >= 0) { + $where[] = 'c.sectionid = '.(int) $filter_sectionid; + } + // Category filter + if ($catid > 0) { + $where[] = 'c.catid = '.(int) $catid; + } + // Author filter + if ($filter_authorid > 0) { + $where[] = 'c.created_by = '.(int) $filter_authorid; + } + + // Only published articles + $where[] = 'c.state = 1'; + + // Keyword filter + if ($search) { + $where[] = 'LOWER( c.title ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ); + } + + // Build the where clause of the content record query + $where = (count($where) ? ' WHERE '.implode(' AND ', $where) : ''); + + // Get the total number of records + $query = 'SELECT COUNT(*)' . + ' FROM #__content AS c' . + ' LEFT JOIN #__categories AS cc ON cc.id = c.catid' . + ' LEFT JOIN #__sections AS s ON s.id = c.sectionid' . + $where; + $db->setQuery($query); + $total = $db->loadResult(); + + // Create the pagination object + jimport('joomla.html.pagination'); + $this->_page = new JPagination($total, $limitstart, $limit); + + // Get the articles + $query = 'SELECT c.*, g.name AS groupname, cc.title as cctitle, u.name AS editor, f.content_id AS frontpage, s.title AS section_name, v.name AS author' . + ' FROM #__content AS c' . + ' LEFT JOIN #__categories AS cc ON cc.id = c.catid' . + ' LEFT JOIN #__sections AS s ON s.id = c.sectionid' . + ' LEFT JOIN #__groups AS g ON g.id = c.access' . + ' LEFT JOIN #__users AS u ON u.id = c.checked_out' . + ' LEFT JOIN #__users AS v ON v.id = c.created_by' . + ' LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id' . + $where . + $order; + $db->setQuery($query, $this->_page->limitstart, $this->_page->limit); + $this->_list = $db->loadObjectList(); + + // If there is a db query error, throw a HTTP 500 and exit + if ($db->getErrorNum()) { + JError::raiseError( 500, $db->stderr() ); + return false; + } + + return $this->_list; + } + + function getPagination() + { + if (is_null($this->_list) || is_null($this->_page)) { + $this->getList(); + } + return $this->_page; + } +} +?> diff --git a/oss/joomla/trunk/administrator/components/com_content/models/index.html b/oss/joomla/trunk/administrator/components/com_content/models/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/models/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/toolbar.content.html.php b/oss/joomla/trunk/administrator/components/com_content/toolbar.content.html.php new file mode 100644 index 00000000..e6b2111c --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/toolbar.content.html.php @@ -0,0 +1,84 @@ +[ '. $text.' ]', 'addedit.png' ); + JToolBarHelper::preview( 'index.php?option=com_content&id='.$cid.'&tmpl=component', true ); + JToolBarHelper::save(); + JToolBarHelper::apply(); + if ( $edit ) { + // for existing articles the button is renamed `close` + JToolBarHelper::cancel( 'cancel', 'Close' ); + } else { + JToolBarHelper::cancel(); + } + JToolBarHelper::help( 'screen.content.edit' ); + } +/* + function _ARCHIVE() + { + JToolBarHelper::title( JText::_( 'Archive Manager' ), 'addedit.png' ); + JToolBarHelper::unarchiveList(); + JToolBarHelper::custom( 'remove', 'delete.png', 'delete_f2.png', 'Trash', false ); + JToolBarHelper::help( 'screen.content.archive' ); + } +*/ + function _MOVE() + { + JToolBarHelper::title( JText::_( 'Move Articles' ), 'move_f2.png' ); + JToolBarHelper::custom( 'movesectsave', 'save.png', 'save_f2.png', 'Save', false ); + JToolBarHelper::cancel(); + } + + function _COPY() + { + JToolBarHelper::title( JText::_( 'Copy Articles' ), 'copy_f2.png' ); + JToolBarHelper::custom( 'copysave', 'save.png', 'save_f2.png', 'Save', false ); + JToolBarHelper::cancel(); + } + + function _DEFAULT() + { + global $filter_state; + + JToolBarHelper::title( JText::_( 'Article Manager' ), 'article.png' ); + if ($filter_state == 'A' || $filter_state == NULL) { + JToolBarHelper::unarchiveList(); + } + if ($filter_state != 'A') { + JToolBarHelper::archiveList(); + } + JToolBarHelper::publishList(); + JToolBarHelper::unpublishList(); + JToolBarHelper::customX( 'movesect', 'move.png', 'move_f2.png', 'Move' ); + JToolBarHelper::customX( 'copy', 'copy.png', 'copy_f2.png', 'Copy' ); + JToolBarHelper::trash(); + JToolBarHelper::editListX(); + JToolBarHelper::addNewX(); + JToolBarHelper::preferences('com_content', '550'); + JToolBarHelper::help( 'screen.content' ); + } +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/toolbar.content.php b/oss/joomla/trunk/administrator/components/com_content/toolbar.content.php new file mode 100644 index 00000000..b150f85e --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/toolbar.content.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_content/views/element/view.php b/oss/joomla/trunk/administrator/components/com_content/views/element/view.php new file mode 100644 index 00000000..9b578f47 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/views/element/view.php @@ -0,0 +1,204 @@ +getNullDate(); + + $document = & JFactory::getDocument(); + $document->setTitle(JText::_('Article Selection')); + + JHTML::_('behavior.modal'); + + $template = $mainframe->getTemplate(); + $document->addStyleSheet("templates/$template/css/general.css"); + + $limitstart = JRequest::getVar('limitstart', '0', '', 'int'); + + $lists = $this->_getLists(); + + //Ordering allowed ? + $ordering = ($lists['order'] == 'section_name' && $lists['order_Dir'] == 'ASC'); + + $rows = &$this->get('List'); + $page = &$this->get('Pagination'); + JHTML::_('behavior.tooltip'); + ?> +
    + + + + + + +
    + : + + + + + +
    + + + + + + + + + + + + + + + + + + + + created, JText::_('DATE_FORMAT_LC4') ); + $access = JHTML::_('grid.access', $row, $i, $row->state ); + ?> + "> + + + + + + + + + + +
    + + + + + + + + + + + + + +
    + getListFooter(); ?> +
    + getRowOffset( $i ); ?> + + title); ?>', '');"> + title, ENT_QUOTES, 'UTF-8'); ?> + + groupname;?> + + id; ?> + + section_name; ?> + + cctitle; ?> + + +
    + + + + +
    + getUserStateFromRequest('articleelement.filter_order', 'filter_order', '', 'cmd'); + $filter_order_Dir = $mainframe->getUserStateFromRequest('articleelement.filter_order_Dir', 'filter_order_Dir', '', 'word'); + $filter_state = $mainframe->getUserStateFromRequest('articleelement.filter_state', 'filter_state', '', 'word'); + $catid = $mainframe->getUserStateFromRequest('articleelement.catid', 'catid', 0, 'int'); + $filter_authorid = $mainframe->getUserStateFromRequest('articleelement.filter_authorid', 'filter_authorid', 0, 'int'); + $filter_sectionid = $mainframe->getUserStateFromRequest('articleelement.filter_sectionid', 'filter_sectionid', -1, 'int'); + $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); + $limitstart = $mainframe->getUserStateFromRequest('articleelement.limitstart', 'limitstart', 0, 'int'); + $search = $mainframe->getUserStateFromRequest('articleelement.search', 'search', '', 'string'); + $search = JString::strtolower($search); + + // get list of categories for dropdown filter + $filter = ($filter_sectionid >= 0) ? ' WHERE cc.section = '.$db->Quote($filter_sectionid) : ''; + + // get list of categories for dropdown filter + $query = 'SELECT cc.id AS value, cc.title AS text, section' . + ' FROM #__categories AS cc' . + ' INNER JOIN #__sections AS s ON s.id = cc.section' . + $filter . + ' ORDER BY s.ordering, cc.ordering'; + + $lists['catid'] = ContentHelper::filterCategory($query, $catid); + + // get list of sections for dropdown filter + $javascript = 'onchange="document.adminForm.submit();"'; + $lists['sectionid'] = JHTML::_('list.section', 'filter_sectionid', $filter_sectionid, $javascript); + + // table ordering + $lists['order_Dir'] = $filter_order_Dir; + $lists['order'] = $filter_order; + + // search filter + $lists['search'] = $search; + + return $lists; + } +} diff --git a/oss/joomla/trunk/administrator/components/com_content/views/index.html b/oss/joomla/trunk/administrator/components/com_content/views/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_content/views/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/delete.png b/oss/joomla/trunk/administrator/components/com_media/assets/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..08f249365afd29594b51210c6e21ba253897505d GIT binary patch literal 715 zcmV;+0yO=JP)C4}Mrzlg<+1Y8PEBfUp0jJpx4B>@E+cy3`^(Gw`Mf+2&yxZm<$to~Vpgvg&QKNR z_f#1(r6svZt%iF?s+n<8X?B&!h3g9Dbb8_=MX}!;HiQSAh`bp^WMl~Z-44teO7W_Y zV4thSL{h;rJY7!l3%5J4H1!tIzB`Dv+YxO(haWeausGZYkI8^hWj6mzo=L0{%;yxzh{5!Htr?51 zvG|W62MzC8BZ76hRpCyO2zOn<%e)K>NHge!-~)Ap33OdWw6hsLYbCxGNt0%wk_2z7 zfyYvXheSG)5HRK1VB~%mq7Dmurw#bi@hEcOr3&G1ZiF*$M=&9nB#VNf&Q^r$4G5kp zTURh&s)E0%5&hyVD}sp<72~zmAY`Y(9aqO6CXF%=zFHGzO-A&I(pE}v70YQxCPJ{Y z4L+?5-crdLn3ZRPEs!A4ehEY3ZRpL~w9>@aMN+{F4dI@v&>(QDHQum!mG~E^$OS8l z!7?%Uwib*ROP67Hw`ika)gX-(8Ia`-u_IEhxG7U<13kSsMW+$lbb2dUMm5p6pa}cjgA+U$^mJ^AjD?&bdi)8~y+Q002ovPDHLkV1g8IMc@Dc literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/index.html b/oss/joomla/trunk/administrator/components/com_media/assets/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/assets/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/medialist-details.css b/oss/joomla/trunk/administrator/components/com_media/assets/medialist-details.css new file mode 100644 index 00000000..f7ad6ca1 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/assets/medialist-details.css @@ -0,0 +1,39 @@ +/** + * CSS Document for media manager list view + * @version $Id: medialist-details.css 10387 2008-06-03 10:59:16Z pasamio $ + * @package Joomla + * @copyright Copyright (C) 2005 - 2006 Open Source Matters. All rights reserved. + * @license GNU/GPL, see LICENSE.php + * Joomla! is free software and parts of it may contain or be derived from the + * GNU General Public License or other free or open source software licenses. + * See COPYRIGHT.php for copyright notices and details. + */ + +.outline { + border: 1px solid #cccccc; + background: #ffffff; + padding: 2px; +} + +.manager table td, +.manager table th { + font-family: Arial, helvetica, sans-serif; + font-size: 11px; + border-right: 1px dashed #E7E7E7; + border-bottom: 1px solid #E7E7E7; + border-left: 1px solid #fff; + text-align: center; +} + +.manager table td.description { + text-align: left; +} + +.manager table th { + border-top: 1px solid #E7E7E7; + border-right: 1px solid #E7E7E7; + border-bottom: 1px solid #999; + background: #F0F0F0; + padding: 4px; + color: #666; +} diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/medialist-thumbs.css b/oss/joomla/trunk/administrator/components/com_media/assets/medialist-thumbs.css new file mode 100644 index 00000000..da08cc03 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/assets/medialist-thumbs.css @@ -0,0 +1,105 @@ +/** + * CSS Document for media manager thumbnail view + * @version $Id: medialist-thumbs.css 10387 2008-06-03 10:59:16Z pasamio $ + * @package Joomla + * @copyright Copyright (C) 2005 - 2006 Open Source Matters. All rights reserved. + * @license GNU/GPL, see LICENSE.php + * Joomla! is free software and parts of it may contain or be derived from the + * GNU General Public License or other free or open source software licenses. + * See COPYRIGHT.php for copyright notices and details. + */ + +div.imgOutline { + float: left; + border: 1px; + + border-right: 1px solid #f0f0f0; + border-bottom: 1px solid #ccc; + width:90px; } + +div.imgTotal { } + +div.imgBorder { + height: 72px; + vertical-align: middle; + width: 88px; + overflow: hidden; +} + +div.imgBorder a { + height: 72px; + width: 88px; + display: block; +} + +div.imgBorder a:hover { + height: 72px; + width: 88px; + background-color: #f0f0f0; + color : #FF6600; +} + +.imgBorderHover { + background: #FFFFCC; + cursor: hand; +} + +div.controls { + text-align: center; + height: 20px; + line-height: 20px; + background: #f9fcf9; + border-top: 1px solid #ddd; +} + +div.controls input { + vertical-align: middle; +} + +div.controls img { + vertical-align: middle; +} + +div.controls:hover { + display: block; +} + +div.imginfoBorder { + background: #f9f9f9; + font-family: Arial, Helvetica, sans-serif; + font-size: 10px; + width: 88px; + height: 15px; + vertical-align: middle; + text-align: center; + overflow: hidden; +} + +div.imgBorder a { + cursor: pointer; +} + +.buttonHover { + border: 1px solid; + border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; + cursor: hand; + background: #FFFFCC; +} + +.buttonOut { + border: 0px; +} + +.imgCaption { + font-size: 9pt; + text-align: center; +} + +.dirField { + font-size: 9pt; + width:110px; +} + +div.image { + padding-top: 10px; +} diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/mediamanager.css b/oss/joomla/trunk/administrator/components/com_media/assets/mediamanager.css new file mode 100644 index 00000000..8454a94f --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/assets/mediamanager.css @@ -0,0 +1,106 @@ +/** +* @version $Id: mediamanager.css 10387 2008-06-03 10:59:16Z pasamio $ +* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. +* @license GNU/GPL, see LICENSE.php +* Joomla! is free software. This version may have been modified pursuant +* to the GNU General Public License, and as distributed it includes or +* is derivative of works licensed under the GNU General Public License or +* other free or open source software licenses. +* See COPYRIGHT.php for copyright notices and details. +*/ /** + * MediaManager javascript behvaior styling + * + * @author Johan Janssens + * @package Joomla + * @since 1.5 + * @version 1.0 + */ +#treeview { + padding: 10px; + width: 190px; + overflow: auto; + /*height: 390px;*/ + border: 0; +} + +#folderview { + +} + +#folderview .path { + margin-bottom: 10px; +} + +#folderview .view { + display: block; + margin: 0; + padding: 0; + height: 360px; +} + +#folderview input#folderpath { + width: 65%; + background-color: #EEE; +} + +#folderview input#foldername { + width: 20%; +} + +#folderview iframe#folderframe { + height: 100%; +} + +#uploads .upload { + padding: 4px; +} + +/** + * Upload Widget CSS + */ +.upload-queue { + list-style: none; +} + +.upload-queue li { + background: url(upload.png) no-repeat 0 5px; + padding: 5px 0 5px 22px; +} + +.upload-queue .queue-file { + font-weight: bold; +} + +.upload-queue .queue-size { + color: #aaa; + margin-left: 1em; + font-size: 0.9em; +} + +.upload-queue .queue-loader { + position: relative; + margin: 3px 15px; + font-size: 0.9em; + background-color: #ddd; + color: #fff; + border: 1px inset #ddd; +} + +.upload-queue .queue-subloader { + text-align: center; + position: absolute; + background-color: #81B466; + height: 100%; + width: 0%; + left: 0; + top: 0; +} + +.upload-queue .input-delete { + width: 16px; + height: 16px; + background: url(delete.png) no-repeat 0 0; + text-decoration: none; + border: none; + float: right; +} diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/mediamanager.js b/oss/joomla/trunk/administrator/components/com_media/assets/mediamanager.js new file mode 100644 index 00000000..fbfe0ff4 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/assets/mediamanager.js @@ -0,0 +1,180 @@ +/** +* @version $Id: mediamanager.js 10710 2008-08-21 10:08:12Z eddieajau $ +* @package Joomla +* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. +* @license GNU/GPL, see LICENSE.php +* Joomla! is free software. This version may have been modified pursuant +* to the GNU General Public License, and as distributed it includes or +* is derivative of works licensed under the GNU General Public License or +* other free or open source software licenses. +* See COPYRIGHT.php for copyright notices and details. +*/ + + +/** + * JMediaManager behavior for media component + * + * @package Joomla.Extensions + * @subpackage Media + * @since 1.5 + */ +var MediaManager = { + + initialize: function() + { + this.folderframe = $('folderframe'); + this.folderpath = $('folderpath'); + + this.updatepaths = $$('input.update-folder'); + + this.frame = window.frames['folderframe']; + this.frameurl = this.frame.location.href; + //this.frameurl = window.frames['folderframe'].location.href; + + this.tree = new MooTreeControl({ div: 'media-tree_tree', mode: 'folders', grid: true, theme: 'components/com_media/assets/mootree.gif', onClick: + function(node){ + target = $chk(node.data.target) ? node.data.target : '_self'; + window.frames[target].location.href = node.data.url; + } + },{ text: 'Media', open: true, data: { url: 'index.php?option=com_media&view=mediaList&tmpl=component', target: 'folderframe'}}); + this.tree.adopt('media-tree'); + }, + + submit: function(task) + { + form = window.frames['folderframe'].document.getElementById('mediamanager-form'); + form.task.value = task; + if ($('username')) { + form.username.value = $('username').value; + form.password.value = $('password').value; + } + form.submit(); + }, + + onloadframe: function() + { + // Update the frame url + this.frameurl = this.frame.location.href; + + var folder = this.getFolder(); + if (folder) { + this.updatepaths.each(function(path){ path.value =folder; }); + this.folderpath.value = basepath+'/'+folder; + node = this.tree.get('node_'+folder); + node.toggle(false, true); + } else { + this.updatepaths.each(function(path){ path.value = ''; }); + this.folderpath.value = basepath; + node = this.tree.root; + } + + if (node) { + this.tree.select(node, true); + } + + $(viewstyle).addClass('active'); + + a = this._getUriObject($('uploadForm').getProperty('action')); + q = $H(this._getQueryObject(a.query)); + q.set('folder', folder); + var query = []; + q.each(function(v, k){ + if ($chk(v)) { + this.push(k+'='+v); + } + }, query); + a.query = query.join('&'); + if (a.port) { + $('uploadForm').setProperty('action', a.scheme+'://'+a.domain+':'+a.port+a.path+'?'+a.query); + } else { + $('uploadForm').setProperty('action', a.scheme+'://'+a.domain+a.path+'?'+a.query); + } + }, + + oncreatefolder: function() + { + if ($('foldername').value.length) { + $('dirpath').value = this.getFolder(); + submitbutton('createfolder'); + } + }, + + setViewType: function(type) + { + $(type).addClass('active'); + $(viewstyle).removeClass('active'); + viewstyle = type; + var folder = this.getFolder(); + this._setFrameUrl('index.php?option=com_media&view=mediaList&tmpl=component&folder='+folder+'&layout='+type); + }, + + refreshFrame: function() + { + this._setFrameUrl(); + }, + + getFolder: function() + { + var url = this.frame.location.search.substring(1); + var args = this.parseQuery(url); + + if (args['folder'] == "undefined") { + args['folder'] = ""; + } + + return args['folder']; + }, + + parseQuery: function(query) + { + var params = new Object(); + if (!query) { + return params; + } + var pairs = query.split(/[;&]/); + for ( var i = 0; i < pairs.length; i++ ) + { + var KeyVal = pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) { + continue; + } + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ).replace(/\+ /g, ' '); + params[key] = val; + } + return params; + }, + + _setFrameUrl: function(url) + { + if ($chk(url)) { + this.frameurl = url; + } + this.frame.location.href = this.frameurl; + }, + + _getQueryObject: function(q) { + var vars = q.split(/[&;]/); + var rs = {}; + if (vars.length) vars.each(function(val) { + var keys = val.split('='); + if (keys.length && keys.length == 2) rs[encodeURIComponent(keys[0])] = encodeURIComponent(keys[1]); + }); + return rs; + }, + + _getUriObject: function(u){ + var bits = u.match(/^(?:([^:\/?#.]+):)?(?:\/\/)?(([^:\/?#]*)(?::(\d*))?)((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[\?#]|$)))*\/?)?([^?#\/]*))?(?:\?([^#]*))?(?:#(.*))?/); + return (bits) + ? bits.associate(['uri', 'scheme', 'authority', 'domain', 'port', 'path', 'directory', 'file', 'query', 'fragment']) + : null; + } +}; + +window.addEvent('domready', function(){ + // Added to populate data on iframe load + MediaManager.initialize(); + MediaManager.trace = 'start'; + document.updateUploader = function() { MediaManager.onloadframe(); }; + MediaManager.onloadframe(); +}); diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/mootree.gif b/oss/joomla/trunk/administrator/components/com_media/assets/mootree.gif new file mode 100644 index 0000000000000000000000000000000000000000..b0f7332927f37ded6709b9c13e25dbb787c61be8 GIT binary patch literal 14839 zcmeI3c|6qlAIAr|D?&)*YqF&rbGT=bF%lKI`l)O(W(MP!nPvvVvN>bdU4){9C`UUL zNpd7Ng_0xX%F!$lOM|WaMzz)MANzZJ|JdJO-_IX2pZU!5{W+fB*Z0rQJ}V0YL;O3K z6pRalIr(bEcA1uxl-xUiG^1@aDJiMFy`8~eEY1v9RaFhP=l9+HF|pA2@U6jyne4K% zvg;3%TS{2bkwFt9ee?4RSs4j86Ay+{trBBHpEhK-6nPB}4(7E*a-LN*KOYZ%@N(vH z>h$QN@*KZ~{;VJm)7910?&{c_oSfO&*~hnodluMHB`&WXrA|ytq*wUO_g;9>(^OM% zBF5itZoGxldA@LVZ$?JO$>X{W4Gl$C93w0Bx^6Pc(~jOLN~oR=>AM%c{C0M{IreOT zSx;G9PfyQO|MkfijRQ?tyef~1p_&}8Ta#fIs;%BkK5e`i{p@Ys@PjBWm%B7SQOb6@ zQ+lnf*n6lx_U*u>+bQ;My3;DNTw{YApVa3Q@apL~Mz4qN7Zqf#a=Dz}rXqQ*ex#?I zHP&18q|~qB3UQ$7r$%;Ie7Qqr?Ww`q@cII8e>cpTAj{Ik<^mC zOYawFUOf-?#13~9&Wv}p6rX%KGUQ58kLxj;<#M|hOT!z+cxGTw`@b7dSrtEGZ3~#= znRwo}(H<5JPw*x&0XLEdnPLo|t*n6qWTG+LN!J=_O~a8q$(BKMl0%Sov04`6Lg9FK z1f;eOprfaS)<+xa>uCTEcqXtPPXW;S02+zpeV{QY6h;RHd~R?PF<#GzPISlEn_GNd zllRLQ?#X1*FbG6IK!8?&wicD{fj}7=8X}Nr1RAZ$BQzO-6egafNnvdNG|8Xyn3EU; zI+?~KQz^jOym&XNAJZ5PUt8!)`+PV&?aM+GhStY}Y7wZu2o|1(KxrWnUuNbN8u11( zI64W>q|zO!R3DR1$G0HUNdZ*4Hv_;qXdA6n{ssEF>eqS_?-7wq)_iCpQJP2{$2BWR zj5g}nH}#*Ozm;24iDdV{Z^{icwNZ{pZH%ry24(oU{2SlZ{6bz*c(gn%@C>Tl?qzjY*P%xA(NEavrpkOFnkSm001AfE1?d8102B4J2DG5`wx$8?E(z3D-s@UC|R@a}Q&t$uj_?vIt_ zCGOkBh2Q7r-ptOto}T)R^J;QpeC*}u$nenMi{}H+`ulo&o_0TZ+|}9f=wW+XYfE!e zV?+Iey8E>?)m8T@?^fI?zg<>(>*fviuh&b8iwdt@Ey%x;mz#4r`_jd%%nRo;($mhR zrkp*KoRpXl9~b+}&oR-bqaq{1!$ME}6cYSnP#`P7-;c?lpQKSKzCPYwWKR!w5|QAB zcRk^9{0HY_M~^uD=dh!Ly`AkL8|#Ay_FGx*v)F5nGsBwhF)=oRVGIrQ^>lT#(I_NB zOH)IA_b#=aJHAuh4p#w`w<#%ZRoEggC%aijT56M|#KsNl#l=KLgoOmx3Gnm5U@FV& z_=I5*FpafqIBOTgU?Qt9VNpecX4w4*5kZB6&1_fPX>sNKnU-^|^}opNaxZSak=v9A z2vbrF=J743cj5|VI4F`?nsBZqwv*VHw$W5Fr>})kkbcQ+TWcO!da^ZF%z5`~5owNn zg0-lgu6<-AdhJ+4VQP^>s@+j^$cilac^+fuww5~m z*v-;T*V#!@41wea=6dg@GicPInlRzs4S~HQV{Pf09y6@SC=YeN?sXf(v)|wauG&eX zI^k+{k1pX7wW_vke-UjirOEFtSd?Hv@7z;T*m#S{13pgX=;lI}}NKf(PF{hrfw;?(L> zC%aHVbmTB@pXrFJ7&=C%j^DbzTi8urs;kasQmK15Vv`FBA0?_O0)(|=4|fTOE=)M{ zN!?I06-6}mjna@Ns@vm5$2@_(=uyv?ak_dbSOv=&WVEM7CN?KPZe^Y0Atfm$@yr3S z2~`|cw!bsMB%8YVj{liv5v75cl6z$%QJoRD;68pgoiuqk71r?do0$v?w`Z)!0 z+bVH4y)*`j+2um9o$Nd3OEWgSR{}OwENA>7d3WjBfF$qj7??7Dvjd=-Ee;;ARkm>) z`Bf?~2C1T8k$!H{%Z(KzS@Xdr8CNSH7e}p_v~Txvmx#MO$0w|sZrivuKry$GK$}LH z0cjfZ4boS9=9^V68HunQ(?c5{9!oOi7yo`eFlQ>`15@)-Q`3-qxTBseB266}2(VLXCmPQQ5 zLTemXIQ|<c7j5k}|yJD?h%qw3A~av%Y&}%B4FyTmr+yS4vSX zC#3z}Ie8^#L2Q3#grL#Y%dqvE^CYn|UJkJCLs|BrW-=j)DWQw9NXc4dN#<(ELdO&8 zp8bWf>dErbOnpmnF?lPQM*ZrZ7(PLf5#?>RNxNhguoA + * @package Joomla + * @since 1.5 + * @version 1.0 + */ + + html, body { margin: 0 !important; padding: 0 !important; font: 10px Tahoma, Verdana, sans-serif; } + +.item { float: left; border: 1px solid #ccc; margin: 3px; position: relative; } + +.item a { + display: table-cell !important; + display: block; + width: 80px; height: 90px; + overflow: hidden; + vertical-align: middle; + text-align: center; + text-decoration: none; + color: black; + + line-height: 90px; +} + +.item img { display: inline; margin-top: expression(( 80 - this.height ) / 2);} + +html>body .item img {margin: auto;} + +.item span { + line-height: 100%; + clear:both; + display: block; + width: 100%; + position: absolute; + bottom: 0; + left: 0; + padding: 2px 0; + background-color: #eee; + overflow: hidden; +} + diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/popup-imagemanager.css b/oss/joomla/trunk/administrator/components/com_media/assets/popup-imagemanager.css new file mode 100644 index 00000000..362daa73 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/assets/popup-imagemanager.css @@ -0,0 +1,114 @@ +/** +* @version $Id: popup-imagemanager.css 10387 2008-06-03 10:59:16Z pasamio $ +* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. +* @license GNU/GPL, see LICENSE.php +* Joomla! is free software. This version may have been modified pursuant +* to the GNU General Public License, and as distributed it includes or +* is derivative of works licensed under the GNU General Public License or +* other free or open source software licenses. +* See COPYRIGHT.php for copyright notices and details. +*/ + +/** + * ImageManager javascript behavior styling + * + * @author Johan Janssens + * @package Joomla + * @since 1.5 + * @version 1.0 + */ + +html, body { + background-color: #F0F0F0; + color: ButtonText; + font: 11px Tahoma, Verdana, sans-serif; + margin: 0px !important; padding: 0px !important; +} + +img { border: 0 none; } + +form { padding: 0px; margin: 0 auto; width: 100%; } +fieldset { border-top: 1px solid #CCCCCC; border-bottom: 1px solid #CCCCCC; } +button { padding: 3px; border: 1px solid #CCCCCC; font-weight: bold; color: #0B55C4; background-color: white; } +button:hover { border: 1px solid #0B55C4; } + +select,input,button { font: 11px Tahoma, Verdana, sans-serif; } + +iframe { width: 100%; overflow-x: false; border: 0 none; margin: 0 0 0.5em 0; padding: 0;} +iframe#imageframe { height: 195px; } + +a { padding: 5px; border: 1px solid ButtonFace; } +a:hover { border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; } + +.buttons { width: 70px; text-align: center; } + +#f_alt, #f_url, #f_title { width: 22em; } + +#messages { + position: relative; + left: 175px; + top: 115px; + background-color: white; + width: 200px; + float: left; + margin-top: -52px; + border: 1px solid #ccc; + text-align: center; + padding: 15px; +} + +#message { + font-size: 15px; + font-weight: bold; + color: #69c; +} + +/** + * Upload Widget CSS + */ +.upload-queue { + list-style: none; +} + +.upload-queue li { + background: url(upload.png) no-repeat 0 5px; + padding: 5px 0 5px 5px; +} + +.upload-queue .queue-file { + font-weight: bold; +} + +.upload-queue .queue-size { + color: #aaa; + margin-left: 1em; + font-size: 0.9em; +} + +.upload-queue .queue-loader { + position: relative; + margin: 3px 15px; + font-size: 0.9em; + background-color: #ddd; + color: #fff; + border: 1px inset #ddd; +} + +.upload-queue .queue-subloader { + text-align: center; + position: absolute; + background-color: #81B466; + height: 100%; + width: 0%; + left: 0; + top: 0; +} + +.upload-queue .input-delete { + width: 16px; + height: 16px; + background: url(delete.png) no-repeat 0 0; + text-decoration: none; + border: none; + float: right; +} diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/popup-imagemanager.js b/oss/joomla/trunk/administrator/components/com_media/assets/popup-imagemanager.js new file mode 100644 index 00000000..eb5532ba --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/assets/popup-imagemanager.js @@ -0,0 +1,246 @@ +/** +* @version $Id: popup-imagemanager.js 10702 2008-08-21 09:31:31Z eddieajau $ +* @package Joomla +* @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. +* @license GNU/GPL, see LICENSE.php +* Joomla! is free software. This version may have been modified pursuant +* to the GNU General Public License, and as distributed it includes or +* is derivative of works licensed under the GNU General Public License or +* other free or open source software licenses. +* See COPYRIGHT.php for copyright notices and details. +*/ + +/** + * JImageManager behavior for media component + * + * @package Joomla.Extensions + * @subpackage Media + * @since 1.5 + */ +var ImageManager = { + initialize: function() + { + o = this._getUriObject(window.self.location.href); + //console.log(o); + q = $H(this._getQueryObject(o.query)); + this.editor = decodeURIComponent(q.get('e_name')); + + // Setup image manager fields object + this.fields = new Object(); + this.fields.url = $("f_url"); + this.fields.alt = $("f_alt"); + this.fields.align = $("f_align"); + this.fields.title = $("f_title"); + this.fields.caption = $("f_caption"); + + // Setup image listing objects + this.folderlist = $('folderlist'); + + this.frame = window.frames['imageframe']; + this.frameurl = this.frame.location.href; + + // Setup imave listing frame + this.imageframe = $('imageframe'); + this.imageframe.manager = this; + this.imageframe.addEvent('load', function(){ ImageManager.onloadimageview(); }); + + // Setup folder up button + this.upbutton = $('upbutton'); + this.upbutton.removeEvents('click'); + this.upbutton.addEvent('click', function(){ ImageManager.upFolder(); }); + }, + + onloadimageview: function() + { + // Update the frame url + this.frameurl = this.frame.location.href; + + var folder = this.getImageFolder(); + for(var i = 0; i < this.folderlist.length; i++) + { + if(folder == this.folderlist.options[i].value) { + this.folderlist.selectedIndex = i; + break; + } + } + + a = this._getUriObject($('uploadForm').getProperty('action')); + //console.log(a); + q = $H(this._getQueryObject(a.query)); + q.set('folder', folder); + var query = []; + q.each(function(v, k){ + if ($chk(v)) { + this.push(k+'='+v); + } + }, query); + a.query = query.join('&'); + $('uploadForm').setProperty('action', a.scheme+'://'+a.domain+a.path+'?'+a.query); + }, + + getImageFolder: function() + { + var url = this.frame.location.search.substring(1); + var args = this.parseQuery(url); + + return args['folder']; + }, + + onok: function() + { + extra = ''; + // Get the image tag field information + var url = this.fields.url.getValue(); + var alt = this.fields.alt.getValue(); + var align = this.fields.align.getValue(); + var title = this.fields.title.getValue(); + var caption = this.fields.caption.getValue(); + + if (url != '') { + // Set alt attribute + if (alt != '') { + extra = extra + 'alt="'+alt+'" '; + } else { + extra = extra + 'alt="" '; + } + // Set align attribute + if (align != '') { + extra = extra + 'align="'+align+'" '; + } + // Set align attribute + if (title != '') { + extra = extra + 'title="'+title+'" '; + } + // Set align attribute + if (caption != '') { + extra = extra + 'class="caption" '; + } + + var tag = ""; + } + + window.parent.jInsertEditorText(tag, this.editor); + return false; + }, + + setFolder: function(folder) + { + //this.showMessage('Loading'); + + for(var i = 0; i < this.folderlist.length; i++) + { + if(folder == this.folderlist.options[i].value) { + this.folderlist.selectedIndex = i; + break; + } + } + this.frame.location.href='index.php?option=com_media&view=imagesList&tmpl=component&folder=' + folder; + }, + + getFolder: function() { + return this.folderlist.getValue(); + }, + + upFolder: function() + { + var currentFolder = this.getFolder(); + if(currentFolder.length < 2) { + return false; + } + + var folders = currentFolder.split('/'); + var search = ''; + + for(var i = 0; i < folders.length - 1; i++) { + search += folders[i]; + search += '/'; + } + + // remove the trailing slash + search = search.substring(0, search.length - 1); + + for(var i = 0; i < this.folderlist.length; i++) + { + var thisFolder = this.folderlist.options[i].value; + + if(thisFolder == search) + { + this.folderlist.selectedIndex = i; + var newFolder = this.folderlist.options[i].value; + this.setFolder(newFolder); + break; + } + } + }, + + populateFields: function(file) + { + $("f_url").value = image_base_path+file; + }, + + showMessage: function(text) + { + var message = $('message'); + var messages = $('messages'); + + if(message.firstChild) + message.removeChild(message.firstChild); + + message.appendChild(document.createTextNode(text)); + messages.style.display = "block"; + }, + + parseQuery: function(query) + { + var params = new Object(); + if (!query) { + return params; + } + var pairs = query.split(/[;&]/); + for ( var i = 0; i < pairs.length; i++ ) + { + var KeyVal = pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) { + continue; + } + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ).replace(/\+ /g, ' '); + params[key] = val; + } + return params; + }, + + refreshFrame: function() + { + this._setFrameUrl(); + }, + + _setFrameUrl: function(url) + { + if ($chk(url)) { + this.frameurl = url; + } + this.frame.location.href = this.frameurl; + }, + + _getQueryObject: function(q) { + var vars = q.split(/[&;]/); + var rs = {}; + if (vars.length) vars.each(function(val) { + var keys = val.split('='); + if (keys.length && keys.length == 2) rs[encodeURIComponent(keys[0])] = encodeURIComponent(keys[1]); + }); + return rs; + }, + + _getUriObject: function(u){ + var bits = u.match(/^(?:([^:\/?#.]+):)?(?:\/\/)?(([^:\/?#]*)(?::(\d*))?)((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[\?#]|$)))*\/?)?([^?#\/]*))?(?:\?([^#]*))?(?:#(.*))?/); + return (bits) + ? bits.associate(['uri', 'scheme', 'authority', 'domain', 'port', 'path', 'directory', 'file', 'query', 'fragment']) + : null; + } +}; + +window.addEvent('domready', function(){ + ImageManager.initialize(); +}); diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/progress.gif b/oss/joomla/trunk/administrator/components/com_media/assets/progress.gif new file mode 100644 index 0000000000000000000000000000000000000000..6d8652e81a5b4ef1937e0d99f39bf5fd05ffae5c GIT binary patch literal 790 zcmZ?wbhEHb6k!lyn8?g<;J|@*6r

    )4AqUjJ>_6M7-TS*){x37ZGaTKE+Yp5>TYEO7GYs+|$X~>1(;ob~QeHH}$q) zka9p+@~b&(wk0LKslApRz3JsO^N@W#RqfC2vS4tP{ zSIT(r@hodcSJu1=QHxZ0^}ZD=<21KqdFV8+cb%`t{r=Om?AQv6EBz(RY~A}Du=>xW zM}EO+#flj$e6w!OJGwg0FH=Awit|P9iWNzj)_YH6&C|0kE?V;VPwe8EE%FZpp6p)G zv>I#dnTGVSpPqYPiQ^gTORXc_w@&*;33bK4jC|3tCVj@Lm_3OmmYZ|`HEvt?U~iqR P#0B-8Z#$fQ7#XYqNT(;M literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/assets/upload.png b/oss/joomla/trunk/administrator/components/com_media/assets/upload.png new file mode 100644 index 0000000000000000000000000000000000000000..27c63c5afe358c8e22801de541b73e0f98961575 GIT binary patch literal 758 zcmVmBR~*Li@40hl?wvRqnZ(Ao1QJ1rZCaJSDB{Laap9suT~%lorMMMz>qEQ4lo5g<`B}Oj2V=n8e9sGWVQ&&hO_UijFU(&+eSXhr@Fo^Xu=UKZ=+y zSDmER^Ln)XSd1Yp^2;}$?>z+&i<%Qh5A<$I)6^JK;J=ay1fO&1%7d?gHDJ|Bk|e1) ze|3qB8Vxf}f6qMSVjZu-;&Pcg4?5}4L1MZ%eY~F_#ym%3=OKy;L-P9AJKpf3Z(ci39q!_wFi{`Mq{ zJ*0SVfxfPfu_0%B_aJ93?kA`cBW^;RWZPkwP68J7<$6(vG4fo-LD8L1PKVrY<-5I?FU$KEpAQ! zS%3drRE^CW_8Q6?$-E<|Fjf1TTs&TK@{qG^8|>~q$V$E%-IyGy#c9#hk-YPRo_%1< zGfK&Ph7X>e4SjeC1Qj0Fr>RypGdgpPYZD_2&U4uO{M+dFqGrDfI`r}vU#Wf3nK_3O zN9G+nx_7Z};4n9*uQM`neYIg%KAIiYyXMtlye;pYi<%$y9qPDx|Bpvb_;hwy#{vE~ oFmTp1gA_Vi5(egnb@KWBQ*sVbcJX$M%m4rY07*qoM6N<$f(SNMBme*a literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/config.xml b/oss/joomla/trunk/administrator/components/com_media/config.xml new file mode 100644 index 00000000..6240fbbf --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/config.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/oss/joomla/trunk/administrator/components/com_media/controller.php b/oss/joomla/trunk/administrator/components/com_media/controller.php new file mode 100644 index 00000000..d9263d4c --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/controller.php @@ -0,0 +1,90 @@ +getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word'); + + break; + + case 'media': + default: + $vName = 'media'; + $vLayout = JRequest::getCmd( 'layout', 'default' ); + $mName = 'manager'; + break; + } + + $document = &JFactory::getDocument(); + $vType = $document->getType(); + + // Get/Create the view + $view = &$this->getView( $vName, $vType); + + // Get/Create the model + if ($model = &$this->getModel($mName)) { + // Push the model into the view (as default) + $view->setModel($model, true); + } + + // Set the layout + $view->setLayout($vLayout); + + // Display the view + $view->display(); + } + + function ftpValidate() + { + // Set FTP credentials, if given + jimport('joomla.client.helper'); + JClientHelper::setCredentialsFromRequest('ftp'); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_media/controllers/file.php b/oss/joomla/trunk/administrator/components/com_media/controllers/file.php new file mode 100644 index 00000000..d13d6820 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/controllers/file.php @@ -0,0 +1,188 @@ +addEntry(array('comment' => 'Invalid: '.$filepath.': '.$err)); + header('HTTP/1.0 415 Unsupported Media Type'); + jexit('Error. Unsupported Media Type!'); + } else { + JError::raiseNotice(100, JText::_($err)); + // REDIRECT + if ($return) { + $mainframe->redirect(base64_decode($return).'&folder='.$folder); + } + return; + } + } + + if (JFile::exists($filepath)) { + if ($format == 'json') { + jimport('joomla.error.log'); + $log = &JLog::getInstance('upload.error.php'); + $log->addEntry(array('comment' => 'File already exists: '.$filepath)); + header('HTTP/1.0 409 Conflict'); + jexit('Error. File already exists'); + } else { + JError::raiseNotice(100, JText::_('Error. File already exists')); + // REDIRECT + if ($return) { + $mainframe->redirect(base64_decode($return).'&folder='.$folder); + } + return; + } + } + + if (!JFile::upload($file['tmp_name'], $filepath)) { + if ($format == 'json') { + jimport('joomla.error.log'); + $log = &JLog::getInstance('upload.error.php'); + $log->addEntry(array('comment' => 'Cannot upload: '.$filepath)); + header('HTTP/1.0 400 Bad Request'); + jexit('Error. Unable to upload file'); + } else { + JError::raiseWarning(100, JText::_('Error. Unable to upload file')); + // REDIRECT + if ($return) { + $mainframe->redirect(base64_decode($return).'&folder='.$folder); + } + return; + } + } else { + if ($format == 'json') { + jimport('joomla.error.log'); + $log = &JLog::getInstance(); + $log->addEntry(array('comment' => $folder)); + jexit('Upload complete'); + } else { + $mainframe->enqueueMessage(JText::_('Upload complete')); + // REDIRECT + if ($return) { + $mainframe->redirect(base64_decode($return).'&folder='.$folder); + } + return; + } + } + } else { + $mainframe->redirect('index.php', 'Invalid Request', 'error'); + } + } + + /** + * Deletes paths from the current path + * + * @param string $listFolder The image directory to delete a file from + * @since 1.5 + */ + function delete() + { + global $mainframe; + + JRequest::checkToken( 'request' ) or jexit( 'Invalid Token' ); + + // Set FTP credentials, if given + jimport('joomla.client.helper'); + JClientHelper::setCredentialsFromRequest('ftp'); + + // Get some data from the request + $tmpl = JRequest::getCmd( 'tmpl' ); + $paths = JRequest::getVar( 'rm', array(), '', 'array' ); + $folder = JRequest::getVar( 'folder', '', '', 'path'); + + // Initialize variables + $msg = array(); + $ret = true; + + if (count($paths)) { + foreach ($paths as $path) + { + if ($path !== JFile::makeSafe($path)) { + JError::raiseWarning(100, JText::_('Unable to delete:').htmlspecialchars($path, ENT_COMPAT, 'UTF-8').' '.JText::_('WARNFILENAME')); + continue; + } + + $fullPath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.$path); + if (is_file($fullPath)) { + $ret |= !JFile::delete($fullPath); + } else if (is_dir($fullPath)) { + $files = JFolder::files($fullPath, '.', true); + $canDelete = true; + foreach ($files as $file) { + if ($file != 'index.html') { + $canDelete = false; + } + } + if ($canDelete) { + $ret |= !JFolder::delete($fullPath); + } else { + JError::raiseWarning(100, JText::_('Unable to delete:').$fullPath.' '.JText::_('Not Empty!')); + } + } + } + } + if ($tmpl == 'component') { + // We are inside the iframe + $mainframe->redirect('index.php?option=com_media&view=mediaList&folder='.$folder.'&tmpl=component'); + } else { + $mainframe->redirect('index.php?option=com_media&folder='.$folder); + } + } +} diff --git a/oss/joomla/trunk/administrator/components/com_media/controllers/folder.php b/oss/joomla/trunk/administrator/components/com_media/controllers/folder.php new file mode 100644 index 00000000..7a53b6cd --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/controllers/folder.php @@ -0,0 +1,130 @@ +redirect('index.php?option=com_media&view=mediaList&folder='.$folder.'&tmpl=component'); + } else { + $mainframe->redirect('index.php?option=com_media&folder='.$folder); + } + } + + /** + * Create a folder + * + * @param string $path Path of the folder to create + * @since 1.5 + */ + function create() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Set FTP credentials, if given + jimport('joomla.client.helper'); + JClientHelper::setCredentialsFromRequest('ftp'); + + $folder = JRequest::getCmd( 'foldername', ''); + $folderCheck = JRequest::getVar( 'foldername', null, '', 'string', JREQUEST_ALLOWRAW); + $parent = JRequest::getVar( 'folderbase', '', '', 'path' ); + + JRequest::setVar('folder', $parent); + + if (($folderCheck !== null) && ($folder !== $folderCheck)) { + $mainframe->redirect('index.php?option=com_media&folder='.$parent, JText::_('WARNDIRNAME')); + } + + if (strlen($folder) > 0) { + $path = JPath::clean(COM_MEDIA_BASE.DS.$parent.DS.$folder); + if (!is_dir($path) && !is_file($path)) + { + jimport('joomla.filesystem.*'); + JFolder::create($path); + JFile::write($path.DS."index.html", "\n\n\n"); + } + JRequest::setVar('folder', ($parent) ? $parent.'/'.$folder : $folder); + } + $mainframe->redirect('index.php?option=com_media&folder='.$parent); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_media/controllers/index.html b/oss/joomla/trunk/administrator/components/com_media/controllers/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/controllers/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/helpers/index.html b/oss/joomla/trunk/administrator/components/com_media/helpers/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/helpers/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/helpers/media.php b/oss/joomla/trunk/administrator/components/com_media/helpers/media.php new file mode 100644 index 00000000..cbf469fb --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/helpers/media.php @@ -0,0 +1,186 @@ +get( 'upload_extensions' )); + $ignored = explode(',', $params->get( 'ignore_extensions' )); + if (!in_array($format, $allowable) && !in_array($format,$ignored)) + { + $err = 'WARNFILETYPE'; + return false; + } + + $maxSize = (int) $params->get( 'upload_maxsize', 0 ); + if ($maxSize > 0 && (int) $file['size'] > $maxSize) + { + $err = 'WARNFILETOOLARGE'; + return false; + } + + $user = JFactory::getUser(); + $imginfo = null; + if($params->get('restrict_uploads',1) ) { + $images = explode( ',', $params->get( 'image_extensions' )); + if(in_array($format, $images)) { // if its an image run it through getimagesize + if(($imginfo = getimagesize($file['tmp_name'])) === FALSE) { + $err = 'WARNINVALIDIMG'; + return false; + } + } else if(!in_array($format, $ignored)) { + // if its not an image...and we're not ignoring it + $allowed_mime = explode(',', $params->get('upload_mime')); + $illegal_mime = explode(',', $params->get('upload_mime_illegal')); + if(function_exists('finfo_open') && $params->get('check_mime',1)) { + // We have fileinfo + $finfo = finfo_open(FILEINFO_MIME); + $type = finfo_file($finfo, $file['tmp_name']); + if(strlen($type) && !in_array($type, $allowed_mime) && in_array($type, $illegal_mime)) { + $err = 'WARNINVALIDMIME'; + return false; + } + finfo_close($finfo); + } else if(function_exists('mime_content_type') && $params->get('check_mime',1)) { + // we have mime magic + $type = mime_content_type($file['tmp_name']); + if(strlen($type) && !in_array($type, $allowed_mime) && in_array($type, $illegal_mime)) { + $err = 'WARNINVALIDMIME'; + return false; + } + } else if(!$user->authorize( 'login', 'administrator' )) { + $err = 'WARNNOTADMIN'; + return false; + } + } + } + + $xss_check = JFile::read($file['tmp_name'],false,256); + $html_tags = array('abbr','acronym','address','applet','area','audioscope','base','basefont','bdo','bgsound','big','blackface','blink','blockquote','body','bq','br','button','caption','center','cite','code','col','colgroup','comment','custom','dd','del','dfn','dir','div','dl','dt','em','embed','fieldset','fn','font','form','frame','frameset','h1','h2','h3','h4','h5','h6','head','hr','html','iframe','ilayer','img','input','ins','isindex','keygen','kbd','label','layer','legend','li','limittext','link','listing','map','marquee','menu','meta','multicol','nobr','noembed','noframes','noscript','nosmartquotes','object','ol','optgroup','option','param','plaintext','pre','rt','ruby','s','samp','script','select','server','shadow','sidebar','small','spacer','span','strike','strong','style','sub','sup','table','tbody','td','textarea','tfoot','th','thead','title','tr','tt','ul','var','wbr','xml','xmp','!DOCTYPE', '!--'); + foreach($html_tags as $tag) { + // A tag is '' + if(stristr($xss_check, '<'.$tag.' ') || stristr($xss_check, '<'.$tag.'>')) { + $err = 'WARNIEXSS'; + return false; + } + } + return true; + } + + function parseSize($size) + { + if ($size < 1024) { + return $size . ' bytes'; + } + else + { + if ($size >= 1024 && $size < 1024 * 1024) { + return sprintf('%01.2f', $size / 1024.0) . ' Kb'; + } else { + return sprintf('%01.2f', $size / (1024.0 * 1024)) . ' Mb'; + } + } + } + + function imageResize($width, $height, $target) + { + //takes the larger size of the width and height and applies the + //formula accordingly...this is so this script will work + //dynamically with any size image + if ($width > $height) { + $percentage = ($target / $width); + } else { + $percentage = ($target / $height); + } + + //gets the new value and applies the percentage, then rounds the value + $width = round($width * $percentage); + $height = round($height * $percentage); + + return array($width, $height); + } + + function countFiles( $dir ) + { + $total_file = 0; + $total_dir = 0; + + if (is_dir($dir)) { + $d = dir($dir); + + while (false !== ($entry = $d->read())) { + if (substr($entry, 0, 1) != '.' && is_file($dir . DIRECTORY_SEPARATOR . $entry) && strpos($entry, '.html') === false && strpos($entry, '.php') === false) { + $total_file++; + } + if (substr($entry, 0, 1) != '.' && is_dir($dir . DIRECTORY_SEPARATOR . $entry)) { + $total_dir++; + } + } + + $d->close(); + } + + return array ( $total_file, $total_dir ); + } + +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/images/btnBack.gif b/oss/joomla/trunk/administrator/components/com_media/images/btnBack.gif new file mode 100644 index 0000000000000000000000000000000000000000..62734b0b5cfb276628caf41d3affbfab1d6ac480 GIT binary patch literal 603 zcmZ?wbhEHb1ERneK_UgpT*=m)FB}c8dKAbMJo;6~h%HuCL7Tjub+2r81P1a+# zZ17>*{m<6O^m1qK)imieSp8rYM=G<%R3)X&Jk~oT`YxplPiM0}ZdHHEbH?te(fifb z+@F-RUvJr+o~c)hi;p^8d2-R|s1x5h=C*UuTv^OPdzFsfKf3L~HoNt9A`Kjk*DFLa z1;jV7FS*sQ@5R=hYsJ8Dq7hL1$-*kaz{H>fG9MHt4D34^n3|Xjg`SD$e}>|N5zoS??a4zq%@R>-L>zW*Xl*z5f5(dH-Kd z`u}bFm+J)$#c?k$b^iac;?vhZuWxQYcj4N{r#DJ6ga7}(dtjo{!z+8vZSwzkDE|Nd z_x~R@_jkA4-ckJj`@CyggAVj+o||v|>)VT8KVJX;zw!Ewo1dPZ{JJmd_RiR6_m2L5 z(fj{L@5ROLACHy(|G)VE|1)Jd;s5`y`TuMGsl`?|Hs^eJdg0Ta$Zv0Me|o(1=FW&8 zKmUGtdGr7Oncu&Ee{%a21MPw0PZm}Y27d+}kX4{KVPN0c;NR4w)Y{4-B4TRV?BCWQ zGJ&PXKSDJm#50P;YR&|IAwH|chH?B(D;A6R`ndc_A7J$p<=x9hKM^jZzt#)D4WbFgPq;?5@EeFr#3L XV_V~7_0$zp0+)C%o^HU*$Y2cs8p;k^ literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/btnFolderUp.gif b/oss/joomla/trunk/administrator/components/com_media/images/btnFolderUp.gif new file mode 100644 index 0000000000000000000000000000000000000000..7bd245dbc268cc2d716731da3693fdb1e16ea4ea GIT binary patch literal 599 zcmV-d0;v5*Nk%w1VGjTg0OkMy0A>K|!$;Ad43>`t?&s0p#Be)`I_ub-e6V^YkQ;j5 zNAu&4-?vO`(L^(50KnL%SfoSw_PFrcg-N_5%H7CZ$1XLR93*)u@5W?;=1}hR!@R#& zGk_WY?u**1Bd5ot{`Sxpdlc^9t*69W>0PWe7Mtui7qaN?nPfMIU6m=6Xg)Jd> z1pn)V`Q>qu_g&1)X8-q#-LEzG|HIw8RsZsv|JaJv;?g9C8urp;|Np`N?62t8sQ=b- z|NrSZw;n}=DkG>8D2*8Z|IGgNwtwSIZqqvndj$Xgnd{F>f;0?s zDh@a}IbT>85IcfIHC07VEoWv}3I>EkOeQ8(Fbh5kS9vHBw?{`nI$K^+84YAN47Yk| z5?wbSJwa~|P$#!Y3=vgmFH~h5RwQt@7$PP^Ln8@FLOK)}L_`dTA3r+qptB*&9RdW` lG&!>*zyKR@jI4k`@PG#aDeBmf6T#iE8BPeGkyIrR06SHi9en@* literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/con_info.png b/oss/joomla/trunk/administrator/components/com_media/images/con_info.png new file mode 100644 index 0000000000000000000000000000000000000000..1903fabccd8c10b7aecb3d8874d049a47ab9019d GIT binary patch literal 855 zcmV-d1E~CoP)fFHw8bbf$nr8U@N+OQ@Uk&5ynO$I;Wsk}*r1O;85n9Oo?_UMOyzyBJ3 zc~JTQAb^-a5~JVE5gArb;)tC*r#6%45gW740e9z z0{?#hUJp_W5J1eTiF*@%uySQ2hv+geGeT?uVJ0B^_oojGOE;cpc*iWjz$GjSms8M^ zWjL_shQ$A0Mh^i3hy@g23fgiE-+-n+_=O0Z2Oofb|H{B1D5J?B2s8l12Z5h|85kaY zVqg%pHf4Bl_fb4R0I~f0^VfkxR1~fN1OklXB@_!pxe;tJ0XBy3tf&t7eBuxT(2j)w0R&EoqULkYvuf!ZaOoR^C4;pX z7`%8cGXOIH!~g$(!3j2e?h6K917EQG+a0?Y-tX9Xfq|jV5FmiS1_&F?Q~-MAyr8j> zfVi~<13vI@<1U70TXurt%n)e61AqX6XC?v7NeX{|{$9@|B4i+KX~ZC|tH!{}3CRP$ zzI|tScKQm#{T+uGK0kVP0hClgnn7{^0mO)I1D9l50x+G&0}XTF;y%~9u-B3O!MGaNG5!Z5?vTf}9m3j>2S0IkT5RGmX<`{{R2q-{1f8<;!c=u08YS|HqFXf%0fT z@h1zb2m=d)4oDni1_O)TgcF{t_wLB>>61VBK=P`f0%s9hj-#xD&gpm3ZHE-D=o>01 j2;>)iV9a;+{3y<&VtwpcaivHU->jTzhu``sF<1itOieM< literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/folder.gif b/oss/joomla/trunk/administrator/components/com_media/images/folder.gif new file mode 100644 index 0000000000000000000000000000000000000000..180ea1cc66adc02fa6ae8b99ef428f63cb1acbe1 GIT binary patch literal 1293 zcmV+o1@ihwNk%w1VNd{20OkMyfNeDY?1t>wVR3PB*{UD^^|RL2)@EZ_yu7^k_xH@1 z0N=k;^4FE`@9&wJnd!x7_3WSD-{083a{2P#s)Q1FY(?qPjrr}*^5%5Wt2zJ7X6)a& z(5EZ^{-cR`N&oea^3{Ubvq6M}g#Y*FudlD_-M9blzTCWBvWN};>5|Qz4*%3||NqSY z=7FJ+VwQO%*|9qR|GxkDlF_nLY-Uo-%*_AsuJ6E0|KNN7+I7~fG5_@5;>?Nv|K_8k zqw?jv=H}+Zlm-9(_xb33_1~!G%y9D0UE|ZE|L=+a|C#2uIedJ4|Nq7R|J3QvRN1pD z-nCNl-JXqeCyb1YwY9bX|E#jCnE&$E#Kgq^*K*RK5C8h_-q^*Sg*m&GBhsZG_2|Uh zwnzW}?(*i3;>AR8XG+hV2&so1|L3Ov_|4Y2WahtG=FEP!pIzdzFxjgq@5of#!*>7w z-ezWI^4)Cz|F!?)eu{H3^5(AQ$4LM1#?!4k-o<$T@}B?y{{R30A^8La6aanzEC2ui z08ju>000O7fPR95goTEOh>41ejE#!-3fYHbj015hF*14s;06;+{4=+;e) zTelkjx~Zt}HSE~3`p9fs==PhOzkvV76{27c7Nn&zT|Ne9{*Zq5u>~J@8G>_kW)m;6o{%qFaWWQd!6_2A^T2rx9!!Gsi6XyJtxYQTaDG$4RjDRHdv z01Rp1WnxnrFj1H_tAw~l7$u%4V?G){;8|{}9I?h4MWpfAk3a_bmrJ>{vwq z0YWy}qy|O25FINezyQONq-Ck)mRxeFffG{bN97xDuwg@&Xr@V;22TLs1A|DC8HEi< z)M@9Pc;<;Gn+n32N&<4G5Wt{>7Ha6BhH9X|0UoyUh8a<$(88pYR%+>`mMS_&4X(gL zgrt~;DryTipzv9z3h0r79jvzM>Z`E6dV`U!sE{fSxaO+suDs@I1ZrlyFvXFfDPTel z$R?}ovdhAugla*&a7P&fEa*xGDjdt~wmE2UgBxEcfWiv^&@jgm4v>Ha5JFt5g9%y0 zEAPBn7@@=)S|~t)6crpWfCvsyfrSA;H1J_68R&q<3Jf>Ag0lpe5d;O(&hf8m4+zu{ zLBR*JqK3i@d+SEN?e*7Shb{KlWS4FB*=VPYb|3&d DSVx&v literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/folder.png b/oss/joomla/trunk/administrator/components/com_media/images/folder.png new file mode 100644 index 0000000000000000000000000000000000000000..e5ded3f24bd566b14aa780a732144a781226aff4 GIT binary patch literal 2199 zcmcgs`#Tc~AD`Qc@Dg1_(mAQTMJ1(@lqDgzOowR42<2sFm)wcXl+1m#&E+sNd9lo8 zn3?+!n=Q8y8`3nn7U9&%Ugw`UpXd2}KhN{|{_uUi-{<>$Qr%o`YwXe60{{Rt9PDk~ zch&80swnJMCSSg2R}_#y2M-k$mC0Gx82~{3xto*6t;ZfFGhNAj70~)j$2XnR(9lP# zD=W;ZwB@nVs*2ZNMqa)Mzt)%+kVnjwzGtq?3&p(BA$nM58oHZ76m}8PqCNO68Elfr z;&?@8vG2QnX5Mo@q`&pn7=BUIT3S-bU@(Y@?w^LKGgHItium#7*pEFa5-$GdkL_f1 zJiQ>Sff79}?C$TR_3?%{wJ8nwyQEj?Sd?p7%XCk35x4pY9DM1^;uM$56}6%NoGSb| zOKl?uamqra+zgqthMeNQBFL$F^(ZP5A(e>5@A+&t8=sSohB*kEVq{_(uO1T@d~Gj~NE;IMJ0qJy7_>&r-nSEPfb>3309|iV=&&+ak)_N(8_0g^-0^Tan6S zG7dFh{nJ?0$CkQFql-h4IYo56O{0J7}I0yot^K}Nmg#0)8?1?`SDf`BNm^T!ls5W3SyV0yYjL3 zHdbdUavoAMAq99mzr9$tR1+JEtSU|v4>Ag$d2Wemqy2Twnwr1vzUVm0-37FJz<(Bi ze`cH=5uU!gqiVSQeIx*&ru{eNhC~T}?V5(DTV5y-EC?0phX@2X`#nU!pn(Cwen;(s z5rL5~LttG{wQ|GDPy%N{bM1ke%l1Tbi^#Es$za-9nG2sSOw&}e z+9D?`92U2&=~S;<6|GM_yOaIn`kQjVfp&TO^SrKLn+y>YXA|ke4q$}cU;FAW{N z)@dJLsd&A98aN&7CU0k-fctdKMw38Io{knmmL zMH~A)4ARfSYjNh_`T%{deDhTsgcyf0MJiBr;4`$UrP3QDQYyR=3narVjTVn}UwI<{ zyEoJ##)D#Y6J31*oz(9nksY~xI666Vu5Kx!2ihQ!OdD$vY*ZWeV}Tit$D5iJFN?Dl zl`ICJ6t90>i+%TFJ3^%!-hpIAwtas~*M0yFTHIoa>2<&Rj#4NT^TyQ}MC{4IpcDG? zTdk2G6ms15TAyb>GG?Nk{x~RTV0qNFqtxO$`Lt2|@)o<+7 zlL+gVl$NXpy1wtw{oqiL<`={GrWUK-!mN{hWO*-u8br<{QFd?*X7J9x%PDPTXgAFO N4!2xv-vA-#{{y2#>)-$Y literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/folder_sm.png b/oss/joomla/trunk/administrator/components/com_media/images/folder_sm.png new file mode 100644 index 0000000000000000000000000000000000000000..30dd4eac09bd827e16a3abe436bf75e8eba31e86 GIT binary patch literal 703 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZU$}J|V7! zv8E3Wx1L^;ed5H4J+mU)TdKakf4F0H-@8jw=g#cg)bDd?XUDZ`*N$yy+`lNRwb=LS z(FJesAH2M!^x2~uUvAEQa((ZC0|$P7dw=iDvK?DiR;4?Wxq`}gl}UsU?>>B*NDX1%_- zZrhZgAD^D>o}18;?e*>3w_}^yzulhy;mY*>?uHM~uRgoCbyAf_S&~(ERmhD!O_z@> zyMLs6_3}B}r$=7fUU773%DGJyH5rb#_txFp+w=3wt0T*^@0?!!?&-z3v!-m_y7lC` zivQog_ti#R+1IUn^l33L5Q0mB{DS{e88H0+|5bRYCD3@z0*^?bHQYiV%y{W;-5;Q! ze2HsBNpOBzNqJ&XDuZuga#4P6YD#9Jf?H-$YI%N9cCmuR){ILPK&6*GT^vIsrkb9= z9dyV*py8p3lWx0)hlNLzhDm@Qs~4{l*HJdBperYS+w=HF|LdN6^L<)+qfgQEUs*wQ z>%A9jyLaW7#BDRPeZmqti}x5mPnpN0c;vVH9AjJ7V>g}&e+>K2HEY>S=OetuQynxp zn*Q28dh(EK-}~+29L5!12RE&G%((TJ5?lEfF2yD78xt?hW6AsYY@HB`Q&WVT=dHB_PaB8 z?%Y{-w`1;s#x-xUQdVm(zm?Z}#{I^}!|m7fO7~eUe&_b;^W&`_imzO`Qg_IG^H=Zf zPbY6VKX2Nx{M)ZCy!iNV-rd-&Ri+m|ZQt}ca>eVUPha1+oU_{TrfKbmz_P=dO?On! zoH_IU{rj!&dm2wVy#D_1|NsAMPfp!>fAY?+0hychAO1MM{aOpB zYoFB5Yt%Uk^nPGTkY6y+e9{2}9xc~2pSuGM=PdAuEM{Qf76M_$OLy!300resTq8_S|#6CIb=H zgpin!f`t|ig6vVwHU;n8vHbOp zb$?C>J!o6bI4kjv=G1KGJ_ZTN+UCPMbS?aZE-amO;ZA^sd24dP(dTo;TT`ceKb*A9 zye~2=_07%uuQqH*ni0y_cD3>3vnie`MuA0ZDmm&H3OJY;B<&8GXfN93v)BsgBL+`b KKbLh*2~7Y}Re+!X literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/folderup_16.png b/oss/joomla/trunk/administrator/components/com_media/images/folderup_16.png new file mode 100644 index 0000000000000000000000000000000000000000..c96e49b06c9b3a6f51bdd9f3cb6aa58776d96b6c GIT binary patch literal 682 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZWdkJ|V8* zn|Tf&IkftNYuA0fr%#`*I@{a5DW~eF&hd{+SKh9@|Nio?KR>HB`Q&WVT=dHB_PaB8 z?%Y{-w`1;s#x-xUQdVm(zm?Z}#{I^}!|m7fO7~eUe&_b;^W&`_imzO`Qg_IG^H=Zf zPbY6VKX2Nx{M)ZCy!iNV-rd-&Ri+m|ZQt}ca>eVUPha1+oU_{TrfKbmz_P=dO?On! zoH_IU{rj!&dm2wVy#D_1|NsAMPfp!>fAY?+0hychAO1MM{aOpB zYoFB5Yt%Uk^nPGTkY6y+e9{2}9xc~2pSuGM=PdAuEM{Qf76M_$OLy!300resTq8_S|#6CIb=H zgpin!f`t|ig6vVwHU;n8vHbOp zb$?C>J!o6bI4kjv=G1KGJ_ZTN+UCPMbS?aZE-amO;ZA^sd24dP(dTo;TT`ceKb*A9 zye~2=_07%uuQqH*ni0y_cD3>3vnie`MuA0ZDmm&H3OJY;B<&8GXfN93v)BsgBL+`b KKbLh*2~7Y}Re+!X literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/folderup_32.png b/oss/joomla/trunk/administrator/components/com_media/images/folderup_32.png new file mode 100644 index 0000000000000000000000000000000000000000..a21c16996fa472589297714041d62616a1c26003 GIT binary patch literal 1833 zcmV+^2iEwBP)2*=u81+xROs1cL(HD@{PT4F<*hANQV#6WMt=*$G#QOD03Z~TFeFY1 z{aY!oJ^SmrOX6XDl84y?KkcsxIXZpVo7IPB26bs}gd?h};YS3FT5!oM(sT$smPK(5 zP5L7Am`#h0{kDEE^IroT{8ve{$f~y6S5(D{xyP`z?kUu+Tn9!ME}k(OLsR|e>VFTn zL!V&fMmA~%+5Qu2r{Dj=06)1}d?+`mj-@X}_%}ARpl;>*k5B)I;w^JB zP{t0Q+%WU{=LUG;a`6x6##NiXQI2OHKZLNqxS)@M2TB--VFhjJToUi}9EbJjB*HPa z|IN)a?GFv`qn_ezZd#qqej2r(-Es&)e*^%)g9N@H0S^#>DSUG40*o=(Qoj>g0@5)M zSpzRK?{hXcjlW!a9g(Iv$6v&D{o(PM?!~bRj^XK%SBP-+@nj$Dr`CTDoLe9v7olp2 zV7UY@5&(B`WvCPT*B`}m4L`@niB7=sz#{^Im_(#Tf`wi9eKvMCK8LA3V+&UwKRxma zSr*{!o5%KM#?6jL%f5|SROQ7Xt=mK@e!V>JAxH~)u@ebz}G5%jH?4Z z`F3y*!Bq;8DutCL6{s)y3Nqtn$J;lL?Ohf?33WiEDArYOMRB!(6;{v?c_mU;@MPHm z)D~^ZkJ(i5BsPV=jsB5q(D3r&0f~}ogU4#NL!>B_PzN3e@O(!sEV8D#vSBqW2Gd8biUhD_E8@`KGVhctmKU)AyeG0Lf5Gsq-Kx9qx^BuA9k^qjE+b$j0 z4OMFqDgpqJSK6CE6b;xN+g}j;u06B)5cEVDQt3$;h`jtEjkUFFAsyI`m)pK1fD*c% zXol4lt6+%8E2q;C9>;eof3{@s{3`DF6-KWM5U>{g^^g(? zWaor|W(#h^1u1y9B|RcC=o+0&Lf|&CW)Kd>;9wLvGlZNOesFXE7Ul3!t3YE@DR>#v z^=?agK@JOcl@WNW@5VT^HsF+i5&=pi7&YLuu;|2)wnpe*u8aA}6N? z-Qi0E{jjJ7AG=3%@zNHWZ}AvrAwD#Ku|#IrW|5Q20-QQHo|O(c(tB|X-JkV=lm9HK zMVEiU-J1f7Sm+&1pzEVSNQWFbb#OepEC2v}(3)+Z9WrlRzC45v`@50zyu8!p0p|M& zDe=#Nk8z>9AG1T|jSpJ0_k9m6Ii<2teBiu1rH*^6&}onF4x`I}G$UM}Ct ziNBa2Yz0seEJKkm1e^Il2!SI#%!(|=vXhwcGH_=M#x6>e8O71fbvu9YyB9k27Xr9z zyIu}Ip^1DoT2FUIAE5|WQY=0YS^;w-8mWXvs$X|f!&}cDojbpr@B0FrIB|k>b#;-O zH*eCJnHiGH<%lO8TK4qh6U^3oxQ(anQnH5I!~y{67~v$%4e8)L< \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/images/info.png b/oss/joomla/trunk/administrator/components/com_media/images/info.png new file mode 100644 index 0000000000000000000000000000000000000000..96d3069150e3f69ebc7f4ead32ef60ad76efc056 GIT binary patch literal 553 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZRm^J|V6$ ziTif$+GE`HKdWu+(YyaMSN=CGIPm`c`!i?GgiU=V5O>UP*8go+|4S9Ws^0wn;ggq_ zuHS23|JuL#`09Pv@7%c)KJVZE|Np&8*1AmjFCV*M`~K6J(=Li99w}b;zj51to%9`! zMVogWzVP(Lo4D@dfwTXoF8^Q9z46MGD_&FnZ#;afZP)*pMgML3{|Ut(d;0XLV%nkX zwg1=dz1Oq%|E}G8v!`53?LW>I>2U(+TC4nJ za0`Jjas zZPv9H?&i)K#r@tT^?UA=zd!q~PV#Jb#?MkM>pI5iYsB6u*ZcuFp25@A&t;ucLK6UH Ca~nMX literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/avi.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/avi.png new file mode 100644 index 0000000000000000000000000000000000000000..806aee2a6473dd3acf16e97010f8980da465771b GIT binary patch literal 731 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J8u0(?ST zh1prRTzb~BVt;ONaY|g6zn&)->D@kfpv*|L56{E7-~4vwcgc3!#jXxh&6%TL_N z%FdqB)?(nQT@df9$jg5F+_{>d0BZ?JKUcFqzke@JN?v*J;-@cPO6To-_Uzf7QUcdVL>qkjy$dvU5H#OB)2YIc`%y|9k_4n`J z|NsAg|L*Or*WX23n9tdBp&%=D$FU2?&YkOy2~(Dq%?Yzm7UO*X{yk9PgR575{QqAS z8BjfM>z|zCrtr?dpfJ#q$x;TbNOieB*x#Ggq*T>V>=eDm(VS(=RSFf_xa*7C)eqdz^ ztW1BN;8qzqp`ma6`n`KKCg%kN2rXVXTt9hFEL539#VJh9BD>iYgPGC5~<8H0bn_ryh zTxvI?A*^Fkr_k~VCh|Vqvsd=__j5JR?2(8#aPQ!KwU|2=R#r|TNo&_HPG&IQzhZ^P q{=Pn8j{}@1*nVHX*W`X#kilq&(Nm*UE2V+nV(@hJb6Mw<&;$VR;B_(p literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/doc.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/doc.png new file mode 100644 index 0000000000000000000000000000000000000000..c816f94ca4ec16d6df75b043a0556513fa492eb3 GIT binary patch literal 537 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZX{3J|V8P zlgba>eSdLH%d$gPT9@y6{rXku%ncW>-Z*pS%)x4tFP}f%dHj6mwuMKI9GSWOHys;K-`O2g3v{Y!NswPKPz~{b0jjk8k7Xjz0L}uB$YKTt zZXpn6ymYtj4^U9P#5JNMI6tkVJh3R1!8b9vC_gtfB{NaMEwd=KJijQrSixdz#-$3N z(xsj*jv*3LUHfheH5u@@1g`8=5Mo_x!6)jvhJY!#UnN4PpTF6?sNvJL8_SlL%(7M#luSOm?)~p$r3ze3Edf>Y zEf-GV@JQ|v7V15xC<#MC^2!y s{)31AbX~l4Ug{U~-{o3|d;)LlSAUk=9&5AcJJ7)lp00i_>zopr05YpB1^@s6 literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/index.html b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/mov.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/mov.png new file mode 100644 index 0000000000000000000000000000000000000000..a7930e02032254f24298db79a84351c273ad16b4 GIT binary patch literal 747 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J880(?ST zh1pqmTzyfubZ>5PaY|g6znBTlW3Sr<%E&txeSS?Ag;0AN=a$=lT0CUU~Ih zOi3{<&~!z8ZB%U3mhIbjow)Gn&)->D@wXp5*5=??b>!Ooii(@}A7y1{A31VlN?VJ8 zt9C)WuOct|vuDq0f&vyDxMVFMdHdYC-ZcmOT+QyRUj66y@2z|HZYwBUo|OFQ%a^0~ z-#>Y9&(hXn-Ps3|QzPy@d*R@%Ey2KG&A<@pX87jytG~Z~T)ler*tv5hsUg)tUYnZg zS7v5R-+1Whj-9Vxz5f3F`~Uy{@87*0ZDC%JmAd`dh3=TJJ*O@!OUvejStyHfzJLE7 zsN})bD?k4KuZj#1;O9AT^F{lLeOa*qdyigQke|`N;fRBU2BR0prCw-YeY$Kep*R+Vo@rC zZ(?#$er{??W}<>yW>IQ+eo=O@g2mR1OBFz+r#)R9LnNjq7ZhK1W6I0p$;&fiJf$FT ze7V-q=Sz4+3`%$zm^uyWn2#AGOHOF0b7<)9b}UzUO_F1p#%`%w z42`=NDzqux?URmX-VVS$iD9*1HVO^`>pk|FmR*-eT}{^>bP0l+XkK Df;NEE literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/mp3.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/mp3.png new file mode 100644 index 0000000000000000000000000000000000000000..f6cd29be968c36f2befc4c624a0b06a5277972d8 GIT binary patch literal 756 zcmV_t!*HIKq9vO4R$sv2q88b5mJOjF~X7%ve_)Ut8sn5W>Um`+1O@a zV3^^2_sqF7Vy)$WhTB=Jt*t#0g5o>6NAxUa5#^SlIo}7NZEC#`= z3@|-C{d9D6^m!PD7-O*3VvHg0Dc`OV!fP0Qkmsm+&UIq=+Skjk#`mcVpsF@W5|Sjr z7?VL#5suF4eEexqQjE2T2(4z5i+cS@25=n5yL&%lEC!`05%n)sNMpdDqC`=Q7vFr! z0Iuu0cL5@B9i~h@F41=n`UeI`O^WAwoS$D@Seq_)g2MAW_pea0nag=Zal-4DFK9M? zFkE^>UvEJF!@%_Q-fwjSavgCuq);eOtyX#W{(v`c*Fl{>-LN>u;%9*F3_4;}#rJ)7 zcXt^dAE#2Ou)n`gKA%TKR8=(tsH)R#-Ekaz->21TvA4I!%E}5OBO~nW>~viI3lI^# z-KAJ8X7&)->D@kfpv*|L56{E7-~4vwcgc3!#jXxh&6%TL_N z%FdqB)?(nQT@df9$jg5F+_{>d0BZ?JKUcFqzke@JN?v*J;-@cPO6To-_Uzf7QUcdVL>qkjy$dvU5H#OB)2YIc`%y|9k_4n`J z|NsAg|L*Or*WX23n9tdBp&%=D$FU2?&YkOy2~(Dq%?Yzm7UO*X{yk9PgR575{QqAS z8BjfM>z|zCrtr?dpfJ#q$x;TbNOieB*x#Ggq*T>V>=eDm(VS(=RSFf_xa*7C)eqdz^ ztW1BN;8qzqp`ma6`n`KKCg%kN2rXVXTt9hFEL539#VJh9BD>iYgPGC5~<8H0bn_ryh zTxvI?A*^Fkr_k~VCh|Vqvsd=__j5JR?2(8#aPQ!KwU|2=R#r|TNo&_HPG&IQzhZ^P q{=Pn8j{}@1*nVHX*W`X#kilq&(Nm*UE2V+nV(@hJb6Mw<&;$VR;B_(p literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/odc.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/odc.png new file mode 100644 index 0000000000000000000000000000000000000000..91af5d13f952d0ca3f4ad935e72bce6adeadc1f7 GIT binary patch literal 741 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J8u0(?ST zgXVj^e))Ru%~!4KPCdvGS#e-R?vyplRv%4X(YR=$=bgvTzkd06_w4?8D^Jeaxh#2Q z^!Y}Yzkj}VZtmQ)`SATaH%oTCJbn2_-?SZdi+49KsV!P}<-_+sOLw2XTcUQZKYG^g z^9K$bs9)0%x;VV4fA`iSXFq=YaxPc?*8N96|NVdd_|c{l8?!b}pR;f7_wV2T{ruas z^Sm`2^Ot=6^#1<+`}N)H*K9gEecP$?H}CJe`>}8Bq2}E$W7Z_R zd;9Xw&+q^L|9^7n&?XV0EJet3V;{>$G#emivc z{rxwOuiv~Mx*%lX<|FgA9X-|Tef|3N_T{@Hm&H80_iW{%iyO9|p1u9lr8#SPfx#71 z666;QG@LTPfLnWlK^`z37&r?&B8wRqxP?HN@zUM8KR`kG64!{5;QX|b^2DN42H(Ww zqWs*{l*~j0x6Go{^8BLgVg-w>8J8-6O0RmlIEF|}wLSYX=#YZ|%LARR>yJELo(lA@ z5lBgTC}_FpUBe<{Pp`m(PWS)Yo^jhyUl)2eSF!4I##%w$BZh@SJylrP=PJz5S$kG-jqN_`zF-4sy@oq=zwe#CpP|cZu>HD!K0E&G3+xd-^BDU@y33upHi~I2Y9^B`>*~!JM8e}`hewYy`Da(Nj*F}wB%*M z$Ip+}RjhR7a=Koeetq}R+AyuXsxDjV<4&EFzQLAr|GVXu*y%?nw(rk4B5|HdPS4xP`;bFA-P zfA{f=tJ}8qt=a$V-R0G*S4}%M@58TvUw?mXJ#zN`gGbx1>?xmL8WS0G|KW+=Y1>a< zKYMo3^rXaud-v|GIdtjf>HcL)=Ffk;_QEyu_a8q0|Nrpo$1fWXZ#sABUSnPD&6%?n zEZ_U<|No}`Ju^2Rc6P9O|NebOZtRBbr+@tV{p{JZBUexEJ#gyk)vJ5&e5kH3teLlE z`KbrTFJ8;Z$a{SC>htHX|NsBLaQ~$P2M%~T+r4>rbHe(=yN+MDe)Imt2RG-fJo)KfZJS@1L)C=goWb`o-5TA3uKivSr(`sasDL&#lf#OE`D$-lEM%{{HxXN(oXVTg=cAdh6XIUR7Od z5m`CkMTOVN$42(t+{U82Yu$JhzGchYxs2P1%K{eZp7BARBO6>^N-I@Efz2a$gT-5 pdw)Xlk(7makLT$mr@J?PuwS2OlK;%fffeXa22WQ%mvv4FO#mgk%k=;N literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/odt.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/odt.png new file mode 100644 index 0000000000000000000000000000000000000000..815851d156cb8119435d4a5c049d146db74d683d GIT binary patch literal 578 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZXi?J|V7g z9gFwf`EcgUnaz9G?`m;*{rc7Bjk8xTYMsCLV*l*D-@ku<@$BKwtIxOYy*^>tjBD4f z-Me>h{nn#E@c+-RNptpHyn5r}+LqF$HQNpyn6&x$uKgDlAGrMJ+3T~%)|bxOw0zC} zRfjJ2tvz`6(bGfKCfkpm|ML0MvuDr#{QQ3D=AHdVuKfT1|Mc0bXRqH|bmGC@y?c+I zJoWn3%kSU+zkmP!)QRIAs}CK%`+o0^1vB?t-hKV$mK{g0t!;Zbg zwj{_e7-$HQfB{ooYwnsVph27k9+AZi4BSE>%y{W;-5;Q!e2HsBNpOBzNqJ&XDuZug za#4P6YD#9Jf?H-$YI%N9cCmuR){ILPK&9(ET^vIsrkb9+$=75c;1DSBT`GrFTKtZK zZO7&&kLLHY2KZ)j6Ue@`6?~xJ?RM3InBgP z%1&OK0hhnp=ZKwW}`njxgN@xNAdY4C{ literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/ogg.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/ogg.png new file mode 100644 index 0000000000000000000000000000000000000000..a011502cc4182a950d3419a65c1d516d43fbdcbb GIT binary patch literal 759 zcmVNyziU03Hla=Xo(I*C=M#r zK?jFA6jyN+T!T|LSJy%dg;res8|>twf>7#`Iu+WWRZB_>rXexWw#obB?mE=GO-yr?7A-q zo~MA>+1W?q9y`S4!-Ymb#=x5{ywX#tBj3}vAet5b@?wq zDJ3_%^!4?n_Rr7Hsn_d_jEqn!l_(Sn-GT~GX>itBQA&}`W;r}OWM^jw&+|ArIbnKw zn(ggvT-Rk~WrZY30ENQR+d9c)GE^!Rwzjs2~*xcM?X=#bIwKakuAc_*S zwo0VuFNlb*l%myYQ7)H>qKIm>N`HSp^YinJj*b$?F`Y2N7%(PLuIox~7ksTX6B856 z&CPLqd`z`krC2O7H8n-M-6o0>;#dP3M}+I^A3AlA%jE*caRAuZ*kEyS5n~Js3kx^z p#HZZ}Q5b^$ySyuvYPDLe`Wuzd5~g&H|BV0u002ovPDHLkV1n%*Qg#3U literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/pdf.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/pdf.png new file mode 100644 index 0000000000000000000000000000000000000000..f6cd7e2651e83de6b1fc759aace22234d93037ca GIT binary patch literal 633 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZQ7aJ|V8_ zZEg48etYWDjY*r1hc?c;&{lVS(fmgnSH1uC{qdv6`x6s7SM0re@7}Ao?|%IMzvb|m z_EiU7UpRX-F7&~%!xyJdTYL8L`~%m{6r>l--hSof_n+TB|M~sC9l82&=hov_Zrx}u|MT?%Nh&X|WgRM~{*qzhI!5Bmo8-s&^>Q z*aI|^v%n*=n1O*?2!t6g-L3lr6qGMBc!h{ROivzgIN4gv=XZ7v<1cGkvffyh#qXqn^hBAqs0*!SN& zOYGyt|EKR8w>L}7X?dZrPUGpF^%`AfpC=qNJ<|JY`_$z(uU=yk$eepU@0R}auX|X$ z{>ka@(2`S#Zg_v(Fv3I9Wt+&YdAFD+c&IgTB-kH}KXUtZvlUar4u7j9R|MbLCH}hi zi`UyAYsc@5FLO#cxn^CDjSKJ+fACl5{H{|4aw7RhzyA>0IiY8w*peyd*G<{!^Ht$M Z{fQ46&9C?xQ-Gde@O1TaS?83{1OT^ibw2%eKr_aB9{uJ4=;NHD^2TxybTd{A)vGaSbKd-DP|MUCz zmPxbLZQOG1@{N7_j#kdwdhYuDqZjU9ef51>L&y8~@0T9DQafSUnKNhp{QRELvS|0A zlUGph+O+BD*~`lhU0Hkh;kIc@4xM}Q=+)=+meq$29eV%$ z`>|_p{ed2_FA4Gs1{y^qV8EvCtN-syK%+PdJR*x37`TN%nDNrxx<5cc`4ZQNlHmNb zlJdl&R0iL~|zCrtr?dpfJ(P`x;TbNOm#i~Qs|(8NZUg< z&m&^GuB$><&9dSUOkV$czm9KqWxbv8^VybS48O&hA{d&qgJ1ogUUHsm!7Oprt%cJ{ zpU-1FWa;Gj_d*`e?BntU+k>CX;?40hn3^bPxIiV2Ly;+Gnb!xu-HtNFA6cK={k{6> zcXYKskH?O>W8o;>d;FVdQ&MBb@05KU%SpWb4 literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/rar.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/rar.png new file mode 100644 index 0000000000000000000000000000000000000000..f1e5f22426f95a63377760097acf8f846ff999a6 GIT binary patch literal 751 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J880(?ST z*LS(x+h4bI|AjU48eToV{N`*=#q3RcW=EdAasR;HZF^R>Y}>GK-lVdlEA#$8TYCHO z#2?>3pL+OV-I2>b?kzjFxw?1rg>5sUH?5ewdw#~V<87OIJ+7Zv-M@DK!z){FfBe7Y z+UxgM7d(IcZtudh|35aJUz@pZQsmvccNe$&U*FyI=ib~OzkVOv*t&Ig`i@N#?>%{O z_1vC~%X@C_EZw&-^TFYkrzd-NUwXK0?ab|y1Gdagef8?q^_`X9zklC7FX`BZhDjTa z-`U%=XWPOx{h?Q{UVVRU%84V}*Pg!n|NsAOD_gg&o_2mi!QY3=|36!MWNFIU9`FC( zzpveU?&ylVliPYutSQ_%#dp{0&R1vpc5GXG_vGv|k3XK>);wkNsckdk-d3ABr|z$3Dlfq`2Hgc&d0t@{HMlrM3O zC<)F_D=AMbN@eg(OfJgLO-;#6RB+2IN-fVX$}U#0*qU*v0;u%7r;B5V#MI;hXJ(!P zF?L}Aj?6~Zm@i+K-i>|wL|Mtl(t&B?wvQjbIT|erEGx^YQeYHwb4&KT<`5fu*T8jy zL$bI%uQSV*iv0UCSbEa*T7C3(F7#D-&wI~J=Efcd< T^S3<#dX2%;)z4*}Q$iB}x-Y6+ literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/rtf.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/rtf.png new file mode 100644 index 0000000000000000000000000000000000000000..fefd66c6ec55dfa38ee65e0794ed7415800f29b0 GIT binary patch literal 525 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZS;TJ|V8P zlgjViyLWL-%i3etREhY7*REZA{rc60y<6|yd)Bq<#_kgr`!*c?`|HQfZ40m7 zy#4I?^Ia`2d-v}B@$2`NBj?WExW9Mz;`)W#=WIFp_`$u~*ROv6@#Fpb_y7O@KYsG` zjrDDhp1s*}^=0stzIdPujY@+2f`L-R0|t=NS7saD0d;d0ctjR6FmMZjFyp1Wb$@_@ z@+GbjCBgY=CFO}lsSLh}$wm3OsVSL>3T~N2spa`a*~JPLTQe?I0F^HFba4!knCjYh zlkboL4@>qs5#~(I2MSy&D`EnL`u_j7oa3A%_s8HpgZX5ri4aYv*VbUG@%_B*YyW@*pId+vz`cBd+G za|_D4cS-2BIOOcu+fiFOZ=<8#oTDk``#(%lxDt8iZ1oYvFx8|5e-oURioK6n_4N1CSlc_KnF8;y85}Sb4q9e0F>+-jQ{`u literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/svg.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/svg.png new file mode 100644 index 0000000000000000000000000000000000000000..e7d109497b2c471104567ccad3159aa7af441daf GIT binary patch literal 685 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZPuOJ|V7| zC-YvvdUgKNwdJeV6|A}1zI@Nu4_`K&J$&QYwdvbVEjx0f`f}~6(+~gr`F;QX{n}l# z_8mPtf7{WGyN^A7{3v%{!a&s{*j2b2W)1q1CO2`~^)eRr$CBcR!w1s;*b3=G^tAk28_ZrvZCpnQpI zL`iUdT1k0gQ7VIPVscS_ZfZ(qqJmpyQEGX9QFgI{#ny~V6+oqDJzX3_B&PbFy&ZJO zK&18IvZSe5%u>oz_$Dk0TkB<}u>4(1l+8JX!@u|Udfw*#-yKskd5s0b!Tk&}4f!Hb z+25Xh|NYN3t3lI*_q_P!zjZ$o6x~!>_L)z9Qen3u(dL_4ph&IH0ydqn8>WTaQH!?M z-7RaGyUAhkA!*zBmfNK@PfNeqboXxV`}KbN*!Hk2O0!?S)`sV^wA^&*MvF=Ndv#7{ z322tzJuf~v-d51dalP-7mjSsfUJoB{wOySr=+iC{6tZeVK!9-alvlf#GyG%dT&147 TO}XeN&|?gqu6{1-oD!M$O+QG7(;>lZJMojg5%_L_-P7Pohs z-hcM;#-a7|uC6?A_t>{D|99>`-!QRe#?>WHpF9c+4?1$|<-1Q#Ei3k(U$iKza_RlY zTd!}~^5N^(vzKq&ymfo|#^aag%-(qBZiu(*yyb^y9=zj~;9WjzscW#`v*FW+(X{`E8GuU?tf-&#}u@M%ZGVK@9o~V=k=SX&tHGo zbn)rJeHYK&yY}nPpELJg-JU)7=sBR4@83Utn%y{W;-5;Q!e2HsBNpOBzNqJ&XDuZuga#4P6YD#9Jf?H-$YI%N9 zcCmuR){ILPK&4kbT^vIsrY3W^GV?54_>4~|VZj=im1h>Si*)z|UAcO7EBD1KS9;1) znK)lC{=D;sv!^F0>tt9#qlUPoc5b>P|AGdihy&j4N8{riJo%LpGSn5Ma@OP|E}YG> z$#tS{v+KDCC9^C2Q;##LFkD%*IOpYqyvNVf7{eAWUoNq3x%!(Eq6gM;hEYV`njxgN@xNALmkz* literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/tar.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/tar.png new file mode 100644 index 0000000000000000000000000000000000000000..ee9539490abeaf9b9cd26c60a11403f4026d4874 GIT binary patch literal 749 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J931AIbU z*LS%*INVY+ZQY7vH}|Y;*}E|9)#J;Bvo`&>x9r4`?Pspv+cqP5I<+_x}u_2J9ccUHbR)3bAm@A(Y{n^sI--W9lYN>t0H^KY*&`}pzW$!$H`w=KGL zu)oWt{v0se;!A@3f`MjI12Et)WP7OT2cT7)1s;*b3=G^tAk28_ZrvZCpnQpIL`iUd zT1k0gQ7VIPVscS_ZfZ(qqJmpyQEGX9QFgI{#ny~V6+opIJzX3_B&H@8xHIz=rW!>>MK^^554eRowk3SLaJ~Ey|MhFvo^4~|)Yy1K zqU}~!F>`CABh#*=e?5+N_wLPz*}E|9)#J+>m-qa*x9r4`?Y-MCZJQB&_Qw5lo2!p)Y;9b2 zXmPv$nt2U(PtN}F{qvr!leS!bzHU+!a=GhdzQyS}?=>+JORR~PKr zws790vegGKo_zZA#hZ8ke{9;cV)FLM0awrMd3a^(z5R8!4^P}PJMz!Hxj%mWzI*rX zk)>@CduMOcn*PwU+nRT*YQK8*>i_@$&#%q=`*8XHXKT02 zPTjhC+R+txYkR!^fB(Mr@a26AGq3Ngd~>E}=M>*vt2@tcC|KSVxOGa@+w03de*AcH zThESdi*Ft5-*=*CH!$=POM?7@fd*0uFkm<5hxe}yK+8A_JR*x37`TN%nDNrxx<5cc z`4ZQNlHmNblJdl&R0iL~|zCrtr?dpfJ!fVx;TbNOilja z#LQDLEv2Af!=kBr5e>nycds;ip9~9`GLv0J;Pmtf4_=*3Ig+1rD1}WZ;qsM~5~k@zKgSi_39MYB;0S!60^yBnPHlyPkb23;OqO)vA9%W#1gmzr0n=SeTQu#$ZC? bdTxfc^Jcf7BpqJ_^c;hytDnm{r-UW|vkATK literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/wma.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/wma.png new file mode 100644 index 0000000000000000000000000000000000000000..8b3e7c08f3483c628e91090fdfa3f71309b32e84 GIT binary patch literal 554 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZP=UJ|V6^ z`sDq$HJh$xPF|aol;q~-cK`8{J$v@tx_x`!%~zj3e={~V?pVCFsi{d-RrUY>|L@SQtl{P5ojiH+ z>Z8|=969p()ysSL?p=HSNmEmkot^#r=MUe%zkl}ZS#)&t$RJ=uRVP6=JhKD*}b!XZnY>0@(Tt!0~s(NbMUdX^Z!2un!#D% z5n0T@z%2yAjF;}#{Q(Nfm$*ih1m~xflqVLYGWaGY7v<-srer26xMdclmgg5`7b{q7 z&A3znRJzL3#W6%;YV7&jd`$*CYzZu_oLQ?m<^>1}oNZGw+4a5N*qm?DkN7W-ye~I1 z)*CWNY@eOdV>n;rO{c)ee>?r$XMf$q=%V@bsLATAY~F$mAz{Y0i&uch+s#}F2g@QuAm_EiyMrW8THUzqw!PC{xWt~$(699#n B8jk<~ literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/wmv.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/wmv.png new file mode 100644 index 0000000000000000000000000000000000000000..df6f0cc4cf89293e7b55d1d2c4beada283998b13 GIT binary patch literal 748 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J931AIbU zh1prxpL@Jz`}W-8;*_{Be?7ew^|jx>e7b$^oVAHsLws=6+%2y@eqM9v;`L?Ao;`ae zrlgn_XgZ~><=%tGH}5~1zVm!kY}An>M?U@eJ1Z-`aO&EtSFdVwaCEIXl$D*m|Moir zSM7p$UqxQ_i&w7fI&rZkD8O1m^68G9ey(PJe*fN9P`ErP`O}v#J9q6`cKnW|t;OWj z2nTO%2?mB!4?o;lz1o_AA=1t8&FfcxfBks!;NG!w=SosT_FR8a9ptsCseWZ<#_LzF zzkmP!|NsAJ3-kFE6?6AqEXYbd`S{DdXD=qNJJ=l)cJbDOy{E4zOUvejStyHfzJLGz z{@vR^9S^Qv*|TTQkN^LxA_D~Yd9q>ywjDjcAU|X8(Q6JCmd7t%>y8g`ic?bphFg3| zkY6y+3JL)OKK+_E*L4D|;wxuEEh3zMH8kDuQq#y<)Nv|j*!oZQFTw4>813c#@))5aePCByGGZ> zPpwX83O0Se`oUQEO1N<&XGXiWgjNC9i5UmBWJvz}{af2`#wzayRvDS*w~JJGA3eI! zqIiwX!m{;KMMp9hA-{PX*F;kGT;4{ttv@@(&}8xz+ZI{D=5m?@ zy?gB&&+a{U?fdud`wkqse*Jpf%J9VpE+0O9;r63v|NsA=w|oA@YZv3^1yrv)_aIYz z@Aa4Ud*6I`|Nh+3qu;;(-+bW2_xInQJ-at$>(O%;FCRE{?97=nu?xd4ENPgscJIz( z=lAy{JSjD!649rIzOxWfv=0Y|Xe-0aSX* z)5S4FVyf@?+kS@}1lS&|Yv|b^voxaX>6XX?E8hxfzi3+SxnqS>!-?PfxuaJcnt$f( z^qFURmTs*TT&ufw{=|hzYp%^OO>>}^xPHGWx;9z)^aP3kd_tB4&ISZAvR1@q%m(8%e czWpoX$_~{>)2!J41AWEd>FVdQ&MBb@05mq2M*si- literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/zip.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-16/zip.png new file mode 100644 index 0000000000000000000000000000000000000000..f6efb32f84750eb26d4a0d054cdc23ba3d2373cf GIT binary patch literal 768 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vk7#J9J0(?ST z*LS(x+g~?p_chnjsf9B)y?T84!^OTmD_i!=j=Xwq&&K6FXZG}O+puuWyoPy`$`0(^ zw(G|0qbu|NKU;eD?%f~XKcCxN{o~%U2^)@IJF$A(jOg9-GdA^loV|Yk;gzjztBxMq z*!uKj?}NiFcOSo4b@1Z*s|#MfeZO~M+W#M$&acfpdhOx5Ns)`&{kN{3_UGQ*+lMFa z**f{huisl|r{^y_adT(szJ-|&-hE$x}^`cC3Y7Wj435Se!)O9sRkHun8f7F{t##%XMsm#F#`j) z5C}6~x?A@LC@5dz8c`CQpH@~t*Fh$^v_`dlc9+xFUyh!g(wys1$j9+JzgdrM}@J+KesP#dKm@N!!h^R9C4{n4Q)(~&5>Qbk2Y^H_xrR!#|t57wU}UcGQ}dlm8N2D5E?!h7Z; hg@uJm4sClG8Jy}Zv|cZ}G#ThO22WQ%mvv4FO#u3RwR->n literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/avi.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/avi.png new file mode 100644 index 0000000000000000000000000000000000000000..8e286baa2dd2b20c864bc4dcd53c09a0ab368998 GIT binary patch literal 1705 zcmcIk`#aMM82@4u%Qd0lEO(pJT$-}tbk^FK70nRx(1d9&?Z)BgVjFUuMlK;9oo6HD za+Hl+S}xr!3mrInFtqle7MX^E|!J^Land^ZxL8p7;5D-Zz)z=dBAdg8%@a z>qEeiRc!ecS{ka36XxAlkp>&<6R4%7HKja03jpdjNyh^5T1F-{4}MRm?qR2<;(dIm z`Wh2=`$Xpw*48)dkjS3i-m63(3c+D%aWSr>)g7WOYHn4|E!2pIZ1-8v5YWK%$}~od zF9t!SQiUSXq(UJO6jA+AmS)iGTcd-M^P5{+51&3u)7N_`pC}(xX658YpYT59Y9|(p znUTatKP9)}j=1l0#2>-JtgYL#(%N1u#|5AY>}?~ofw^0^40Uu)+nPPDDr3i=4hjkF zcrcdlg}mDNn@lECC}crc#|k>NGbB_6Do zjz&j>bQE1)Sy?%mQPVf^CdCyQPC)$VzxS{iw2k0xXk@(lLdKVjH8-~qoSiPGB>l0m zeknb*zJJW+kgb!WBU4-JwErP5E6XS2lUJmQxpzzDHMMFcritN4X+|J+Nk@jEKBsXA zvBzveK1HR`+B&-%)0vFql7Rqm|QGkyP6-+*M%AxVcqNz`)u;>$REwTomS3w z=5j?N^Q+IE2Xd=dmlv5e-5p~K**E%>OCR09;B%sm_;8Zf0d(y>+2-b^LZKKM8X6fH z>FpiL?-)&ls&B4rMr2>_kuRML3%hXPVu8Lc5sMALxmFA7>K@MUJW+Z1`O(2dYJfW& z?x<~I;^vMfkoNMrrnx*`O-)VH{fWh;r5Iz7D3vYjy8ml-)|nu8$*{bVL8a?%GloKA zPlZT}^4y%@Yy+)l6H^F;RSP$n9Zz) z6_Y||#j`EZ9cRW;Rd@cg5AJXvnje*83+%!Sn%wh!h=J-PlqP1W+;$=J86qVGe5CiA%Y$QKnpDIL4O% zJX(+Ne0#x#cKx5yad7Z-CIzx4Fm@Sl4N)$Sys?1w#l?bgTo$Zf_s!!!%k1p)u+p1^ zonQl_RQH*#=aZ9gFo;j0pUp&Y{(G$vIi#1IJ4?k#VTC}SdCbam1Q0vn}A$to+~TQa`%eB6iBD`dk6_NmvJD5$$#AzKmK zJwA^&U2z(u8_vzo8sOlBS>qCN(xRyWno--{zQ)0<%e)HtFfjuRsRflurzAdd6OfrH z^7Z`WE_uC95O8c4#N3~g{lKfXQ*+x0NMAVJ!?bZ}NPPK1LOUu(?n$A~y?&{q7RCY2 h4Aik<78d4KWP0V+ETZ);YD2V2P5Q4~?KP(MJrkJ*vy2MnB($Td99q^ z+p4b+>b3fHRxF6i1o?O|D3&8y1W!|9naej4x~9 zx8~(OWEzb|fpAu%(G)#VjAp}yY=%@IrPdJUo@+;ib8&=N0gqkFT?CYJBI8-@BUWm4 zpMG;&l=W44Z%a>4k4(PsdUHdh*`5Kk%d5IXN-syEZs9F4=U2xBB3^eHoh?+zVD3-o$DiNR+wncdUMl1@$*xrKE!0Rz<+V!V3-m#bzX-RwWgrH?Rf< z2G|O1O)E*tWst_yZS~jt`6^Drdy=l3qIo5s&j$cNDwP@x#yORGOa#nJ1Wls?0MJZ| z1cc^c%7}o&o9=s5(@KsbSEbC{KvZ@#nkGzOJS5`pQ;>E6qxxCA#U2kVp9mNFDZbKmxUbMz^ z4#xdutzA*SxIY}{Ni!P10|L^qyI>$<;Okxgz3fkeqISz$mN5)E&x?=s9I}wPeLirf zvN$d;d;MU4$s265MQH(r5k=Q`I|Ij4aX75=)stm+kziL;g)gNs_U9cH2NjpV5UsMF zsQ0Wx8#RKhVQTiCwwi9cd+Ed6Ben=sV$=>5H9Za*aM8oB+Z#}nzIvgtfBf_u7#Hk>fR#7S!GYXeC&%t-v{1LIqY_^ zB^vD0=7Rh!8h6nBDC`>P#Nm#s*0hpaW;^4w1}k_DRqm058tNok!B~;YIp`0P&yGMF z+-5>~e|XhTM3X|iR}-Ikj4I_9m<3SFQ!sh*fsuXPOUWKtjdSUZ9z*aEDQ}U)I`_r=j)bKXCvdsOLOf4gMWQJUGDVRn_DOE?*-UbLblo~Jr}+a z7dM8ixZsE$KBa}J^kWXgch{KGib<>k=}r)xTKW*a*4!=yP9Y}DX1;HC^MXzjuiNav z;b`^|n60lfWSHWZL|RdxL5{7D<4MS&v?aTul*b=A#Siin^7B6e8%*Vui-3cBl;f0V a;NRvEJ?y>+uq?tf8j!zFFtXeGC&GW5>w)_K literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/index.html b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mov.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mov.png new file mode 100644 index 0000000000000000000000000000000000000000..e6e384c8024d6c04de12f27d16f4d585b47b0eda GIT binary patch literal 1667 zcmcIj`BTyf9Q~%Uf=3#71U4Q-36`dzskym`ia=(lARdXCNTDezkk@))Zj0rlhFew| zmDivmX}T!VL2I^Znz^1RVTTsxk=3}|LaV-Goi73I;Krqbe=Ce0EaW6M3E09ED zndwhHd{CczcK!3$J-yVw|bPFiAk z{`F%x42#98tFNEZXjq}x^70CM1pL{H(SG&9#^z>@*>?5x^rg-h%!nXgw>@25UFq@U z*wV&k)ySXc__6?hPYm*gacV=wJR%`C1lAi&#>j;;~S4il48D8#^x z-?+)AXpvFvV~b^NeHRJN6B839zX~h5$26J=8s4dz!xA0$={!na`}75i#h$HbLV4{< zfP&0z;ML;W&*$Ek+SydP?z61yRn%47)+w<^*)W5Rjg8_RX74_H#Oy~*PODjL zwxl3EjnBVOoF7GxC@U{7Xn2^G5P@(&hLOn^iHF(DxG(GL3kwTvzsvU{;WZg&A5ucl zhwZ2Ycjd%_o7-XC(o)bd7dn;N_Z?r0hqhn&`7MJt#@-La0 zlJWTP0JoaDhMuV1quMIP*!474rl^5qYG?_EpN@-sR8i{gg65ioF&GDF5kJ4_2{$>+5$P~G zsm6O_uHNq#_Rbo2$J4grI?D?S`R>mDFu?zy`QIgzP}sb!KOt$vC@ugPL%(C&%enl2 zwvKkZz(`&=hsDc`&qxH0#V2HNQWBZ$czXgnBQcYck<7LC>OAu@YpcgxQh*=Tt1JP$ z8`z2aLsxsgiim@NKl+Ic8y+!=itj2EK2U?6TymA4R@8nsVae^9z)3bsHIKaGolVf* zQTtdumqk5_L9;Y0lOQ7s44Lg`A8HE@`8JJEr_R(B z1wMw}e%Tx>3>MCR_Hc*wCD|K^%4c2q4U69d0>Rg%N&QdNt`;EkeOYvkJd{p%1R3xt zoQTI3xS{teQh^?W2|7Y1i_O~&OQ7ZBZ&p@pA;wLTDjcY}V?5$?TlAi8rFGcrFB;`&XE<;d-83_&+J%@g(X(mf%*s`0gC>FXZE;M|z6;*^CfEPoZp$l2 zm(pOlUL#N}r=_W{R%fSfr)&#jeg!Op!RS~0fZ;++y9KflX@RC< zu6?^9i-?edigpJD4=1Ik1uqj0KF-ro4-Fa{n@Zhf9k+bv3f%MgW(O*5awN#?+`6~& zT#!K*=fJ*wY8M%=3>s9WI8tee1E}|*mG4AQXqLA`l_Sy`sVpRvLPf46|Uiv^7W0Q^dU?817>;8s!rQea4c6n|3i EFJgvZMF0Q* literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mp3.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mp3.png new file mode 100644 index 0000000000000000000000000000000000000000..c09dd0d7c5fc167c41aac3a6b2ccef3465524aed GIT binary patch literal 1879 zcmV-d2dMaoP)9mhZC-a9jQlGuz=Vk;`F7)?8t zVok&il`br7Wofp=hZa+z54BHyh*HIOrR1#zA!3U!B3oK0v`A{Vp^Mho5L1=iXd-KC zVvOENCx12>b7$_%J@=eGOlETD&cvlp{lQ_*Idks$et+NJ@BGdYT5JBFW`zg6y}i5o z`}@CVnx@cN3!qU0Kx-|85JD*hfNdFQrBGUFr8J;XN}-h2XpKhG($W&UaPb#^9{S5i zQzaPpwAL7gK@dnDy;x*9FA+k30I|Wf3?u}$o#3O7 z@BCc|@tdFh;Mni>?)r){!i$WuVHh>jHGq|-ltODw%z#I;3k-esn&(BEPd+zz;U${#{*eiIUWoHx5r+T$n%4BUzq7V=&xe1!^YDjtA+RjV2z$Ai_mz1e1WE;DT^}Ra z%+KF#=l2gC_O~_T`HGc7iMPJo48p*+1b_YXIbLp=ZA~%mJ)HU)KYG88fEfmhhM{3t z6c~V(J~N9hUAw=;^Tjn%O>yFeW-5~-88i9%S6j)iE+c&jTA>3!s8hf&46~v34Z^TK zLI?xDR3e{qx%V%JtxYkOUKf}L{`qVk(0uosZ!wcupyYYTl7}!%3SQA@NFbbmUrYpu z2~xHo|M>z#qYLODz!ZSiNTsk$gAa%QgAgEPd7NF$^4{CunyDjD3BmtjMPG4f?@rvj z$E)Qv3?TpwLcn^SK=~AyritTZKHIfB_3L*IrGMKm(^5dWUlusT{Au)KJ_gE_w zd7byFtyC%@wb5GRba-G{mKokWEMF8jJZG9Fj~_qg{{8!0yLN5U9MW22Syrv;5dt-T zMm>!JSDIy6+`W630|yRp^X5&4hlgotX=$jMX__@E*AOsGvxYz;6`~|8%VKG1iP_m% z78VxpeV?mWuj0DyMm~i0dLw~K9f*Q8@}y$T&CQIBjj^(_g6q1ZQYjuhc)-xm5VmdC zt&i54Is%)?9`0A}3(K<5S~EF0$FVmDr>BS3)>f`uxx(V&V$CU7zq~dl5FIy? zKWvs|;W!RcQ&UJO>FDU7r>6(owwa!uW^{D4P6g96Yn_fLU_=4KztJ*bSr#)hGfYfO zkV>WK?(SyCjvd6~aSX#?VqyZzvZ4yUS%J-xE=020gb<96kK=hBsZ@%C2M;2ptP+hL z$MrpHq>M@~8hlXoHjzkR+ct?r0?V?HQgY|c9SVg4hYug7rKN?Dkr5on!Sg)Q>2#Gu z$e9`iYL1=O+Ngkr**7;gv%0#gBT3VvDwUu-_&E(`H^YioMayfc>dboG*9v3cL z;KhpoTpWsfme+39eti&g|?g#bS|MF2|80NANt4Y&OgO z{rlOoXAfu3o@IJ^8r!zHc<~}_ZEd)&yK!%ny{y5gD?DNOlgT7co;+b-V1TV#x3X{F zKJxiIxm=FX(NX5+=2%%-;n=Zb?A*DN&dyHe=H@tm{yZOi@B#UJenVXZS_`yha{^jx z(=d#hm(PtGH;_`2OeS$0hn1BT9LHgGb+vpGnkHRcUBqHBPMV4=rN3KFxPC^vW2d$E}lJmMmC$p^StVlTuO=Sy7cw+RZDW^TM*@# z14?Q9z$XYK2|JDuys;A2oKdYceSLi#I&_GaFJBS_0ZJ)~#UhzZhTh&@jvqfxsZ@%T zYXQ0pE~Sr>K6WBOB9Xv#-Qt@Rh=*%Yu~=mL_U&B0e3=s`PEab9SXx@5SS)ht)F}oB z2eEA%DdmReTA;Kh(3(J&2!a4RnIw^j190ostxOm*nuJ!k5LFUt_wLqx zWN2$^WAEO*n5IdgP^iiDYKZ)@?8&4}JQkz!3>Y6DfAl5-vG9AL5?9~%F-?>9_IBFa z+W`oI04XK0SgZ`bE_omVv{o2~pt*Squ@Ly}+qWmi#>W1(DS@V@rex)n6DCn1BBiXG zSE}r>F9ZCNk5??<74n#-rCiqxd|%3ig@u)ok&&^1fq`G1J9ln22!bl9{{sB2mh)l= RzTW@<002ovPDHLkV1giKfgS(= literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mp4.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/mp4.png new file mode 100644 index 0000000000000000000000000000000000000000..8e286baa2dd2b20c864bc4dcd53c09a0ab368998 GIT binary patch literal 1705 zcmcIk`#aMM82@4u%Qd0lEO(pJT$-}tbk^FK70nRx(1d9&?Z)BgVjFUuMlK;9oo6HD za+Hl+S}xr!3mrInFtqle7MX^E|!J^Land^ZxL8p7;5D-Zz)z=dBAdg8%@a z>qEeiRc!ecS{ka36XxAlkp>&<6R4%7HKja03jpdjNyh^5T1F-{4}MRm?qR2<;(dIm z`Wh2=`$Xpw*48)dkjS3i-m63(3c+D%aWSr>)g7WOYHn4|E!2pIZ1-8v5YWK%$}~od zF9t!SQiUSXq(UJO6jA+AmS)iGTcd-M^P5{+51&3u)7N_`pC}(xX658YpYT59Y9|(p znUTatKP9)}j=1l0#2>-JtgYL#(%N1u#|5AY>}?~ofw^0^40Uu)+nPPDDr3i=4hjkF zcrcdlg}mDNn@lECC}crc#|k>NGbB_6Do zjz&j>bQE1)Sy?%mQPVf^CdCyQPC)$VzxS{iw2k0xXk@(lLdKVjH8-~qoSiPGB>l0m zeknb*zJJW+kgb!WBU4-JwErP5E6XS2lUJmQxpzzDHMMFcritN4X+|J+Nk@jEKBsXA zvBzveK1HR`+B&-%)0vFql7Rqm|QGkyP6-+*M%AxVcqNz`)u;>$REwTomS3w z=5j?N^Q+IE2Xd=dmlv5e-5p~K**E%>OCR09;B%sm_;8Zf0d(y>+2-b^LZKKM8X6fH z>FpiL?-)&ls&B4rMr2>_kuRML3%hXPVu8Lc5sMALxmFA7>K@MUJW+Z1`O(2dYJfW& z?x<~I;^vMfkoNMrrnx*`O-)VH{fWh;r5Iz7D3vYjy8ml-)|nu8$*{bVL8a?%GloKA zPlZT}^4y%@Yy+)l6H^F;RSP$n9Zz) z6_Y||#j`EZ9cRW;Rd@cg5AJXvnje*83+%!Sn%wh!h=J-PlqP1W+;$=J86qVGe5CiA%Y$QKnpDIL4O% zJX(+Ne0#x#cKx5yad7Z-CIzx4Fm@Sl4N)$Sys?1w#l?bgTo$Zf_s!!!%k1p)u+p1^ zonQl_RQH*#=aZ9gFo;j0pUp&Y{(G$vIi#1IJ4?k#VTC}SdCbam1Q0vn}A$to+~TQa`%eB6iBD`dk6_NmvJD5$$#AzKmK zJwA^&U2z(u8_vzo8sOlBS>qCN(xRyWno--{zQ)0<%e)HtFfjuRsRflurzAdd6OfrH z^7Z`WE_uC95O8c4#N3~g{lKfXQ*+x0NMAVJ!?bZ}NPPK1LOUu(?n$A~y?&{q7RCY2 h4Aik<78d4KW!nKSb9yn^h8(N*;bFGhpBG0)~${byEKkyoJB2(M2VK5h)}drYe|(z zLc}eiDUp)Ik%*(>NF;)Wbw#T!QEIdQ!_K~$_ukC+%bPdzz6@7qTOF;#S^xk*$KKA$ zP2~pv61Y>PRs;-3WjkS(_8=e-D3ZBM0suQsy50s^XBOOHN~8-`1t+Dc&t$>bDo;_ssIQ7k2o!C)j- zu%ikaX*3#_H<`ka7O^MuOOwo9uncDJ%IA%hl~4Sb3;b4U45beoS<{x`yD&eGOl{!t zcs&UgITa0#3c%Kp%_Pksad-na@0vBz!wYdQ$`_^>yqe;xQwKbtc zm_!rfGhyg-yr6^j*Xus9Y|5A7&m0ivl~olG2mK;mtSXj9#-yWBhQ0jp09-S&EVi?U zT}I~&$C+@Y%MIPamegMo%9;6XBW?l3Q3M}R%<1r|WNO#g_V#u!f7laU{N>~4jG_u0 zYl6TOY;LT}<#LG%LZN`$ilT`q)H;b=L1%E{Nb$+dqwR&rnwlCcC5tyWon7#nGa_ph zO2o0}`{2f}DtL{(qJsJYR3?2W;VPz@)z&FeC=`K}0oW$t{KA4zJh`+WpGKSsAp4<8 znuDL!!g16_+8b=!L|=kQNPc}ghczRc8IUc)sKSnTi+iLQF%*t+Y-|#4|xSHD3G(P`{(c1B}@O9_tOzY_18Ydw|s{J&>-JIQ3 zP5(at{ocy8Dkr9Cb zq5cLoq0xcJ$mlSbfmu_?V65tAZrfYk0-0r{K2y36-8_&8{@^ftcTXcGo$Ua6<5eZB zgb-pf&3$9v+*}va6OHUkjlk%XpKMK6j&9U8bg_dR4Q%XY8?U6{ioTjHBKAlR!Cr(S)JpwJ zRylJUJ#|;5tr9K;cHCCuTsZKB%`E7~`s&!i5-%UTj$lahkhw`8wG7mT&QoogRu>53h>~14Wgo*p)kohC$cp7bEKyyX?RLW^B2QD$< zi0*~WgEmLQ$_m~#XSiTuklcIwJh|TWMthZEF583iQ1E$u3&`iiuABQ;(;jT&O}4hq z?b8}IUUYTRR>K((0tFr(J`V_8AdlLN zxBLxqWo328hwv-lp;?|QK+04a>iQ-qg_5?f6As7qrS|S-p88of$>6mpOIsNv$Gv?D zL6$9M13E|YFJGJkU(nRMPiBaS8YB&@w$q8lle7RLBOMlpd1Z*7RgF0P_I@=>V;=zDWSiDuB(GvdjV7%-LJWOW69m{>J6ly- HLeT#JXAN@V literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/odd.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/odd.png new file mode 100644 index 0000000000000000000000000000000000000000..b2881e0cc11b0765aa9e7996e45a6fad97b2f2c3 GIT binary patch literal 1689 zcmdT@`BTyf9Q}H2ggM>ErnPLFZKamx=8@$JX)>Z?=BsZl;)SV{IxKjoJpsMW?X!&PNfsR=wQW#1+md#4IJ^z$4|6w z#zbW$o5#t?%sPMhUKa!B<>{qRDQ{fQl1L=WON;fdtQu&PlM#dpVrNZ<==Sx*F_jCt zvh}@c-ob9)({_R25g{PZx}v|9&1T1^p**$ahjt0bt$)w7 z+qZjEAV{mY{U|$UK%x0KGo#gN!|_dL(9{7&E9|htGw$0b&$&4-yK)(lH*L)<7K@yf zaVZp;5Emtznl56n(;mLz;PFMgs-C(!jW*!RoJL+-TTxyllSnGqx zu@5j*Dz$f9J)cS zoa_gO-i?kc7IpA!Qu9uGOC*lKfiW6{V)c z6jDk=HSpt5%3!07)y~wMrZ+v({t+I&ZB(b#swSj5olYPUN@U8}kLpJ8hy2{klRiF! zcznBLn$@Wa?mG;ICvPq3#h(&Af)fMLmlBi1 zFp+>?*hLH)6&Vp7200duiA+XgViF)ujLX9*`YmUAyF(F9c^Ajr0b8IUJo~KWfjBJo z6p+sIvo!(V&xZ&>Klqsv2m~7&0Wu^cN!z)>_ztnh4f6Csc03cM`GoRZ%~P+Ab`JuI z%nS_)N7L7?H%iu&JD$+M5IgR#%!7uSd`Ti#1*ayQhk6YEnPd$25h zt1G@5YURzhI>aAlI#L008yUThybY!o_&a}3@^@PEAM(C99i<{a*IFU`TYjDF#Z-X^g*VzN$-FtBw z^r|3PV}H+DQpZ|+F%+C`XL@|pubAiorpdNhxNv|~K0ZFaj_9DcVxvPsyDc><07XjA U{P~IM7y9l3-X8w$6j&(kUpCd?761SM literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/odt.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/odt.png new file mode 100644 index 0000000000000000000000000000000000000000..180d59522837cbb44955492f64d8dc56a846df62 GIT binary patch literal 1278 zcmc&y`7_%I9Q_8XX%(H8o!RaVnU0oryWP_5*6z|FuISbkx-C_us;(*}2z8aEZc1oL zrA;XklCTlh5yX8Y-$W2s5^<%DI1)6vl#O5aAJ{kZK5ypDy!pJD&nL~%-bVe{>0*5dc8&jyGMbezeIPFz=l5pVGMP;3U&S11Hns_*ba7^cBXKD>RC0r(M_MM0v$VREUH)pg z8cisPl5K7ebGhw(BEdK(nZQ_Bl3=@ppg{Z}hddPi6N&sG`fUS_%AgO=_JN{yaEMtE zx4QE2{^LTSP*_omjl`5!4+!h)>ks7ewdF;@tQgZclwVB2zm3SDlykcpl51FPSakEa zL@t-Fudip)c%8ngv=(-Jc5~Mdb8G~xsLVxSsWD}3r5!vF6tYG}Cnv^5Gh)`X#MCYU zi>ruAD#ej1?>()3gu?N7yt&zFx%@x@nQV(EmiGwP8KZMp#zfyRyK}HV5JPL_jHVYf z(|BTL^c4z)(l<5}l24?8!U?o-sp57SD5SmfVgCOC@ZYsH&zKh#wT^}$T*ClB?c^aL zTtVEP!qi1s-9b4AKSD)%h57(?Uf!X>K|T-ty_)y4RgyPioy-mrxkI=bA9x}KnN|Fp$`roK0w*aaZc zW#?H)Q@062;ghX~SG&Da&w7a(x!e~}X{?|6)ni#5vH|`8owYEic2v~(_xd0{IJv(= zB3W6gT`J(DpBYSiC>%4EhM(a*)ZYKUlL$;>`eZqFfIR&qO}cr$5?9>Uh8xL5@K!Qq<$9OnPGX(>?!Gl zXy?lllG^L}OWv3<6|c<8|JZ~FUt>Rt)vsH8o;SIl$N#XWe9g&v*RSiGRPktlt(Cnc I8Sa_*FH))Xb^rhX literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/ogg.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/ogg.png new file mode 100644 index 0000000000000000000000000000000000000000..8b6e7022b880061ee44734fa9536ce609977ddae GIT binary patch literal 1884 zcmV-i2c!6jP)_P|Nh^1zH@}un*XQC@Sv}+Z|A_k z!1qnl6k2NmG-?27t%VRmD5U_frGZuorIl7n0~)0iN@+{pXtybuDV0y2(A^E>Zw z^4q(3@Z}rc-PVd7GniX)`Nr3p+18ri%dCT`JYLK#vZX1;gGZC^@{^A+A_UAZSTqa` zo6;D7B@{2`SNI~mNZe4w4bAN0GL``aw?t}jg%;tl@+Qm5n=Cr;f^`ZQhG90;zCjpP zM+jlymCMY|y&=Cf!4JQ=jX#e)ClQytxAW`d@_7JuCnXP`%~CF|APkeDTQV9F2q)lI z69Hm^q%A1Cndgsp=g~ocDFChcY~l-~X`nR-0lu%0ra@*Q!-wyG>*YEE)e!tIR`L`F z_w2waxXdoDU7LV zDJ;vXE~xHVTQ6jsyPw?t(+A)C@YglW$fjSZfDobvUbR>(Mrtm@Pk;7vK7TTakHK=m zWu;hRx!~4Xxm?EAMr)nZ;enLW3~wHmFA5xN1%}kQ4&&0ve_)t z)6>k)&*OO>SFc{hah$b$2<`P&0@XSY1#9F<)tZ}|866!Zm&@Te4#{MahYufe^X5%# z+g`UmT5Hx3*huzpzj|LtDbZRpF)_jO=g;Zx?xwf5m)6!+u3Wjo!oot`DOkO{HYN}q zH4*YG6fpc7EfZ2oUcP+E z`1m-0sN|x-2Q_ak%fhy8EXzVliSPT|yLXRbvB;rAhiGYOVR(3$R4Rq*x^#AS z)<}e$sZ*ft*lDeeDrlH}b8|CGOH0ho&XUb$X>Dz#v$K$&=Iq(COifK;+cp<3UZkz94aafT?v09Wb@|D z?A^PULZLuDpJ!xbgqfKca=9Ewj~->mjvaJ$bulwD!};^)Id<$Ag+gIXT?ASSv}R)h zT5HoVjJlW5jT<-ceV;@kK`NCZm&=h#rC3^8s@#O8Nq2WQu~>}Lr%y95Fo12_lu9L( zQmf&tc(2s@#Ef3Yv1;EmP4f9XQ&Uq&Dam9qEG{mRN~Ks?SwU-!>$+^&vW1?W9(>=g z0TzqJnu@DlqqGJ*lnORhKnNit7YB~xkV>VnEQ?GgL!nSWYfTUYxUNfAR~H=}9hA%E znrdr`3iRq+5cmjPc^%a`9U%}~W3Jh>X%pSu-Mo15f=niZ>$J&pmL)f;B@B3?>Yk|_5Kx+cOOb`Uvi3FAv2jI?~JLxcHGzn$65LFXu*REY$x^#&% zXU>pLr)g_zW6z#Fn5IdwSggzRT8O-g?1_X;JQkz+3>X_5d;B&6vG9AL8duNrFin&8 z_IBFa+W`oI0N?kC#bOokRmlSpptZs<1kKHxh=suK-n~0MIy(A~4GAY# zQ%PCzNJjeWx!EPkGoeDaZZExfw^W_fO2-p1FNOdA6O1KIW6oN%OO zQoxLhQI_WGAJqub-G9IGqeRku~p5}VlmiQztG+y z)~v1Y$Mv9;F}Wbkj@1p*_5C!qOed#NxM4v<$bfzyugT(kd0~3@ggmOM6-(~p=Vxem zJW#JUjxx29sYU=GG35jrUshc@o|z2R6Zr{f=}p{3dVJ4bShq+oe@u6@ytN)5fr_-; z^RobaR_gx=HGlVE(z2gzen<=s0PNwPXf?f9vSTs#8-)Jtty@ z?vsH%6Msv1% zyqQY|qP~Y!+>x6JZ(?T1G^Imsh@%ydYDa0)6 zcYA|)ue_8)x1foI$5VunXm4@6t5ed68)-)2$5;IORBFojuh$ufI`_E}^A*R37_X_h z3O;-kJhk=hp3}YGL=+{!ajGXZ_#+ literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/ppt.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/ppt.png new file mode 100644 index 0000000000000000000000000000000000000000..b68d86f790edbdf8ff0f047e9a8152077563e8ba GIT binary patch literal 1275 zcmchV`A^da7{Am={vKNG4Fj!4Z%~SDPQN5y3rfsejDTcJ~*H*ysDHIBY$K#_p-ASx^2!aHvS=OT` z#XW!O_4?U`b8 z?reR~>2zAHc5iQQXmC&^@1YxT6Oa~y8X6n4^EwcOboxEj#KP*|i}O>nSb7a2z5;~w zO7<&p=b%6ez5$_XF1Je9jQjanZfz&8W4eU)vZK4NwXwTb(Hq04XzYg~7kV5Fh2~NM zk!S$MugXA~|SkuR1zCpVWNVe?R!doNE!pD#28&&oL>*JCD+Fp7_LM&$Z z^Adkbrk#b+;@h*Q<$WfMqv~U1GF=pq42~RR(fJ!ZwIp0U7Ork4ItQa%Jdgi!GNf{r zba6FY->*Xwzs%X`J#<-pnHd$-mgjWV#1%EYsa6TEjxy32lcFAPxpl)6+`*3yo1QaA z_jew<0v95zT1%xaKX~O-?~Cj_qBzvlch{1=fLCF>IVEF!w(5 z;47~U6XwSdL3MS~sqfikY3v>ShwB1peh#(vOFI8axYYHqCKkjoL=P$wG` zi=Yhbk!`P-$dRpxXkEk!kyQkY8x#KsnksBzUGh6&k3I#=h;4)`w?7Q87w;zgM5pT} z^&3uU$J?{Knpbh5b6xV?wl?c$u9GTUf_ZSOyJzC^JiBJ~;ZC*^b|+6Nl{}|jczxF# z`?1y|(BZT7Qb&Hn_4Zde8q<>(2#$(Zf)&cs>JbvBc5jISKi`OT!PP!XtAVTlV2#DyS`({r96|t69-mIJ5oN~#m^LByzxOD&NLxxWR{C$x=LT?=PUy1VfeExdmyhPlVN~mdXdeBoFyR0G`7j>dhZEDk~ zLZfRbz0`CsKrg*t^HeD2RK^n<4TBFyxalH|(X6Gvni=YALN2{sq;PwICq(jdExS0P zjg|5b0@X68*IL1Q~JceWR=Rn!(Xc1xvFolZ9@%wb^90u|TB*oZVTaJ!lhFQktRbQlbV zF`Z#bPBSXY>tuRr?rHNZb461vZ!Kz(j+@P9CLwBE*2pUf<1;dWqChb{aiO2^tP!JB zDyaf_3yZ9so1m@01g($%4)5&j zY-_20spJYM@VBN#bvuS%nILbz-NMKPmRw-eQ z%zvPDPsy2ZO7AQnQAz{?-B2BK;I-OdE)xzfPgT}fcBUB#3ktPF^gjUfKY0FUxjpV= zhGl%)KTn0HfIxPezR*gc%3QHDzeW08M1~^%K&D0~$ASW*;mL@k*qDT9mlFxev8jmU z#1t1O5U)tH+{j^nU!QYOeDUBdgd)TdZT!n)2b382lMw^uDilbI##W!lFUQ~RJ5U#Gqdf#z%wl}QQ zu9=~r1d(mC!m-JeghS@IUgN>O7sd~$pWXUzp4u#FKAJy5+UCULry>_8Cuf?Rr9rs! zG#J8t%!i{|bT!p)+~>Gq`{gotB;JS5x(bZD7f9=@_Ke=E-}fO5 zlCz89Rd0Gja6&GVJiTp&I~)GVqJBEu1VQ0YL05&MFb}-j5$JADz#4>ZtQstK4gSW5 zW6~dZYMtjE=cK!GcHQv2jZKo9Cw_A=`pOx6&Nd^REa%y~FB{m_4;g15d$aBX*MD~k z%0}8Qm!f9_GtU2#e(}7{e`&tX3A{-3J&&i#-vCq zO|(0{CbVPDHLJfYLraqA{f1=^`r$|f2aX_$`< c!!Y%#T~)B}4>5bpUp_L(-!I6w{&*DTUpq5uIRF3v literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/rtf.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/rtf.png new file mode 100644 index 0000000000000000000000000000000000000000..598fe16df09b0878c26f0caba688a17d0157681f GIT binary patch literal 1135 zcmb`FeK6Yx9L9gCbuurVc|GnFv-Mil-q7x})d>v~Z#A+hb}cgRlVpid_0nFjU6FbT zDe+S6M9`*QR{y?gHaI4JOILp>`! z000aTKJZ{|+rBeYN1O2ae6F^1@SX@H6bhC7etQ`JAYnoNNH3os;WG;}96l?qj$6_A zlobuA)SE41LUKv$Bt1(e7~R?3k0v!u{;@qUFfb&T`IcB)+{%4k7~Rs+B41GoMwlE9 zhc=}=IXS7M5{FXH7qyHjmCB;lhG(54YPFhOlPDHT(3DmbF}ka(3*?WmWSa`vJg>mN zZCV8i#NzS3^hVD5_Ca~SB(I76Vo12A+L)V{)5$0i!9}4|-X$}eICI0Gi1~_2VhZ`M zNqgH{l4(wAO&7SdvAnfc-3JP$!6Z5;nw5p+)RdMGSXB>t#(Fdw&BENgLZR4t`$nXY zFG|6uy~4Dz1}eR@u{OPZd}cIOSHj4YD0kR1E0dFxQmIs@)%AXAd09AWlCEA_DDldyY?ZV>bqKjRwT%m3@@phD+-D>O;wj zh3{SKxTLCcJ_g zUUmN`bhO;`#@HIq()DOJo<`3@$OyIg5D)Z~g+eRSgxD|r5WZ_3W5V zzu$l>uh#WiR67umSgurcGQuO1Hh9o`u~&4Ntq^wBM+KcH$q2S9iQ!e4tv68{5b{E$Kb literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/svg.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/svg.png new file mode 100644 index 0000000000000000000000000000000000000000..524a08e60cc6fbb1369dba43514bb0011c53eaa6 GIT binary patch literal 1198 zcmb_a{ZrBh9R8A;;`^N4nOD=!EZa+U=}k9RO^1b^`F@q#e2X-#7zH@A87h2lm3xMD;W)aQcOe7?)DbqC0Q&M(z|-fI>**E%R^G7R5n-26g+C3 z;&QoySfqo2 zU*C-sCXoem9UUD>TpTu^*u@j3lUWsA;t!abA@d|nL-YKR@zv$Uax$GzMJ%SWJBPW` zN)1OmtI=rWGMQ8?eoU8Syq*uoRib;+R(0C~(L@e?IHi$a#;HxBFvu;P8LWJG2R4P! z0((L#?vyU9=!ku@wM}j8X$`Wt0VPCXYu_}ty`}MIQYpM@CO0axhQ=F>hL?V+-{@C# zNIzkWh$dm3BgKd50%xrMi1cq4zUiugrSJ;mTBvbRZ;Sj&o1RxB0d6xd}=k@IZP#kN*;ZWxeh(@E!Y}hbA$cD7v)0(A@w55 zhc1%STM^{=-8r&d6%WT%X<%wje(3oLW*!>zRw5BhZ; z%U-s{wjNE##xDAN?h+kR-B>~iG2*$1z3jDX0(HB2;mX%}iGbJsRpYpwL>qI{>ZtF3 zT2nLNyIDa?pI8HU*IsS(d1vc5NbOPC7parcc07~dE*+1S^ ixvt7`kV8S*k6J4bf3Jau(CI%20DOG{AkE&H8C?IBvMF4i&WIq)C|j` z5<%sVMBTUw3)DCa5s(5e#A`*o!a+;j++6x2c4ptq_r96$r}w`3-YWT z*n)xs&X^ha1=j1#J)pi&Y^HT6KM=&)+Iny_Yy<$XZW0NXd8;C$ zrDrnr=FUc`P9&GtQCS|K{Qj}?7as}8_4Ugijc0KrP{=RM+`UEo@?KpAh1+o_7mK)b z@tt<8N%}manx!L?{gdzCX7!Ga>!ot&@~73rhs}nW8G)c9>=Y;%O7CuINkO5znat%i zP)ZUEo=TdS&h+r`h`Lgws;q2$2IFuz8l@6P=E<~^56g;0>fz?*ry;?|_>YNG^PL!6 zZNZDayLd7NlS2~gpwP<_iDY&8IYa(b>fd(NSX~!-xD2*9_2y zr{+@`N@x-7!JkzmCjZ{c0n_55R5^Ykz=zL!QAB1_gpFe}m*6)lWir{^tN}ysQmfT& zZmz{S*-tv^*n(5^aTd1tWtTEnL?&NE(^!1%aq!KL3oFY@tJg7CB^`+OAH(5AjDJ>_ z$$Z6ic-*4NIG~&K_wmFLvQWgAuX=_c=Ydt6H?E$pnRKzyxXA6~@w+v>k4S3$f~Z?u zP{t~*ZSnHi76Cp{Qr*=gVJ*$!vWUcn zxHRrtt(w)*RaRIW342soK};$@=yW>0UO&iqy1KHeP^ue+@9KDO?qSp6@HlKbYM@VE zEu(y1gYX4{7Osrdt&_eH2m1N#b9bXL1RUv$_?U>qbgHto6-&%zswR-6cFpiact}8I zeqCk>SHxiCSL7y9I)zG&(P-4^b@wT34u_|Er>+}n!m%|PopF#rKvlNvPuPkO16cTy6S*E2DN6qfqO?5qs`3gi(>9bl&TNJS+lnrAs1b%XqN#mfdMrN6o>WMxO}%PYmyATjUxLK~ zkHeDVQ<2GV6wr%(MU`g0e0 zylgA`mg%-=S~d}w?_lkqp7T~^2nUur@3*yK35YAZTr7RFWIke4qis>jdvTH4*~P}8 zo!FMTX-7uLB>n36!J42x2RE%${`_h?-6Ta&CTuLiJ%M}rJm(7Q@7Gw~zMxA29fc)@ zSQQqAbwG(2;%@^emL21{Jml2 z*jw9EHZ^npXMlr4yTe{YjN{cun!(Y4g*z1M2}hwnbg zI7pXXm%=cDrT^*U}&t+G(E+4{Cr3-Z3CXyh`}`PF1ER zMdqLUdKdAVdcAu!68dR>kNK%*HKbe!x5ryz!V(%bCL{#i=#TIUT#SEThDZ$X@cnGR zP@9IUg7+m?49|91S`f2CcUo1SeyN}~Z?TW!N8wsGJKH+skncodFbeQVVbu4F?A+X3 zaIKT-nAL{;Rtx$Y^RBHt-4xBjf`*nHd7j;0ZPrp`Uk!L|-iS^)-tMvQ5EYl>`}@+| i;~g^_7xC+Y?E$nMGmqQPI!&8X3IGL$1~mCWv;PH~ECpcz literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/tar.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/tar.png new file mode 100644 index 0000000000000000000000000000000000000000..24100ed66226a7491ceb13e2f76d3b0da5962132 GIT binary patch literal 1428 zcmd5*`&ZHj9Q`h{X-2ixF|E#Y9$Wp;+|HR=XWCLHnmV6oDz%fPmZlB`mQD*ZLyw?l zg2SOG3O*7M6EQ>{3d1Mh6A~W?L7=rnoR6|5qyJz(?sLxl+;i?P_x^BiNkmv6X#es3 z004l3F8N1U*!d%DtSsN3iW#(!6~Zql+Q!CaUK6ecfIa&oeu@THqk`2UG$g;4F*q~Q znb+A^IM9%wS4nkKt#=#xrY9wGA&y)UFJhMU_Vy-WsZvpUdduW!YqDuo|89{qI5;@7 zWaz2B+EpIh!sZj}OGRvQ0hOzkQ89G!^WNNTqnIf}E!Oj(n1VY}^Wl2SUS7kpPt%?oud|u++uPf-{D-A{bqgkvRhO<% zD3sl>MZ+7DqK1MFF&pR~mKvdj^)l{bIxc}jh|#@S?`uIRCkK>5%$)Qol_z684iz<} zy_vxM`Lr+_-+Zl#UB#d6=_IkGb0QW&Mo-_~Se5eY^ut)=D-HUYf+IKVsz^h0#HfJ! zQqfC$6kpp+6!bLCO^H-SBdy%By8@I*Hva7=@V5Q>a*Cg?^?@ zMo-*WUlsFs2?T-0xZ`k@F0_=S0~r+tu~`2<4)`xI(%iSEEy-;&FU2DO!0z*p_+)Ak z^}!-KA;ED-2<#>@`#L-s2)&*Nhh-!urCxUqNQEb7!{BKM=ku(TsT|85yo3CGqtBOB zO}~RpMF9O-#MCUccf$EYcpH1`Hc#A>6H&E>M2eq2DJQ|?=Ya6d3dn@e_K72oKRGev zz#$L1?_Au;ow%`8Xu>t8E}vs?`LRE*I3dkW_j3gD+s0?}nqJ1~!+XCZ*+05)M7lIo zbnRfcdktaLbbIZuft|C_$m#HJ1Sj&`ooX%~_4-?@JLXXx8kNi26&=B?yp_Gz981*9 z4y|>#QmnyKwpk~$lZ}jXBUV9a*St}0)my>ms;}tMD{pVg-skdU-%2*zMGG-zDhg!E z@pc@MMh>UAAFM9$lwPr2Zf(Cz17Tbcb9q3(&l9zR=uMI#$J&D`QRpfWzFGQH+XTq#MQ7LG~P=#mzOt9nnzwNDv9% z^?93~V}d{f%ILVY3&B5NSfvmBFmG4|9+ z={vTU-HT{)_2~w`h6)OT?e!{KShO$+$_XJaKk?g8oC(uT2H>^oOizz9@d5kXTx=@G z`|MD}=B%hYKZ05_XeFhAN8z`aW3Da-V}B*eeH`L<+}(WrloL1hJ+6R8be#o#l{D}& zRI6PdwB6b}do$401xE0Q8=+WFUvQE=i-nYT&?>qqZmrl;_nEIx+uL9Mo+SIskqcGc z0(=gr@6{E58gO_o*wOze_^`tvTVQzXYtIO4NHo5Wysfp)kIdh-!Wr{7^Vd>0EtLa; Mz+wI!ehCl$1v_(HhX4Qo literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/tgz.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/tgz.png new file mode 100644 index 0000000000000000000000000000000000000000..b27057998e79fb31410551d4e9ada3ef6ee91fda GIT binary patch literal 1423 zcmb_b{WsGK9R5EDWxyl=n3@Nk3-Kz;@SWsmU%XGO;SauP z{JW8iepMBzR*0viwMkXHfw#RfelaOGjL*b%cXx~V^(~FW9M(urZOqbw8c{&h%ZWpi zvn^#;n+kljzg>^JN>QXE!Iv%uQjlF+_sq}FHofhby+jEfhu za8X4J&HKUlM|B_`CZI*PSA{ki6+(Gq{NHH%>6?zy$@&Xm?f5GU?cOT%pEB-H7k3wZB5#`{00~wQoK*Ez8+`#M7yT(2o^MQJX zxZz3$^ayF>PaTOGlOB7gB!BmP1;~rT=W?yFJ?^&$#YJ-uQ|;vVEQ{K^uUrd%IEwdP zbF|3cZLKZSpIBSDH&^sw>-+s1RauBiUA0YXZf5^RCh$v$Q%O5k1qy;wsbx_wOz9VQxVyq8z5cdgd^0f@6ox`ktB0HWEYQ*4uXdd-?rs95keW=I*^`X zY2h4izIkzK^HCG_sGaruJ7HNnD(z4=T{R+6BH@EM##K{q57<_O|9RZSMSc@3h+Ira zYp?|l0w?pKlU~vz;wEo1k@U#UEa?6Hq%BU5;=R@nSCYQML41J0)Fi{xrY_d&H)GlW NA1{CCi&K#g{sT*fTUG!7 literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/wma.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/wma.png new file mode 100644 index 0000000000000000000000000000000000000000..e6f72d968e3f1aa6e059bc5a359424e2e7a56460 GIT binary patch literal 965 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy%*9TgAsieWw;%dHU|?Vr4DbnY z1q$!D{o<{YOZM#9)4zOsT3VW!}mgJbQNU*@y3EuibtB{{8>||0l25Hf`;mDSPj& zI(VUa>%D9DpYFZ>{K)xh#cQuE-+5&Hh3A=b_g5}IoIGXi*<&x8fq@cT666;Q)JQeJ zfNIj()%$h>t>G;2h%9Dc;1&X5#!GkW{s0B#OI#yLg7ec#$`gxH8GI9yi}G_*Q!*13 z+%k(&%kzt}ixn)kW?ZTO#^Fv+7sn8b-qy>!#gh#r*bC-dSvbRPXWyFSS-qT6Gnbz2 zIuP~x%DTMp$}i8J{rvQIe+Q?2wzuWq`-KHR|5tb)IPm{SfHd#>%YiG)UM&c2G>PZm z`y*!Q|F7PxOLVm7-aJ~fK_W($Pt3agzWtp%=BmvVAD&!~uKAp_aZdfOoqVVM{XKi` zQ=X;0-M-%yw{3UaVcYWi_ucu|*Zcia|J(fT>t?YJKmPnlocp{#iec}a%QJn{?tiOG zVD>3ZGgeHJ_1Va|<-|_Ojz?=*j!&yxV5EGwo+(jXr90YD@zaGZ9+O^YcWh0M=(M=~ zy>?r7)*99qmt!8u{1nV>iaJqpH8(WP8d>Phd z_Fs_^datS#cc+B;NuQ-xjg!Pfh1XXav=!Vh?t9fay&;43$CQ`zB#&x|Ty{Fj#v$zg zeVNAMs?M)PpCh{a4%?jP-1usF(1T1~hknHma_kz_UlTba7+EgdU%@rSX)UJ$+jsl? ougjeyy``3A&R|=fZ2LnzKkKBJ>Z&hU!1!kHboFyt=akR{0BboKkpKVy literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/wmv.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/wmv.png new file mode 100644 index 0000000000000000000000000000000000000000..53c877afa5a35a8014f61c32a88f764599463635 GIT binary patch literal 1677 zcmb_b`!~}K9R8YCGc9)-y)V;fBa=pMT{O3CMRPYru464>Bhry=Q5lYrNF82emD|WY z64Hbgsou%uo%^-9M&5dR^R9p4Jw4|% zCn2)ZX;;GOl8P(?M{tKgAR`lJ#sL6SNILCq4^dGscr_XOpq&vHXHOtd6l4e6p7X9= zT>bJ@&&cRmYwKMi!5@F%Mq=EmWYHWd$E&PLYZ>aBT1A@eqoU#Qks(etXm?gVg+eLe z@ji;h6c;R)o2jD--`d`eSJ;zT^J-*hsQc|e_vk{fr{i%Gy@%~@8yXs-0*F1AW2)_J z&CLw#ZE-;v6~F81)+EQ@tm(VphE3B)`pE&)wY5sSchAnw1|l_k@8>XRfgaxE^4>8{ zSzD@ukw_#;zLg>ti#%`!lS>rWA%yr0Knu}F)3LCRo7EqGpGQSZVi#Ap?d|OZ>qAL6BQnt{t7AOa&$~V|qwmj;$xnxiJ4B1i zYoil0)lDt2CPtsvH+}KwFPooFxEwyI2^Y`KR^uHL6PZdXYO5bam6d$FF(xB6`qSd# zq2ox5fkABc!zek(>e@zf`O83;;|>U&+=4&vUCf zXBH$?jZFu2;raB7Z6s%umA1Qssfme|qZ7u<-Tg{obNHPqhKZJ?0t~LAf-}`eo9%B( zVXY3lzuVkz3I@}BN$HL6ihCv#W6f6UF!Zaxvc+%m_7h{P` zCX3B3C@AO=FOAKwgsAP{#W9}TOb+ufzZXe~fbCL)!$Z$|w`Xz&21iUWD25^gjYjZU zF$|jP0bN7_uMKC3UIX=8ORGB`?dtq9tX~h{*IWKy$H;Y+Ky2;dYDM2`p$38n_|LDnufqv;C*3X5 zgCKgqUYnN=wVT~GN)U-eqPisXhf1ciP8ROjE!5w8@dndl>stU+#O6V53i)mOvz`RS zoT~WeLWj!LsZ2Fh8|Lt(BH7T(3{>v&=+mookT+`|hkcxOAf%`%!Fp?H^VnH=H!i1w zNxhQy;@M8$`(KaT7Cf?1Md=#e$}`@xOHkyks#?)@t+lk20EOHu6rYoK0k#}3Ec!rD zHlF?uA48xBYZ6L^OyTi(G1W|;mfs)y2l2mkjl#5$=F?>inUr%_|8|5SzHi3okCqN+ z`hJbv{AS%j2aMpu2X`d6v@}aA1j%zQo9n%Jw9aLHqw9#EzNZHTZ7Nycx|z~+uo|Y3 z7gmrRErZG^@ef}Zw)GVv5cxXQG0UP#S{j>W0OhK7N6ndpvQApB^xXcUtS3W9L9=G+ z43J3V!IlU5DLeh{aOdy5B5}z9YV^pN{Pyd+$~|U%7P^gXy~cC+58V8GE0tXMMa7-U zN%kE$g$%NWvEQhkQS0j|ZrTp#nTL@G3{gNd;1`GkyX)~w4 zr;%wF8kp@*8C|(%EDXy2a8X?$^UdV2>%SwF5=kz`>4bLcKn2hPqtIAg1oTs9HN}s$ zk7{b@88(ypg6VqRWxOXKLmG%D<;YT+lakoe^+gm83EZB9XjBJh=kURt@&lcxQTDxW zXoH~J!{0V3pUh{6JLp?J7(Ps~S_#5DQelj8a`uxSkQS3w>;qcw9=4A5s z4Wzs<9F@o8K`|AJZx)2JugNWx+@kwZiTLf`|K6Yvk?WYERChxA_{hjeW_5U0tFo(4 zK%rJ}FsE)&`9)kwCb8aRGR4%uOV)k^V8?jqaK&+fqOvN-rR&e?{ z$XFOF{1T2*L<|y8a|Uk*{k6KRH@vN3aVN9fb2($$`8Sw?5(2yQrCKSM%hPLm4D*Jp z4sAm_gG8m@tEd&oR58`?&Of`_W%`xnce!lNEfU*kG~zpFg`%etnL?fFG?%tl+|j`8 z=#D1xGFo`Gb@i3};hHufmZw0{ggpboUQAGOP10DluYi)(CDSe~E$MVRlhFucL^E0J zD|f0}`*?F1`?MNuNjbT3OkdZ)NNtj*l(94mODq^$o?vzyg zu(lpk*Hg?YF)SO)n;u-DUa9OHWf8M!=Elh>XHK3q*YU*zzUcf<2H83lX%6~Ta!?o= z05)y;jCB)p*&ocJV@klql(R|KQqrSPa3C}ahDt)fW8$JffpI8!dJ-xD4f5v3PGkUp z1uPis2lXz>EB%PxPm z{;@wa)cpm04R*9*cz4|U+mevPgPf|YZV9JzYk}!5;kO10FPMcrBm*?oZh64*Q+l)I zGwYtJ>z3F?_iuL5BhGvC!~a?3avM`6YkK|KWR4q2$MIcp@mhBL9egA#4xxG`J35n2 zZA<3U&->N8?9MOy)!yaCVghDnJo3k%O_gg~tRnXA+lIt{ie`8{CT%-HzPMe%j~d*1 zSe&q8?`-!RcgmG%%v7mVVF_nm9Iy{Wfk%e~ixj9WL0lIP^Ko!Hdd|Z+UfD{@{hGExry3e?%RIC zfqJ5!7l5`!6>mt)A#`R0EEo9a!8Z$oT;FfNiJBaDP$-ugAz9Tp!vv!nf{BogSx6~k!t4;z14-gz#)u2F7g6YEy%a` z16(icoOHqVX+S6B@K2FgCjuOQeC%<#tu+2R8#5t`{+6{#;C=ZpYkD_9rXA2=fjOT> zylCJ&1nY52j0)A+32XbN4E8W>A&tgh)IdUeJr9X68pp`d9iEFN(9d%Pf&)&1+5T5^ F{{t!wHiZBH literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/zip.png b/oss/joomla/trunk/administrator/components/com_media/images/mime-icon-32/zip.png new file mode 100644 index 0000000000000000000000000000000000000000..2ed44349f1c2343f5b3481dd89ca17f9f9303b03 GIT binary patch literal 1440 zcmcgrX;V`N6n#Q1OGT-mwN|znwH22ZYZWLnDuNJHL{v&Z#vnwEfKd_)vP~rfWC<>W zMIa$8F$hG~hlKD5CIkos!ur?)A>^?M2`ENfNaJtlOz+IOXXbpl_spD==;7{SWVq81 z001MDtCOdeEx$rvSG%2xl3KK+OK?P8(%07?m7Sji038#LvzMH+V%#PLWHgD+Xq7dw z$*=P<+4K}d+Bw}@{C6(c*CQU_r%9@aj6`%sO{=6XzEe=v3{NdDA#3Bb+N>+Q+5$qw zP*tj%R4Q$0X_@RQ5|xH@H9YZ6DI4TO)UwE$X(oaoHR(R^^pg7BQhi1Cw2%zu1SK90WDgQa$mhw7BZNj}wKwaaB1L-TeY16!7lnalkU_3l48q z{J6Q2G%XvO>7cONhAIk3N~MyObfL464$^}K%pe$shimYv)emB^xLvxi4CfS*&uC`Y zpC<}h*#toyqpN|^RP~gdhVe^ptk1kGQ+*unc|FWeip=MZbXKO+!{C#1Tvp6tcN&gb zp8Gu8E3Obxy_Yt{wv5a~*9_H2rpkKek+x*zylh=cYcIwsU{2{H^hmEjqtQTl0l|4q z!UiTEsuWHva~ZhW3flM-qFJf#7?zWm4GfZ7Ns321uLy>yopls?$1L`7DW$3d1i^WE zKPICtEbTc+4G=N|8*_aWb8iMf0$dldI+!^MMR&1-->oc_C%dpSZ$i~MY9;c1=o!RL zEKK%>5%o}GTtUKlQAMNx%$yLW2&yS<^)xiOsD_o4$?1lLY^1+L2r?rW^=#3YTCMJs zuOxCu!>h-*?c;=8NC-hfsk&oqZY|n>qc$y-L{ImNT1Wrq0RQW&nwJal)g3`6~-vW^bbmN5})WK=TX4(*`G4_muV~SE(m<4AlhC$}Q3v zqxhh=$*MikD1%+l4^I}`e8sOWtZt)w;@l9yT^!R405XKc#)VC^^<`NhuGsP{56Kqtef zS&uS{wOQrb`5cfPk^eqtI-PjJ$}fIpEh<&iLyr^c=d5_`n-o8YE!DB{-FoEI&+`WK z1o^iL4E)CL&$Gr(_KPCl9r5`cLufk;wEsoQ8PnzFYiF>IyZ*AVF85V!h77Enc5nYt zWbBFtw;=g+Q`kGg!cZo}73<6w|FKiJP-VE^fi3e0>1Vl^c!~DuhxA+R19a++9~&Ng z^@eD#4p7~?-wXV+1F(z}IA#^PJ`F^Z9%4~Xr}(O)O(q_?cTHOox5zF!oLn0$5rt`V Y>=rQ&na&C3+QA^8La6aWVR zEC2ui0Js1!000C37`oj4Fv>}*y*TU5yZ>M)j$~<`XsWJk>%MR-&vb3yc&_h!@BhG{ za7Zi~kI1BQ$!t2G(5Q4uty+Twfnd=_&=~;U1cqC{dDEYQw_bmT z5#VinasYi9b}?jVAb9`-j*oFMe*lpiZhB&Kb%ZdNg^O=Fla(5CdJCEh1O;}A4Tk}0 zbXkOvWQ2;hcBBEiyKD*tj0M07x?2&95eBSp1q`yqT9ID8&c(6K1EYak&c>VylY5^G zu%mmFmzWFb>zc#j4Ev%|)sIE4WQg3GgwQ6y~~_3*-= z$!026g_=P)_swIY1xjOO9CXlHRd}5I*+ZC7Ck007;#?{=QY22V65Bn^SrQe_QsI22 z@_KWt1E!SRUbWg_fG{l~+3K6b#giGG zHRG*xiK<>gfUk~wXV{E@IICef;MYJULN1cgR@Nz5GTc7RV1f3n_94#Fdh2Ei=?|kL z0>zL=@U^yf<(J{q;y$}py5-()Go+#j>v8f2qtAn@YTKzt&6kTAP`ocY1KOrl0SZWX z{q2>}dcjx0cve;PQB!vrh#6n!(Ke1pTf|feg38cBl0Me$g%F0eL3CMnyRGGuNFy#} zUjU5skz$Gwr03sx;{X7^q*7#xKzD@vs{pkK8j51fQ1DhHRyDC+2=kVY!$q?A@_>7|%vs_CYjcIxS;poS{y KsH9Sm0027{!FbXD literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/presentation_16.png b/oss/joomla/trunk/administrator/components/com_media/images/presentation_16.png new file mode 100644 index 0000000000000000000000000000000000000000..da9325509757224a5e05fa07508ca578eba17541 GIT binary patch literal 501 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZUk@J|V9E z|Nnpg{{8C@Uthg?{q*V6TMu79zW?OL{bzUY-o1M3{<$0Xj@^2G<;sLOoIJPY^!+2pPHsPXb=Aqc>yBSvcH-{Z16Su9y1j45$yvM3uiScZ z<)(eh*6-=xa%SGTJ)4)UpS1E|+tMQqi*_!Wx~g*a#`2l#N~Uh>?d@OD+?76QU2@Ob zv666=m0CXjZAZ;f1U7&W(0*}aI1_rJVAk65r#$*Oi zP`<=9q9iy!t)x7$D3!rCF}Wx|H#H?QQNb;FVdQ&MBb@ E08)((y#N3J literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/remove.png b/oss/joomla/trunk/administrator/components/com_media/images/remove.png new file mode 100644 index 0000000000000000000000000000000000000000..29c3a04ea80e5d774e096bac1a29fac10daad082 GIT binary patch literal 588 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZQzsJ|V70 zxVeuXKK!_;=}}P7H7l#9PoKWy<$bzj$>%d?&S_}8fB*hvNy(i%cP^`{ewLSiWoGvO z|Nqz9wmrmD9w&YXE06Z4^{=)H{0_bXRE85w=Gw*GkT+{ek2-!EG9*2m|rrR5bZ ztzYlof7`L+A`j0UW##{pl3%K;ziMhe^!0sXVevIB?R#-?N#dOZp!;n~g8YJk?m+ z3T~N2spa`a*~JPLTQe?I0G00Xba4!km>PS&lds8uhbWJcHIY`#4Qnl&G5aB02& zpU}tHxiRzF6YtA^f+?N2M}uz&`4z`a z(oj;JKR>EL>6W06%lk!4EHC0><2jE#*|gF&mf`g5Wr7ZyZ=0pR?R{=*o#15{yLaBF z6{52>|JGz=9h=4y!FF)ps&9@PTJ$80<<6D7vf(jvX}=g4*r)tr@#2$*>{q|K8Sf+T hWk0I}#}lT1OfzRl)_-l!X9W6#!PC{xWt~$(699^aDfs{Z literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/spreadsheet_16.png b/oss/joomla/trunk/administrator/components/com_media/images/spreadsheet_16.png new file mode 100644 index 0000000000000000000000000000000000000000..91fb753ee5e55938ae0920bf8afa21d4b6d8e857 GIT binary patch literal 545 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJbFq_W2nPqp?T7vkfZTNfJ|V9E z|NsB|<;$l}U*5le|MJ!A$FH9}efr|k(<}Gx-8=R0%*p%b&)v9p>FR^SS0A3aa&y<6 zy?bsR-f`vG>GOBCU3|Rn+>Ilr?i@XNZS%SNhmW3{cX`R~BYPJey|d=vx@r4w_U*jZ zd0^tK?Q>VG-Mx7A;l|w)J2#%{+ca&#@?9Y8GzsU-91#&aJJUMw{^xBuy^G)3mBm!H4> r3+nsE?Z1sRYSqmZF;SYk9`oOp2T2`njxgN@xNA`qm}E literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/terminal_16.png b/oss/joomla/trunk/administrator/components/com_media/images/terminal_16.png new file mode 100644 index 0000000000000000000000000000000000000000..f5410fc7649154f8dd6418a434272139933d1d1a GIT binary patch literal 748 zcmV~+Kr6u_PfZ0%K^2KEiufbI{{q@-tL?T+OMxiX zTBUGfDMHy0$soCaS!=Ms^TC@j?;}OD)>>?rE8XtgpUyppXsz)hV*o&>(|Mn!>95bv z&me?=QVK!{2qDl~LkIyO1f-M@LVz)bYPI@%tJQjE06?DS<>7E>lu9KirKSKWCDJqn zV+>&!!nSSP-rj<94$t%4sRIB=k_1vpSe6CHaS(0cn~d&vSU52h%hWh9OMT#MRXm z4CA|ubBY4=E+$I0ok&oO5JZhAhjlva&K;BLGlJp|wU31W-yLiXx0gqv^5M z8cHeHwvA4wgN==iSqDOhX=RN@1CHaMP$FEhclKeRZWLfs< zlMo^X5E_Q@_44xa?DX{X`0noROQX?pXT*X45gr)sro e`M%HoPx}qA1A*N_*O%u20000N literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/images/uploading.gif b/oss/joomla/trunk/administrator/components/com_media/images/uploading.gif new file mode 100644 index 0000000000000000000000000000000000000000..3885617e0f4d71d59b4223a0e097abe9041e8b13 GIT binary patch literal 1046 zcmZ?wbhEHb+`(YLaD;*3|NsBrzyE*#{`*G;f9~Gk*FC}wc#;SEWulE(`>~_e#U$O3e&HMic78H2s{Bk+Ar08Uh)qGQx z60fyU>&-RGPQR@xytTf!Ci!D~&5xeg{F|P4zKlS>D&Bt}`f0x$OH`O&Zx0SZG zcja|<_oepsPl}s3d0P0?>9fjmXU~hBIe(Gs!o|xRmYNIjn(?l&S?#@%MS#pn*Z~dJ_x3#DA_6t=VB~Te-}fBt8fpVrJr&kZWmJeEm>@rRb9_sSHfb z@d7+rn>sc|2QgSaJ!<8!;g}l(tHP^lPf;b^FuQt9hJY*6{O4Q8nl6wOyI~t0F!_;D z#o8owWncY$pCq{xd2?A=+E^ZhzYmM&sbzc65uCm{blr`8J>O0@uAb7{t7fph6C>Z63N>uV=}+wnXlVL#u8N1_T2ez9}-4c}&%Dt}xgki78O zoMP3FO!~90vs6o)U0-g^bv?s-!HfNjUfCQDyw}~fHqY0e=9XNzWb++AVG)nab5EHV zzDL}A)7!lwkZDK2_gjh4whZU(x86N)_iz#)%LI7_<%?HD`JQi`6sMOJq0-)deJuw6C|lY4em?6?x^$>VUK zck`VJX9kuFDa{NlE$01`9Zei$`nT{NRGE6)^=F6ch9&N7S==8E9hiEEhw&NT!!?Br zy}U9Csk0o{cs|!GyJzV&ud41)`uy2{IA5qX@mYB;Y^(E3S=7U~Ib(5~64y$_Nq$-$ zOQ#8a%2-x@?!n9D3)-|^tynTmfC-VVYZzo0_!yXg>6%Z0#dFCNm8DlqlB$+vbAXg^ zq9y&-1uDo%|9lBb(wFK#0ZIB7R)CZKjWwX8zyHC83Lm}M=U;58I-9rq{)Zhke(P_) z|FNg;{QKYk8ycIMTUy)9d3jX?1XMUV+mk!HdzJeq&X_rC_MEx%<}X;dXz`Mz%a*TL TxoY*Awd>Yz*tjW0k--`O&R4}A literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_media/index.html b/oss/joomla/trunk/administrator/components/com_media/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/media.php b/oss/joomla/trunk/administrator/components/com_media/media.php new file mode 100644 index 00000000..56a96c66 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/media.php @@ -0,0 +1,77 @@ +authorize( 'com_media', 'manage' )) { + $mainframe->redirect('index.php', JText::_('ALERTNOTAUTH')); +} + +$params =& JComponentHelper::getParams('com_media'); + +// Load the admin HTML view +require_once( JPATH_COMPONENT.DS.'helpers'.DS.'media.php' ); + +// Set the path definitions +$view = JRequest::getCmd('view',null); +$popup_upload = JRequest::getCmd('pop_up',null); +$path = "file_path"; +if(substr(strtolower($view),0,6) == "images" || $popup_upload == 1) $path = "image_path"; +define('COM_MEDIA_BASE', JPATH_ROOT.DS.$params->get($path, 'images/stories')); +define('COM_MEDIA_BASEURL', JURI::root().$params->get($path, 'images/stories')); + +// Require the base controller +require_once (JPATH_COMPONENT.DS.'controller.php'); + +$cmd = JRequest::getCmd('task', null); + +if (strpos($cmd, '.') != false) +{ + // We have a defined controller/task pair -- lets split them out + list($controllerName, $task) = explode('.', $cmd); + + // Define the controller name and path + $controllerName = strtolower($controllerName); + $controllerPath = JPATH_COMPONENT.DS.'controllers'.DS.$controllerName.'.php'; + + // If the controller file path exists, include it ... else lets die with a 500 error + if (file_exists($controllerPath)) { + require_once($controllerPath); + } else { + JError::raiseError(500, 'Invalid Controller'); + } +} +else +{ + // Base controller, just set the task :) + $controllerName = null; + $task = $cmd; +} + +// Set the name for the controller and instantiate it +$controllerClass = 'MediaController'.ucfirst($controllerName); +if (class_exists($controllerClass)) { + $controller = new $controllerClass(); +} else { + JError::raiseError(500, 'Invalid Controller Class'); +} + +// Perform the Request task +$controller->execute($task); + +// Redirect if set by the controller +$controller->redirect(); diff --git a/oss/joomla/trunk/administrator/components/com_media/media.xml b/oss/joomla/trunk/administrator/components/com_media/media.xml new file mode 100644 index 00000000..a47c39db --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/media.xml @@ -0,0 +1,12 @@ + + + Media Manager + Joomla! Project + April 2006 + Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + admin@joomla.org + www.joomla.org + 1.5.0 + This component manages site media + diff --git a/oss/joomla/trunk/administrator/components/com_media/models/index.html b/oss/joomla/trunk/administrator/components/com_media/models/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/models/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/models/list.php b/oss/joomla/trunk/administrator/components/com_media/models/list.php new file mode 100644 index 00000000..6420a4b7 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/models/list.php @@ -0,0 +1,194 @@ +setState('folder', $folder); + + $parent = str_replace("\\", "/", dirname($folder)); + $parent = ($parent == '.') ? null : $parent; + $this->setState('parent', $parent); + $set = true; + } + return parent::getState($property); + } + + function getImages() + { + $list = $this->getList(); + return $list['images']; + } + + function getFolders() + { + $list = $this->getList(); + return $list['folders']; + } + + function getDocuments() + { + $list = $this->getList(); + return $list['docs']; + } + + /** + * Build imagelist + * + * @param string $listFolder The image directory to display + * @since 1.5 + */ + function getList() + { + static $list; + + // Only process the list once per request + if (is_array($list)) { + return $list; + } + + // Get current path from request + $current = $this->getState('folder'); + + // If undefined, set to empty + if ($current == 'undefined') { + $current = ''; + } + + // Initialize variables + if (strlen($current) > 0) { + $basePath = COM_MEDIA_BASE.DS.$current; + } else { + $basePath = COM_MEDIA_BASE; + } + $mediaBase = str_replace(DS, '/', COM_MEDIA_BASE.'/'); + + $images = array (); + $folders = array (); + $docs = array (); + + // Get the list of files and folders from the given folder + $fileList = JFolder::files($basePath); + $folderList = JFolder::folders($basePath); + + // Iterate over the files if they exist + if ($fileList !== false) { + foreach ($fileList as $file) + { + if (is_file($basePath.DS.$file) && substr($file, 0, 1) != '.' && strtolower($file) !== 'index.html') { + $tmp = new JObject(); + $tmp->name = $file; + $tmp->path = str_replace(DS, '/', JPath::clean($basePath.DS.$file)); + $tmp->path_relative = str_replace($mediaBase, '', $tmp->path); + $tmp->size = filesize($tmp->path); + + $ext = strtolower(JFile::getExt($file)); + switch ($ext) + { + // Image + case 'jpg': + case 'png': + case 'gif': + case 'xcf': + case 'odg': + case 'bmp': + case 'jpeg': + $info = @getimagesize($tmp->path); + $tmp->width = @$info[0]; + $tmp->height = @$info[1]; + $tmp->type = @$info[2]; + $tmp->mime = @$info['mime']; + + $filesize = MediaHelper::parseSize($tmp->size); + + if (($info[0] > 60) || ($info[1] > 60)) { + $dimensions = MediaHelper::imageResize($info[0], $info[1], 60); + $tmp->width_60 = $dimensions[0]; + $tmp->height_60 = $dimensions[1]; + } else { + $tmp->width_60 = $tmp->width; + $tmp->height_60 = $tmp->height; + } + + if (($info[0] > 16) || ($info[1] > 16)) { + $dimensions = MediaHelper::imageResize($info[0], $info[1], 16); + $tmp->width_16 = $dimensions[0]; + $tmp->height_16 = $dimensions[1]; + } else { + $tmp->width_16 = $tmp->width; + $tmp->height_16 = $tmp->height; + } + $images[] = $tmp; + break; + // Non-image document + default: + $iconfile_32 = JPATH_ADMINISTRATOR.DS."components".DS."com_media".DS."images".DS."mime-icon-32".DS.$ext.".png"; + if (file_exists($iconfile_32)) { + $tmp->icon_32 = "components/com_media/images/mime-icon-32/".$ext.".png"; + } else { + $tmp->icon_32 = "components/com_media/images/con_info.png"; + } + $iconfile_16 = JPATH_ADMINISTRATOR.DS."components".DS."com_media".DS."images".DS."mime-icon-16".DS.$ext.".png"; + if (file_exists($iconfile_16)) { + $tmp->icon_16 = "components/com_media/images/mime-icon-16/".$ext.".png"; + } else { + $tmp->icon_16 = "components/com_media/images/con_info.png"; + } + $docs[] = $tmp; + break; + } + } + } + } + + // Iterate over the folders if they exist + if ($folderList !== false) { + foreach ($folderList as $folder) { + $tmp = new JObject(); + $tmp->name = basename($folder); + $tmp->path = str_replace(DS, '/', JPath::clean($basePath.DS.$folder)); + $tmp->path_relative = str_replace($mediaBase, '', $tmp->path); + $count = MediaHelper::countFiles($tmp->path); + $tmp->files = $count[0]; + $tmp->folders = $count[1]; + + $folders[] = $tmp; + } + } + + $list = array('folders' => $folders, 'docs' => $docs, 'images' => $images); + + return $list; + } +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/models/manager.php b/oss/joomla/trunk/administrator/components/com_media/models/manager.php new file mode 100644 index 00000000..48a3469a --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/models/manager.php @@ -0,0 +1,133 @@ +setState('folder', $folder); + + $parent = str_replace("\\", "/", dirname($folder)); + $parent = ($parent == '.') ? null : $parent; + $this->setState('parent', $parent); + $set = true; + } + return parent::getState($property); + } + + /** + * Image Manager Popup + * + * @param string $listFolder The image directory to display + * @since 1.5 + */ + function getFolderList($base = null) + { + global $mainframe; + + // Get some paths from the request + if (empty($base)) { + $base = COM_MEDIA_BASE; + } + + // Get the list of folders + jimport('joomla.filesystem.folder'); + $folders = JFolder::folders($base, '.', true, true); + + // Load appropriate language files + $lang = & JFactory::getLanguage(); + $lang->load('', JPATH_ADMINISTRATOR); + $lang->load(JRequest::getCmd( 'option' ), JPATH_ADMINISTRATOR); + + $document =& JFactory::getDocument(); + $document->setTitle(JText::_('Insert Image')); + + // Build the array of select options for the folder list + $options[] = JHTML::_('select.option', "","/"); + foreach ($folders as $folder) { + $folder = str_replace(COM_MEDIA_BASE, "", $folder); + $value = substr($folder, 1); + $text = str_replace(DS, "/", $folder); + $options[] = JHTML::_('select.option', $value, $text); + } + + // Sort the folder list array + if (is_array($options)) { + sort($options); + } + + // Create the drop-down folder select list + $list = JHTML::_('select.genericlist', $options, 'folderlist', "class=\"inputbox\" size=\"1\" onchange=\"ImageManager.setFolder(this.options[this.selectedIndex].value)\" ", 'value', 'text', $base); + return $list; + } + + function getFolderTree($base = null) + { + // Get some paths from the request + if (empty($base)) { + $base = COM_MEDIA_BASE; + } + $mediaBase = str_replace(DS, '/', COM_MEDIA_BASE.'/'); + + // Get the list of folders + jimport('joomla.filesystem.folder'); + $folders = JFolder::folders($base, '.', true, true); + + $tree = array(); + foreach ($folders as $folder) + { + $folder = str_replace(DS, '/', $folder); + $name = substr($folder, strrpos($folder, '/') + 1); + $relative = str_replace($mediaBase, '', $folder); + $absolute = $folder; + $path = explode('/', $relative); + $node = (object) array('name' => $name, 'relative' => $relative, 'absolute' => $absolute); + + $tmp = &$tree; + for ($i=0,$n=count($path); $i<$n; $i++) + { + if (!isset($tmp['children'])) { + $tmp['children'] = array(); + } + if ($i == $n-1) { + // We need to place the node + $tmp['children'][$relative] = array('data' =>$node, 'children' => array()); + break; + } + if (array_key_exists($key = implode('/', array_slice($path, 0, $i+1)), $tmp['children'])) { + $tmp = &$tmp['children'][$key]; + } + } + } + $tree['data'] = (object) array('name' => JText::_('Media'), 'relative' => '', 'absolute' => $base); + return $tree; + } +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/images/index.html b/oss/joomla/trunk/administrator/components/com_media/views/images/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/images/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/images/tmpl/default.php b/oss/joomla/trunk/administrator/components/com_media/views/images/tmpl/default.php new file mode 100644 index 00000000..e5c1d78c --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/images/tmpl/default.php @@ -0,0 +1,93 @@ + + +

    + +
    +
    + + folderList; ?> + +
    +
    + + +
    +
    + + +
    + + + + + + + + + + + + + + + + + +
    + +
    +
    + + + + +get('allowed_media_usergroup')) + { + case '1': + $acl->addACL( 'com_media', 'upload', 'users', 'publisher' ); + break; + case '2': + $acl->addACL( 'com_media', 'upload', 'users', 'publisher' ); + $acl->addACL( 'com_media', 'upload', 'users', 'editor' ); + break; + case '3': + $acl->addACL( 'com_media', 'upload', 'users', 'publisher' ); + $acl->addACL( 'com_media', 'upload', 'users', 'editor' ); + $acl->addACL( 'com_media', 'upload', 'users', 'author' ); + break; + case '4': + $acl->addACL( 'com_media', 'upload', 'users', 'publisher' ); + $acl->addACL( 'com_media', 'upload', 'users', 'editor' ); + $acl->addACL( 'com_media', 'upload', 'users', 'author' ); + $acl->addACL( 'com_media', 'upload', 'users', 'registered' ); + break; + } ?> + +authorize('com_media', 'upload')); ?> + +
    +
    + +
    + + + +
    +
      +
    • +
    +
    + +
    + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/images/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_media/views/images/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/images/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/images/view.html.php b/oss/joomla/trunk/administrator/components/com_media/views/images/view.html.php new file mode 100644 index 00000000..b4d34848 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/images/view.html.php @@ -0,0 +1,61 @@ +getClientId() == 1) $append = 'administrator/'; + + JHTML::_('script' , 'popup-imagemanager.js', $append .'components/com_media/assets/'); + JHTML::_('stylesheet', 'popup-imagemanager.css', $append .'components/com_media/assets/'); + if ($config->get('enable_flash', 0)) { + JHTML::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ ImageManager.refreshFrame(); }')); + } + + /* + * Display form for FTP credentials? + * Don't set them here, as there are other functions called before this one if there is any file write operation + */ + jimport('joomla.client.helper'); + $ftp = !JClientHelper::hasCredentials('ftp'); + + $this->assignRef( 'session', JFactory::getSession()); + $this->assignRef( 'config', $config); + $this->assignRef( 'state', $this->get('state')); + $this->assignRef( 'folderList', $this->get('folderList')); + $this->assign('require_ftp', $ftp); + + parent::display($tpl); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_media/views/imageslist/index.html b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default.php b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default.php new file mode 100644 index 00000000..687d23d7 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default.php @@ -0,0 +1,26 @@ + +images) > 0 || count($this->folders) > 0) { ?> +
    + + folders); $i<$n; $i++) : + $this->setFolder($i); + echo $this->loadTemplate('folder'); + endfor; ?> + + images); $i<$n; $i++) : + $this->setImage($i); + echo $this->loadTemplate('image'); + endfor; ?> + +
    + + + + + +
    +
    + +
    +
    + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default_folder.php b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default_folder.php new file mode 100644 index 00000000..21bf71dd --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default_folder.php @@ -0,0 +1,6 @@ + +
    diff --git a/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default_image.php b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default_image.php new file mode 100644 index 00000000..0616a8d5 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/default_image.php @@ -0,0 +1,6 @@ + + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/imageslist/view.html.php b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/view.html.php new file mode 100644 index 00000000..8fc682a2 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/imageslist/view.html.php @@ -0,0 +1,73 @@ +getClientId() == 1) $append = 'administrator/'; + + JHTML::_('behavior.mootools'); + JHTML::_('stylesheet', 'popup-imagelist.css', $append .'components/com_media/assets/'); + + $document =& JFactory::getDocument(); + $document->addScriptDeclaration("var ImageManager = window.parent.ImageManager;"); + + $this->assign('baseURL', COM_MEDIA_BASEURL); + $this->assignRef('images', $this->get('images')); + $this->assignRef('folders', $this->get('folders')); + $this->assignRef('state', $this->get('state')); + + parent::display($tpl); + } + + + function setFolder($index = 0) + { + if (isset($this->folders[$index])) { + $this->_tmp_folder = &$this->folders[$index]; + } else { + $this->_tmp_folder = new JObject; + } + } + + function setImage($index = 0) + { + if (isset($this->images[$index])) { + $this->_tmp_img = &$this->images[$index]; + } else { + $this->_tmp_img = new JObject; + } + } +} diff --git a/oss/joomla/trunk/administrator/components/com_media/views/media/index.html b/oss/joomla/trunk/administrator/components/com_media/views/media/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/media/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/default.php b/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/default.php new file mode 100644 index 00000000..c87f0892 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/default.php @@ -0,0 +1,83 @@ + + + + + + +
    +
    + +
    + loadTemplate('folders'); ?> +
    +
    + require_ftp): ?> +
    +
    + + + + + + + + + + + + + +
    + + + +
    + + + +
    +
    +
    + + +
    +
    + +
    + / + + + +
    +
    + +
    +
    + +
    + +
    + + + +
    + + + user->authorize('com_media', 'upload')); ?> + +
    +
    + [  config->get('upload_maxsize') / 1000000); ?>M ] +
    + + + +
    +
      +
    • +
    +
    + +
    + +
    diff --git a/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/default_folders.php b/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/default_folders.php new file mode 100644 index 00000000..5e2291dd --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/default_folders.php @@ -0,0 +1,6 @@ + +
      folders_id; ?>> +folders['children'] as $folder) : ?> +
    • name; ?>getFolderLevel($folder); ?>
    • + +
    diff --git a/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/media/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/media/view.html.php b/oss/joomla/trunk/administrator/components/com_media/views/media/view.html.php new file mode 100644 index 00000000..e7ab7fef --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/media/view.html.php @@ -0,0 +1,133 @@ +getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word'); + + $listStyle = " + + "; + + $document =& JFactory::getDocument(); + $document->setBuffer($listStyle, 'modules', 'submenu'); + + JHTML::_('behavior.mootools'); + $document->addScript('components/com_media/assets/mediamanager.js'); + $document->addStyleSheet('components/com_media/assets/mediamanager.css'); + + JHTML::_('behavior.modal'); + $document->addScriptDeclaration(" + window.addEvent('domready', function() { + document.preview = SqueezeBox; + });"); + + JHTML::script('mootree.js'); + JHTML::stylesheet('mootree.css'); + + if ($config->get('enable_flash', 0)) { + JHTML::_('behavior.uploader', 'file-upload', array('onAllComplete' => 'function(){ MediaManager.refreshFrame(); }')); + } + + if(DS == '\\') + { + $base = str_replace(DS,"\\\\",COM_MEDIA_BASE); + } else { + $base = COM_MEDIA_BASE; + } + + $js = " + var basepath = '".$base."'; + var viewstyle = '".$style."'; + " ; + $document->addScriptDeclaration($js); + + /* + * Display form for FTP credentials? + * Don't set them here, as there are other functions called before this one if there is any file write operation + */ + jimport('joomla.client.helper'); + $ftp = !JClientHelper::hasCredentials('ftp'); + + $this->assignRef('session', JFactory::getSession()); + $this->assignRef('config', $config); + $this->assignRef('state', $this->get('state')); + $this->assign('require_ftp', $ftp); + $this->assign('folders_id', ' id="media-tree"'); + $this->assign('folders', $this->get('folderTree')); + + $user =& JFactory::getUser(); + $this->assignRef('user', $user); + + // Set the toolbar + $this->_setToolBar(); + + parent::display($tpl); + echo JHTML::_('behavior.keepalive'); + } + + function _setToolBar() + { + // Get the toolbar object instance + $bar =& JToolBar::getInstance('toolbar'); + + // Set the titlebar text + JToolBarHelper::title( JText::_( 'Media Manager' ), 'mediamanager.png'); + + // Add a delete button + $title = JText::_('Delete'); + $dhtml = " + + $title"; + $bar->appendButton( 'Custom', $dhtml, 'delete' ); + + // Add a popup configuration button + JToolBarHelper::help( 'screen.mediamanager' ); + } + + function getFolderLevel($folder) + { + $this->folders_id = null; + $txt = null; + if (isset($folder['children']) && count($folder['children'])) { + $tmp = $this->folders; + $this->folders = $folder; + $txt = $this->loadTemplate('folders'); + $this->folders = $tmp; + } + return $txt; + } +} diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/index.html b/oss/joomla/trunk/administrator/components/com_media/views/medialist/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/default.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/default.php new file mode 100644 index 00000000..e69de29b diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details.php new file mode 100644 index 00000000..714494d3 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details.php @@ -0,0 +1,39 @@ + +
    +
    + + + + + + + + + + + + loadTemplate('up'); ?> + + folders); $i<$n; $i++) : + $this->setFolder($i); + echo $this->loadTemplate('folder'); + endfor; ?> + + documents); $i<$n; $i++) : + $this->setDoc($i); + echo $this->loadTemplate('doc'); + endfor; ?> + + images); $i<$n; $i++) : + $this->setImage($i); + echo $this->loadTemplate('img'); + endfor; ?> + + +
    +
    + + + + +
    diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_doc.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_doc.php new file mode 100644 index 00000000..7cc49269 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_doc.php @@ -0,0 +1,20 @@ + + + + + <?php echo $this->_tmp_doc->name; ?> + + + _tmp_doc->name; ?> + +   + + + + _tmp_doc->size); ?> + + + <?php echo JText::_( 'Delete' ); ?> + + + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_folder.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_folder.php new file mode 100644 index 00000000..14a30c93 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_folder.php @@ -0,0 +1,20 @@ + + + + + <?php echo $this->_tmp_folder->name; ?> + + + _tmp_folder->name; ?> + +   + + +   + + + + <?php echo JText::_( 'Delete' ); ?> + + + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_img.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_img.php new file mode 100644 index 00000000..2ca4eadf --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_img.php @@ -0,0 +1,19 @@ + + + + <?php echo $this->_tmp_img->name; ?> - <?php echo MediaHelper::parseSize($this->_tmp_img->size); ?> + + + escape( $this->_tmp_img->name); ?> + + + _tmp_img->width; ?> x _tmp_img->height; ?> + + + _tmp_img->size); ?> + + + <?php echo JText::_( 'Delete' ); ?> + + + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_up.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_up.php new file mode 100644 index 00000000..58023697 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/details_up.php @@ -0,0 +1,13 @@ + + + + + .. + + + .. + +   +   +   + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs.php new file mode 100644 index 00000000..58f03bfb --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs.php @@ -0,0 +1,26 @@ + +
    +
    + loadTemplate('up'); ?> + + folders); $i<$n; $i++) : + $this->setFolder($i); + echo $this->loadTemplate('folder'); + endfor; ?> + + documents); $i<$n; $i++) : + $this->setDoc($i); + echo $this->loadTemplate('doc'); + endfor; ?> + + images); $i<$n; $i++) : + $this->setImage($i); + echo $this->loadTemplate('img'); + endfor; ?> + +
    + + + + +
    \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_doc.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_doc.php new file mode 100644 index 00000000..cc025f41 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_doc.php @@ -0,0 +1,16 @@ + +
    +
    +
    + + <?php echo $this->_tmp_doc->name; ?> +
    +
    +
    + <?php echo JText::_( 'Delete' ); ?> + +
    +
    + _tmp_doc->name; ?> +
    +
    diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_folder.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_folder.php new file mode 100644 index 00000000..32da61a4 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_folder.php @@ -0,0 +1,16 @@ + + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_img.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_img.php new file mode 100644 index 00000000..c7c1ee47 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_img.php @@ -0,0 +1,18 @@ + + diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_up.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_up.php new file mode 100644 index 00000000..1e4397be --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/tmpl/thumbs_up.php @@ -0,0 +1,15 @@ + +
    +
    +
    + + .. +
    +
    +
    +   +
    +
    + .. +
    +
    diff --git a/oss/joomla/trunk/administrator/components/com_media/views/medialist/view.html.php b/oss/joomla/trunk/administrator/components/com_media/views/medialist/view.html.php new file mode 100644 index 00000000..92cc549a --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_media/views/medialist/view.html.php @@ -0,0 +1,90 @@ +getUserStateFromRequest('media.list.layout', 'layout', 'thumbs', 'word'); + + JHTML::_('behavior.mootools'); + + $document = &JFactory::getDocument(); + $document->addStyleSheet('components/com_media/assets/medialist-'.$style.'.css'); + + $document->addScriptDeclaration(" + window.addEvent('domready', function() { + window.top.document.updateUploader && window.top.document.updateUploader(); + $$('a.img-preview').each(function(el) { + el.addEvent('click', function(e) { + new Event(e).stop(); + window.top.document.preview.fromElement(el); + }); + }); + });"); + + $this->assign('baseURL', JURI::root()); + $this->assignRef('images', $this->get('images')); + $this->assignRef('documents', $this->get('documents')); + $this->assignRef('folders', $this->get('folders')); + $this->assignRef('state', $this->get('state')); + + parent::display($tpl); + } + + function setFolder($index = 0) + { + if (isset($this->folders[$index])) { + $this->_tmp_folder = &$this->folders[$index]; + } else { + $this->_tmp_folder = new JObject; + } + } + + function setImage($index = 0) + { + if (isset($this->images[$index])) { + $this->_tmp_img = &$this->images[$index]; + } else { + $this->_tmp_img = new JObject; + } + } + + function setDoc($index = 0) + { + if (isset($this->documents[$index])) { + $this->_tmp_doc = &$this->documents[$index]; + } else { + $this->_tmp_doc = new JObject; + } + } +} diff --git a/oss/joomla/trunk/administrator/components/com_menus/admin.menus.php b/oss/joomla/trunk/administrator/components/com_menus/admin.menus.php new file mode 100644 index 00000000..b832c2ba --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/admin.menus.php @@ -0,0 +1,24 @@ + 'viewMenus') ); +$controller->registerTask('apply', 'save'); +$controller->execute( JRequest::getCmd( 'task' ) ); +$controller->redirect(); \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/blank.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/blank.gif new file mode 100644 index 0000000000000000000000000000000000000000..5c37109b343ae55b1b039692fadbcf77f7a3c6e4 GIT binary patch literal 210 zcmZ?wbhEHb6k-r!IKsg2|Ns9>moA+f6DCaP=;&x^X=!L^C@(KBE-nV@VjvDE{$ycf2U?{AQVz0{fz^M3O5Y@hc`GuO z<=ou#TAQ&XcDsXv$gxHd2AM<$6}={%hJ_v}3c(G`#TOVj*4+?PFs!u+Y&dH2$yQUk bk6mSv#^juWnO=2W7h}Iy%AMz8WUvMRdX`D= literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/blankbottom.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/blankbottom.gif new file mode 100644 index 0000000000000000000000000000000000000000..e1b748942ec190c722819003560f7d3622f346d0 GIT binary patch literal 205 zcmZ?wbhEHb6k-r!IKsg2|Ns9>moA+f6DCaP=;&x^X=!L^C@(KBE-nV@VjvDE{$ycf2U?{AQVz0{fz@k)O5Y@hc`GuO z<=ou#TAQ&XcDsXv$gxHd2AM<$6}={%hJ_v}3c(G`#TOVj*4+?PFs!u+Y&dH2$yQUk Wk6mSv#^juWnKgdvZ@*S#um%7Kgh*ll literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/empty.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/empty.gif new file mode 100644 index 0000000000000000000000000000000000000000..b5cf52378fa5f361ff532bd66a89fb405f23f815 GIT binary patch literal 62 zcmZ?wbhEHb6k-r!n8*ME|NsAQXlMYEia%Kx85o!ubU>mYc?Kr_IsGe7zvW*%XUnbb L&G+VrGgt!vQpOa` literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/folder.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/folder.gif new file mode 100644 index 0000000000000000000000000000000000000000..0821626916b7cd5ab44cc0a8cca7f7725c41f615 GIT binary patch literal 278 zcmV+x0qOonNk%w1VG;lm0K@+gXL# zR)E%2ebrKW(@%HNO?1yoam`6>%SUO+M2@t8WyV2Y!ah!_FG-;+M3g8#hbA_3Aunef zC|4LIPZlFg761SLA^8LW2LK-cEC2ui01^Na000G(;P(M!X#!$8T5Nk=7?zIb z??PZ`v{m46Kp+&0MWZp;1Z{%iQNdU~2%M)yU{nB2$9(n>*eh?CY6@*V30#*+Zf)$O0H5&nJcNCTt1(+fL8xsQrs00S9 c1rws9938SAw6(7_CnqYqyuH4^z`!8@J3YN`Q~&?~ literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/folderopen.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/folderopen.gif new file mode 100644 index 0000000000000000000000000000000000000000..8ad32984fe30221c86700b8790c87dd0f2d7720a GIT binary patch literal 398 zcmZ?wbhEHb6k-r!xXQrr|NsAg|Nj92kpBDc@3-GyzW)CF=EsXG?@u3nwd3f^9ebaz z-}Go<|Gn70d$C=2qPy-yb>5EbydBkgGraX?SnJKuhHD`W*Mb|ah1OmTuDu#mbvdBw zvVYZOzw(Q|+ zU|a1V!{?wQ#dzpRf!XAP33}n#x17{iw*)^t@K%mTbDF673PqdQK50r5Eo9nWZJox@ zXd%U=DpV-*#3_|aNl9K_TvW8CKAFjkOGVLzd5Wk|Pq-PU>O@zusu_)DJQ^CR$_#RH zQc~=Cy^FP$sVXY2l3cfeM{ARYN=pX2{swOCW6Sm{$*~>|H&^54xx{sai-X4?*@DH~ e?B0D76Jx_$jZDv9y!3kg=Iy)pA3iuTSOWkz`J!0> literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/gradient.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/gradient.gif new file mode 100644 index 0000000000000000000000000000000000000000..fe9681ae466a50ed8d7574afaea8e94fb717f7d3 GIT binary patch literal 214 zcmZ?wbhEHblwjauIKseSU)5z**1q)M$-uU0=kGo0UbmxZ#pc2}EAPL2oj7s+)3@*E z>^{8z@{Qv+?p7^YH)YE{m)gEJpFXcUe$KmTQe^k6%;`(EoxObh$@3deo-<$ria%Mv z!a5)lWG4e_aKaJ=iHio)RCN3kE!?LD9A;r`?1)iYwMlPAPuk&^70a)z`r36iYx^CJ zm(gr \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/join.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/join.gif new file mode 100644 index 0000000000000000000000000000000000000000..8d495d65b8011426a81e2fd4f69829eb956f82d3 GIT binary patch literal 59 zcmZ?wbhEHb6k-r!XkcJCckbN(|Nj+#vM{nUFf!;c00Bsbfk~*Rf92`7{EO#oY3eS# MyXQB59V>%102G5daj^aO62NKVm;5;moA+f6DCaP=;&x^X=!L^C@(KBE-nV@VjvDE{$ycf2U?{AQVz0{fz@+?N?%Imyo^=r zG#~8CmlkL(RA9XzO5}ing#>%g1I_}8J#4%U30|^{LPsAvXEN#3?B&>Ql4Bt^ Up(DwsX=mhz9W{Rbtqcs-0FSjs#{d8T literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/minusbottom.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/minusbottom.gif new file mode 100644 index 0000000000000000000000000000000000000000..d9062406861d67e19c37ab2e9fe2be63eb206043 GIT binary patch literal 259 zcmZ?wbhEHb6k;%9IKsg2|Ns9>moA+f6DCaP=;&x^X=!L^C@(KBE-nV@VjvDE{$ycfXAol00VxOB$-vsMK&5Yz!@Lz4 z%W`gRdR=|&lgD+vyw}$AKW~o;Fsl)bcAxQnx%aX;8ZUA*RYR*CR$VI(&E0$_Ke%Ty z)47ZiZUF@m9(EVT4Qf2^zO&9{HQ?cEVCJdTWMF5`VCH3D>g`iz;H+=tZ_!}jt|%9r bre4d-$1fnrHCH8bh4-q}Yt{-WGFSruBRE?t literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/node.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/node.gif new file mode 100644 index 0000000000000000000000000000000000000000..651faa577d509cca765e86f5381e51f7d01bf9da GIT binary patch literal 75 zcmZ?wbhEHb6krfwXkcLY|NlP&1B2pE79h#MpaUX6G7L;gE&ZJbWvk*?f alX3e~XVNprw3*wIGb}&3Uyo;Gum%9~R~QTc literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/nolines_minus.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/nolines_minus.gif new file mode 100644 index 0000000000000000000000000000000000000000..d87a0914d67680009eca7d6822ca50eb3e9e3953 GIT binary patch literal 201 zcmZ?wbhEHb6k-r!IKsg2|Ns9>mo6PVcyRCDy*qdA+`4t^+O=y}u3Wib!Gbw+=FFHe zW5R?99UUDlEiDZV4dvzK#l^)yEeu2h#h)yU>)z9GUsKiTBrG7 zU%oVtOQH8@$4yHV7eB0U5PBe( Pb2e-D{SOsdEDY8FPyj?h literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/nolines_plus.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/nolines_plus.gif new file mode 100644 index 0000000000000000000000000000000000000000..a7da85ea14d42283580334fe32703dc7cc370845 GIT binary patch literal 201 zcmZ?wbhEHb6k-r!IKsg2|Ns9>mo6PVcyRCDy*qdA+`4t^+O=y}u3Wib!Gbw+=FFHe zW5R?99UUDlEiDZV4dvzK#l^)yEeu2h#h)yU>)z9GUsKiTBrG7 zU%oVtOQH8@$4yHV7eB0U5PBe( Pb2e-D{SOsdEDY8FZR$lM literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/page.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/page.gif new file mode 100644 index 0000000000000000000000000000000000000000..4866cc43aba94a6670808e8a6c6febc1e86bcc3f GIT binary patch literal 67 zcmZ?wbhEHb6k-r!XkcLA4n6Y!|9{1wER5_7j0`#qKmd|qV3O+TUwQiN`GzS54aJGu UO7qPFuX;>-*11e8ih;oz0EVv>jQ{`u literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/plus.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/plus.gif new file mode 100644 index 0000000000000000000000000000000000000000..c24da3e2e07523d6042ee463d4a60e9c97f68302 GIT binary patch literal 214 zcmZ?wbhEHb6k-r!IKsg2|Ns9>moA+f6DCaP=;&x^X=!L^C@(KBE-nV@VjvDE{$ycf2U?{AQVz0{fi-x6O5Y@hc`GuO z<=ou#TAQ&XcDsXv$gxHd2AM<$6}={%hQtB}88)7jQ#UU3r$fF6>%4#T_;0O_B7-#me|$_~ literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/images/plusbottom.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/images/plusbottom.gif new file mode 100644 index 0000000000000000000000000000000000000000..cb3c72df30e62c0af3de61dc03e02ecec2ed8c6a GIT binary patch literal 210 zcmZ?wbhEHb6k-r!IKsg2|Ns9>moA+f6DCaP=;&x^X=!L^C@(KBE-nV@VjvDE{$ycf2U?{AQVz0{fz^M3O5Y@hc`GuO z<=ou#TAQ&XcDsXv$gxHd2AM<$6}={%hQtB}88)7jQ#UU3r{De9Q@5U \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/blank.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/blank.gif new file mode 100644 index 0000000000000000000000000000000000000000..957d2fc10ac15e89869b54c28d02ace5324a39fb GIT binary patch literal 210 zcmZ?wbhEHb6k-r!I3mQbb?er>d-oO>7dJFC%$PBwqoZTz&Yf%5u5D>)nJ{6(oH=tA zELc!pUcPeW%1f6nojZ5#;K76c!GM7{p!k!8kpXCx4oEr3P6k&01uA_{oae2`Shi-% zwin#)C9&HlUX*DNv=EeGbW&k!TH~?EgGC{>Kf@#_!HLg5Bqbp>#b2;->IYR<5vF4d Yfd!9p%x-w7gPx# literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/blankbottom.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/blankbottom.gif new file mode 100644 index 0000000000000000000000000000000000000000..a1ec37eaa1f483a05947536d470dcaeca0efa005 GIT binary patch literal 206 zcmZ?wbhEHb6k-r!I3mQbb?er>d-oO>7dJFC%$PBwqoZTz&Yf%5u5D>)nJ{6(oH=tA zELc!pUcPeW%1f6nojZ5#;K76c!GM7{p!k!8kpXCx4oEr3P6k%*1uA_{oae2`Shi-% zwin#)C9&HlUX*DNv=EeGbW&k!TH~?EgGC{>Kf@#_!HLg5Bqbp>#b2;->IYR<5vF4d Ufd!9p%x2X1t-t+#kpP1=0MBSi7XSbN literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/empty.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/empty.gif new file mode 100644 index 0000000000000000000000000000000000000000..b5cf52378fa5f361ff532bd66a89fb405f23f815 GIT binary patch literal 62 zcmZ?wbhEHb6k-r!n8*ME|NsAQXlMYEia%Kx85o!ubU>mYc?Kr_IsGe7zvW*%XUnbb L&G+VrGgt!vQpOa` literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/folder.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/folder.gif new file mode 100644 index 0000000000000000000000000000000000000000..5886ddd905c76d89db88ef1a914bbc289155f7bc GIT binary patch literal 274 zcmV+t0qy=rNk%w1VG;lm0K^{vWyV2@+*)74K7iI#B~KP@%SUO+M0C$fNuexv(M@s9 zN%s5nK8Gfbw1AG@Tqsua9wT}l9*=z=bOd#NJEP$&A=3t~`l*|s4Bt1}%9;`O#Az%uMM51)HbP!~-0c}cV z-ek@N0GOAK104)`7Xp0-3LaI0gaU>D1ztuS6?qblhI45N3lMn?5*MNvq!5EbydBkgGraX?SnJKuhHD`W*Mb|ah1OmTuDu#mbvdBw zvVYZOzw(Q|+ zU|a1V!{?wQ#dzpRf!XAP33}n#x17{iw*)^t@K%mTbDF673PqdQK50r5Eo9nWZJox@ zXd%U=DpV-*#3_|aNl9K_TvW8CKAFjkOGVLzd5Wk|Pq-PU>O@zusu_)DJQ^CR$_#RH zQc~=Cy^FP$sVXY2l3cfeM{ARYN=pX2{swOCW6Sm{$*~>|H&^54xx{sai-X4?*@DH~ e?B0D76Jx_$jZDv9y!3kg=Iy)pA3iuTSOWkz`J!0> literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/gradient.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/gradient.gif new file mode 100644 index 0000000000000000000000000000000000000000..ca4e85a0d177e307e9c253e96577a798d0ef1703 GIT binary patch literal 214 zcmZ?wbhEHblwjauIKseSU)8nr;K}ZFJGPy@T(xLjWcMtqvi9pwp5J)#{Qk?=Q?~3& zoH+l@r_W6*Ha~s)zHrXU%;`&x-?+Q~@(u5%N$ZZEbE)k+fA7(p-G>9)rZHdxia%Mv z!a5)lWG4e_@B+pV;V_*G&L&MotXC9V#U@$wc+6UHYL|iJ+k(@*Udykn`r36?$7K%R z&1j~%haXK@{>QX6;O)fM$!zljAL~W#Yq}i0?Q6H#`qlS}!>pz~- \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/join.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/join.gif new file mode 100644 index 0000000000000000000000000000000000000000..ec0b8c1f61eb5fe4245e978b84cda44f488cd5ba GIT binary patch literal 60 zcmZ?wbhEHb6k-r!XkcVGckbN(|Nj+#vM@3*Ff!;c00Bsbfl0Whf92`7{EO#IY3we% NyXQB5n>QnaH2^IX6U6`k literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/joinbottom.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/joinbottom.gif new file mode 100644 index 0000000000000000000000000000000000000000..013d39df6951ffe1cb3ccb040a82800f80000b50 GIT binary patch literal 106 zcmZ?wbhEHb6k;%9XkcVGckbN(|Nj+#vM@3*Ff!;c00BsbfyuF_zv1*U-oxEFmrAnZ z%D(@JRWx-|EiqfUO;-E*u8qdtU%SulSaZLQzvpen!D|=7zWizNUd+YN>y>?F)z_}G JS>mh=)&L-=EEWI& literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/line.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/line.gif new file mode 100644 index 0000000000000000000000000000000000000000..f7fecc3e1b904209322e61643fd21dc31980d457 GIT binary patch literal 72 zcmZ?wbhEHb6k-r!XkcVGckbN(|Nj+#vM@3*Ff!;c00Bsbfl0onzv1*U-oxEFmrAnZ Z%D(@JRWx-|EiqfUO;-E*E?-6lYXCD>7#aWo literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/minus.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/minus.gif new file mode 100644 index 0000000000000000000000000000000000000000..9b165fceab3573b34b5dcb7d31fb145d6e8c5185 GIT binary patch literal 204 zcmZ?wbhEHb6k-r!I3mPw?%cVpTet4rySJgCVaALZJ9qBv=;$aeE}k%9!pfB^7c5vX zXU?2UmoBxmw3L^ZuU)(L;K76c!GM7{p!k!8kpXCx4oEr3P6k%b1uA_hne#GMt;>0` zFJDUZq_7B+@JW^@znf&Wni_2SCNu;vWmqY*ojAS2#Ffo$$)cz(nL0bB=^~LbGRD;)5cb|kyUAwFF zqGXq-q7D;NlcQjwI77vrh3C2~7#JHFm}>L{+S>)$88RDMH3XR(n)v(G1vx4!Sf{B7 Xa&qu8^RTz%WMu`eTD@kqB7-#m?{Qt$ literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/node.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/node.gif new file mode 100644 index 0000000000000000000000000000000000000000..915651fcfe63f1b6f00cc6261aaaf9d969dbe8ae GIT binary patch literal 76 zcmZ?wbhEHb6krfwXkY+=|Ns9h{$v3&bwDIYhJi`Br++2m+YK{p0rs71t U+i&j$gt|<7*17D}D-i~30Cy}FB>(^b literal 0 HcmV?d00001 diff --git a/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/plus.gif b/oss/joomla/trunk/administrator/components/com_menus/assets/rtl_images/plus.gif new file mode 100644 index 0000000000000000000000000000000000000000..2b727e0392bd68f1f2c033d181a5091a93ba294a GIT binary patch literal 214 zcmZ?wbhEHb6k-r!I3mQbcJ11&Teo&}bj+ABqoJW;@7}#TckV1ME-o)GU%7JSf&~jE zOqkHp(lTexoJ*H3ojZ5#;K76c!GM7{p!k!8kpXCx4oEr3P6pQC1uA_{oae2`Shi-% zwin#)C9&HlPGo2dv=F?*;G`nfwB`g8QwM_r_cid = "&cid[]=".$id; + } else { + $this->_cid = null; + } + + if ($menutype) { + $this->_menutype = "&menutype=".$menutype; + } else { + $this->_menutype = null; + } + + $this->_com = preg_replace( '#\W#', '', $component ); + + // Build the tree + if (!$this->_getOptions($this->_getXML(JPATH_SITE.'/components/com_'.$this->_com.'/metadata.xml', 'menu'), $this->_root)) { + if (!$this->_getViews()) + { + // Default behavior + } + } + } + + /** + * Returns the component + * @return string + */ + function getComponent() + { + return $this->_com; + } + + function getTree() + { + $depth = 0; + $this->reset(); + $class = null; + + // Recurse through children if they exist + while ($this->_current->hasChildren()) + { + $this->_output .= '
      '; + $children = $this->_current->getChildren(); + for ($i=0,$n=count($children);$i<$n;$i++) + { + $this->_current = & $children[$i]; + $this->renderLevel($depth,($i==$n-1)?1:0); + } + $this->_output .= '
    '; + } + return $this->_output; + } + + function renderLevel($depth, $isLast=0) + { + $depth++; + if (!isset($this->_depthHash[$depth])) { + $this->_depthHash[$depth] = 0; + } + $this->_depthHash[$depth]++; + + if ($this->_current->hasChildren()) { + $classes = 'node-open'; + } else { + $classes = 'leaf'; + } + + if ($isLast) { + $last = ' class="last"'; + } else { + $last = ''; + } + + $parent = & $this->_current->getParent(); + // Print the item + $this->_output .= "\n"; + + // Print the url + if ($this->_current->hasChildren()) { + $this->_output .= ""; + } else { + $this->_output .= ""; + } + + // Recurse through children if they exist + while ($this->_current->hasChildren()) + { + $this->_output .= "
      \n"; + $children = $this->_current->getChildren(); + for ($i=0,$n=count($children);$i<$n;$i++) + { + $this->_current = & $children[$i]; + $this->renderLevel($depth,($i==$n-1)?1:0); + } + $this->_output .= "
    \n"; + } + + // Close item + $this->_output .= "\n"; + } + + function _getOptions($e, &$parent, $purl=null) + { + if (!$purl) { + $purl = 'url[option]=com_'.$this->_com; + + // No metadata xml file in component root + if (!$e) { + return false; + } + } + + // Does the metadata file say no options available? + if ($e->attributes('options') == 'none') { + $node =& new iLinkNode($e->attributes('name'), $purl, $e->attributes('msg')); + $parent->addChild($node); + return true; + } + + // Do we have defined options available? + $options = &$e->getElementByPath('options'); + if ($options) { + $children = $options->children(); + foreach ($children as $child) + { + if ($child->name() == 'option') { + $url = $purl.'&url['.$options->attributes('var').']='.$child->attributes('value'); + $node =& new iLinkNode($child->attributes('name'), $url, $child->attributes('msg')); + $parent->addChild($node); + } elseif ($child->name() == 'default') { + $node =& new iLinkNode($child->attributes('name'), $purl, $child->attributes('msg')); + $parent->addChild($node); + } + } + return true; + } else { + return false; + } + } + + /** + * @access private + */ + function _getViews() + { + $return = false; + $path = JPATH_SITE.DS.'components'.DS.'com_'.$this->_com.DS.'views'; + + if (JFolder::exists($path)) { + $views = JFolder::folders($path); + } else { + return $return; + } + + if (is_array($views) && count($views)) + { + //$this->addChild(new iLinkNode('Views', null, 'Select the view'), true); + $return = true; + foreach ($views as $view) + { + if (strpos($view, '_') === false) { + // Load view metadata if it exists + $xmlpath = $path.DS.$view.DS.'metadata.xml'; + if (JFile::exists($xmlpath)) { + $data = $this->_getXML($xmlpath, 'view'); + } else { + $data = null; + } + + $url = 'url[option]=com_'.$this->_com.'&url[view]='.$view; + if ($data) { + if ($data->attributes('hidden') != 'true') { + $m = $data->getElementByPath('message'); + if ($m) { + $message = $m->data(); + } + $node =& new iLinkNode($data->attributes('title'), $url, $message); + $this->addChild($node); + if ($options = $data->getElementByPath('options')) { + $this->_getOptions($data, $node, $url); + } else { + $this->_getLayouts(dirname($xmlpath), $node); + } + } + } else { + $onclick = null; + $node =& new iLinkNode(ucfirst($view), $url); + $this->addChild($node); + $this->_getLayouts(dirname($xmlpath), $node); + } + } + } + } + return $return; + } + + /** + * @access private + */ + function _getLayouts($path, &$node) + { + $return = false; + $folder = $path.DS.'tmpl'; + if (is_dir( $folder )) + { + $files = JFolder::files($folder, '.php$'); + if (count($files)) { + foreach ($files as $file) + { + if (strpos($file, '_') === false) { + // Load view metadata if it exists + $layout = JFile::stripext($file); + $xmlpath = $path.DS.'tmpl'.DS.$layout.'.xml'; + if (JFile::exists($xmlpath)) { + $data = $this->_getXML($xmlpath, 'layout'); + } else { + $data = null; + } + + if ($layout != 'default') { + $url = 'url[option]=com_'.$this->_com.'&url[view]='.basename($path).'&url[layout]='.$layout; + } else { + $url = 'url[option]=com_'.$this->_com.'&url[view]='.basename($path); + } + if ($data) { + if ($data->attributes('hidden') != 'true') { + $m = $data->getElementByPath('message'); + if ($m) { + $message = $m->data(); + } + $child =& new iLinkNode($data->attributes('title'), $url, $message); + $node->addChild($child); + } + } else { + // Add default info for the layout + $child =& new iLinkNode(ucfirst($layout).' '.JText::_('Layout'), $url); + $node->addChild($child); + } + } + } + } + } + return $return; + } + + function _getXML($path, $xpath='control') + { + // Initialize variables + $result = null; + // load the xml metadata + if (file_exists( $path )) { + $xml =& JFactory::getXMLParser('Simple'); + if ($xml->loadFile($path)) { + if (isset( $xml->document )) { + $result = $xml->document->getElementByPath($xpath); + } + } + return $result; + } + return $result; + } + + function _findNodes(&$node) + { + foreach ($node->children() as $step) + { + /* + * For each child we need to see if it is an include and if so we + * need to get those children and process them as well (break out into + * another method). Then we need to create the objects in the _steps + * array for each child of type step. For now we aren't going to handle + * nested includes. + */ + if ($step->name() == 'include') { + // Handle include + $this->_getIncludedSteps($step, $node); + } elseif ($step->name() == 'step') { + // Include step to array + $this->_nodes[] = $step; + } else { + // Do nothing + continue; + } + } + } + + function _getIncludedSteps($include, &$parent) + { + $tags = array(); + $source = $include->attributes('source'); + $path = $include->attributes('path'); + + preg_match_all( "/{([A-Za-z\-_]+)}/", $source, $tags); + if (isset( $tags[1] )) { + $n = count( $tags[1] ); + for ($i=0; $i < $n; $i++) + { + $source = str_replace($tags[0][$i], @$this->_vars[$tags[1][$i]], $source); + } + } + + // load the source xml file + if (file_exists( JPATH_ROOT.$source )) + { + $xml = & JFactory::getXMLParser('Simple'); + if ($xml->loadFile(JPATH_ROOT.$source)) + { + $document = &$xml->document; + $steps = $document->getElementByPath($path); + + foreach($steps->children() as $step) + { + if ($step->name() == 'include') { + // Handle include + } elseif ($step->name() == 'step') { + // Include step to array + $node->addChild('step', $step->attributes(), $node->level()+1); + } else { + // Do nothing + continue; + } + } + } + } + } +} + +class iLinkNode extends JNode +{ + /** + * Node Title + */ + var $title = null; + + /** + * Node URL + */ + var $url = null; + + /** + * Node message + */ + var $msg = null; + + function __construct($title, $url = null, $msg = null) + { + $this->title = trim($title); + $this->url = $url; + $this->msg = trim($msg); + } +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/classes/index.html b/oss/joomla/trunk/administrator/components/com_menus/classes/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/classes/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/config.xml b/oss/joomla/trunk/administrator/components/com_menus/config.xml new file mode 100644 index 00000000..089a28fe --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/config.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/oss/joomla/trunk/administrator/components/com_menus/controller.php b/oss/joomla/trunk/administrator/components/com_menus/controller.php new file mode 100644 index 00000000..effb106d --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/controller.php @@ -0,0 +1,797 @@ +getModel( 'Item' ); + $view =& $this->getView( 'Item' ); + $view->setModel( $model, true ); + + // Set the layout and display + $view->setLayout('type'); + $view->type(); + } + /** + * Edit menu item wizard + */ + + function type() + { + JRequest::setVar( 'edit', true ); + $model =& $this->getModel( 'Item' ); + $view =& $this->getView( 'Item' ); + $view->setModel( $model, true ); + + // Set the layout and display + $view->setLayout('type'); + $view->type(); + } + + /** + * Edits a menu item + */ + function edit() + { + JRequest::setVar( 'edit', true ); + $model =& $this->getModel( 'Item' ); + $model->checkout(); + + $view =& $this->getView( 'Item' ); + $view->setModel( $model, true ); + // Set the layout and display + $view->setLayout('form'); + $view->edit(); + } + + /** + * Saves a menu item + */ + function save() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $model =& $this->getModel( 'Item' ); + $post = JRequest::get('post'); + // allow name only to contain html + $post['name'] = JRequest::getVar( 'name', '', 'post', 'string', JREQUEST_ALLOWHTML ); + $model->setState( 'request', $post ); + + if ($model->store()) { + $msg = JText::_( 'Menu item Saved' ); + } else { + $msg = JText::_( 'Error Saving Menu item' ); + } + + $item =& $model->getItem(); + switch ( $this->_task ) { + case 'apply': + $this->setRedirect( 'index.php?option=com_menus&menutype='.$item->menutype.'&task=edit&cid[]='.$item->id.'' , $msg ); + break; + + case 'save': + default: + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$item->menutype, $msg ); + break; + } + } + + /** + * Cancels an edit operation + */ + function cancelItem() + { + global $mainframe; + + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'string' ); + + $model = $this->getModel('item'); + $model->checkin(); + + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menutype); + } + + /** + * Cancels an edit operation + */ + function cancel() + { + $this->setRedirect( 'index.php?option=com_menus'); + } + + /** + * Form for copying item(s) to a specific menu + */ + function copy() + { + $model =& $this->getModel( 'List' ); + $view =& $this->getView( 'List' ); + $view->setModel( $model, true ); + $view->copyForm(); + } + + /** + * Save the item(s) to the menu selected + */ + function doCopy() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getString( 'menu', '', 'post'); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + //Check to see of a menu was selected to copy the items too + if (empty($menu)) + { + $msg = JText::_('Please select a menu from the list'); + $mainframe->enqueueMessage($msg, 'message'); + return $this->execute('copy'); + } + + $model =& $this->getModel( 'List' ); + + if ($model->copy($cid, $menu)) { + $msg = JText::sprintf( 'Menu Items Copied to', count( $cid ), $menu ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Form for moving item(s) to a specific menu + */ + function move() + { + $model =& $this->getModel( 'List'); + $view =& $this->getView( 'List' ); + $view->setModel( $model, true ); + $view->moveForm(); + } + + /** + * Save the item(s) to the menu selected + */ + function doMove() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getVar( 'menu', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + //Check to see if a menu was selected to copy the items too + if (empty($menu)) + { + $msg = JText::_('Please select a menu from the list'); + $mainframe->enqueueMessage($msg, 'message'); + return $this->execute('move'); + } + + $model =& $this->getModel( 'List' ); + + if ($model->move($cid, $menu)) { + $msg = JText::sprintf( 'Menu Items Moved to', count( $cid ), $menu ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function publish() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $model =& $this->getModel( 'List' ); + if ($model->setItemState($cid, 1)) { + $msg = JText::sprintf( 'Menu Items Published', count( $cid ) ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function unpublish() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $model =& $this->getModel( 'List' ); + if ($model->setItemState($cid, 0)) { + $msg = JText::sprintf( 'Menu Items Unpublished', count( $cid ) ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function orderup() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + if (isset($cid[0]) && $cid[0]) { + $id = $cid[0]; + } else { + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, JText::_('No Items Selected') ); + return false; + } + + $model =& $this->getModel( 'List' ); + if ($model->orderItem($id, -1)) { + $msg = JText::_( 'Menu Item Moved Up' ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function orderdown() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + if (isset($cid[0]) && $cid[0]) { + $id = $cid[0]; + } else { + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, JText::_('No Items Selected') ); + return false; + } + + $model =& $this->getModel( 'List' ); + if ($model->orderItem($id, 1)) { + $msg = JText::_( 'Menu Item Moved Down' ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function saveorder() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $model =& $this->getModel( 'List' ); + if ($model->setOrder($cid, $menu)) { + $msg = JText::_( 'New ordering saved' ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function accesspublic() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $model =& $this->getModel( 'List' ); + if ($model->setAccess($cid, 0)) { + $msg = JText::sprintf( 'Menu Items Set Public', count( $cid ) ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function accessregistered() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $model =& $this->getModel( 'List' ); + if ($model->setAccess($cid, 1)) { + $msg = JText::sprintf( 'Menu Items Set Registered', count( $cid ) ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function accessspecial() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $model =& $this->getModel( 'List' ); + if ($model->setAccess($cid, 2)) { + $msg = JText::sprintf( 'Menu Items Set Special', count( $cid ) ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function setdefault() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + if (isset($cid[0]) && $cid[0]) { + $id = $cid[0]; + } else { + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, JText::_('No Items Selected') ); + return false; + } + + $item =& JTable::getInstance( 'menu' ); + $item->load($id); + if(!$item->get('published')) { + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, JText::_('The Default Menu Item Must Be Published') ); + return false; + } + + $model =& $this->getModel( 'List' ); + if ($model->setHome($id)) { + $msg = JText::_( 'Default Menu Item Set' ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + function remove() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Get some variables from the request + $menu = JRequest::getVar( 'menutype', '', 'post', 'string' ); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + if (!count($cid)) { + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, JText::_('No Items Selected') ); + return false; + } + + $model =& $this->getModel( 'List' ); + if ($n = $model->toTrash($cid)) { + $msg = JText::sprintf( 'Item(s) sent to the Trash', $n ); + } else { + $msg = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus&task=view&menutype='.$menu, $msg ); + } + + /** + * Save the item(s) to the menu selected + */ + function view() + { + $model =& $this->getModel( 'List' ); + $view =& $this->getView( 'List' ); + $view->setModel( $model, true ); + $view->display(); + } + + + /** + * Controller for view listing menu types and related statical info + * @param string The URL option + */ + function viewMenus() + { + + $view =& $this->getView( 'Menus'); + $model =& $this->getModel( 'Menutype' ); + $view->setModel( $model, true ); + $view->display(); + } + + + /** + * Controller for view to edit a menu type + */ + function editMenu() + { + $view =& $this->getView( 'Menus' ); + $model =& $this->getModel( 'Menutype' ); + $view->setModel( $model, true ); + $view->editForm(true,null); + + } + + /** + * Controller for view to create a menu type + */ + function addMenu() + { + $view =& $this->getView( 'Menus' ); + $model =& $this->getModel( 'Menutype' ); + $view->setModel( $model, true ); + $view->editForm(false,null); + } + + /** + * Controller for saving a menu type + */ + function saveMenu() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $id = JRequest::getVar( 'id', 0, 'post', 'int' ); + + $oldType =& JTable::getInstance('menutypes' ); + $oldType->load( $id ); + + $menuType =& JTable::getInstance('menutypes'); + $menuType->bind( JRequest::get( 'post' ) ); + + $isNew = ($menuType->id == 0); + $isChanged = ($oldType->menutype != $menuType->menutype); + + if (!$menuType->check()) { + JError::raiseWarning( 500, $menuType->getError() ); + $this->setRedirect( 'index.php?option=com_menus&task=editMenu', 'Please check your menu settings' ); + return false; + } + + if (!$menuType->store()) { + JError::raiseWarning( 500, $menuType->getError() ); + $this->setRedirect( 'index.php?option=com_menus&task=editMenu', 'Please check your menu settings' ); + return false; + } + + if ($isNew) + { + if ($title = JRequest::getVar( 'module_title', $menuType->menutype, 'post', 'string' )) + { + $module =& JTable::getInstance( 'module'); + $module->title = $title; + $module->position = 'left'; + $module->module = 'mod_mainmenu'; + $module->published = 0; + $module->iscore = 0; + $module->params = 'menutype='. $menuType->menutype; + + // check then store data in db + if (!$module->check()) { + return JError::raiseWarning( 500, $module->getError() ); + } + if (!$module->store()) { + return JError::raiseWarning( 500, $module->getError() ); + } + $module->checkin(); + $module->reorder( 'position='.$db->Quote($module->position) ); + + // module assigned to show on All pages by default + // Clean up possible garbage first + $query = 'DELETE FROM #__modules_menu WHERE moduleid = '.(int) $module->id; + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseWarning( 500, $db->getError() ); + } + + // ToDO: Changed to become a Joomla! db-object + $query = 'INSERT INTO #__modules_menu VALUES ( '.(int) $module->id.', 0 )'; + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseWarning( 500, $db->getError() ); + } + } + + $msg = JText::sprintf( 'New Menu created', $menuType->menutype ); + } + else if ($isChanged) + { + $oldTerm = $oldType->menutype; + $newTerm = $menuType->menutype; + + // change menutype being of all mod_mainmenu modules calling old menutype + $query = 'SELECT id' + . ' FROM #__modules' + . ' WHERE module = "mod_mainmenu"' + . ' AND params LIKE "%menutype='.$db->getEscaped($oldTerm).'%"' + ; + $db->setQuery( $query ); + $modules = $db->loadResultArray(); + + foreach ($modules as $id) + { + $row =& JTable::getInstance('module'); + $row->load( $id ); + + $row->params = str_replace( $oldTerm, $newTerm, $row->params ); + + // check then store data in db + if ( !$row->check() ) { + return JError::raiseWarning( 500, $db->getError() ); + } + if ( !$row->store() ) { + return JError::raiseWarning( 500, $db->getError() ); + } + $row->checkin(); + } + + // change menutype of all menuitems using old menutype + $query = 'UPDATE #__menu' + . ' SET menutype = '.$db->Quote($newTerm) + . ' WHERE menutype = '.$db->Quote($oldTerm) + ; + $db->setQuery( $query ); + $db->query(); + + $msg = JText::_( 'Menu Items & Modules updated' ); + } + + $this->setRedirect( 'index.php?option=com_menus', $msg ); + } + + /** + * Controller for a view to confirm the deletion of a menu type + */ + function deleteMenu() + { + $view =& $this->getView( 'Menus' ); + $model =& $this->getModel( 'Menutype' ); + $view->setModel( $model, true ); + $view->deleteForm(); + } + + /** + * Delete a menu + */ + function doDeleteMenu() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $id = JRequest::getVar( 'id', 0, '', 'int' ); + if ($id <= 0) { + JError::raiseWarning( 500, JText::_( 'Invalid ID provided' ) ); + $this->setRedirect( 'index.php?option=com_menus' ); + return false; + } + + $model =& $this->getModel( 'Menutype' ); + if (!$model->canDelete()) { + JError::raiseWarning( 500, $model->getError() ); + $this->setRedirect( 'index.php?option=com_menus' ); + return false; + } + $err = null; + if (!$model->delete()) { + $err = $model->getError(); + } + $this->setRedirect( 'index.php?option=com_menus', $err ); + } + + /** + * Compiles a list of the articles you have selected to Copy + */ + function copyMenu() + { + $view =& $this->getView( 'Menus' ); + $model =& $this->getModel( 'Menutype' ); + $view->setModel( $model, true ); + $view->copyForm(); + } + + /** + * Copies a complete menu, all its items and creates a new module, using the name speified + */ + function doCopyMenu() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $type = JRequest::getVar( 'type', '', 'post', 'string' ); + $menu_name = JRequest::getVar( 'menu_name', 'New Menu', 'post', 'string' ); + $module_name = JRequest::getVar( 'module_name', 'New Module', 'post', 'string' ); + + // check for unique menutype for new menu copy + $query = 'SELECT params' . + ' FROM #__modules' . + ' WHERE module = "mod_mainmenu"'; + $db->setQuery( $query ); + $menus = $db->loadResultArray(); + + foreach ( $menus as $menu ) + { + $params = new JParameter( $menu ); + if ( $params->get('menutype') == $menu_name ) { + JError::raiseWarning( 500, JText::_( 'ERRORMENUNAMEEXISTS' ) ); + $this->setRedirect( 'index.php?option=com_menus' ); + return; + } + } + + // copy the menu items + $mids = JRequest::getVar( 'mids', array(), 'post', 'array' ); + JArrayHelper::toInteger($mids); + $total = count( $mids ); + $copy =& JTable::getInstance('menu'); + $original =& JTable::getInstance('menu'); + sort( $mids ); + $a_ids = array(); + + foreach( $mids as $mid ) + { + $original->load( $mid ); + $copy = $original; + $copy->id = NULL; + $copy->parent = $a_ids[$original->parent]; + $copy->menutype = $menu_name; + $copy->home = 0; + + if ( !$copy->check() ) { + JError::raiseWarning( 500, $copy->getError() ); + $this->setRedirect( 'index.php?option=com_menus' ); + return; + } + if ( !$copy->store() ) { + JError::raiseWarning( 500, $copy->getError() ); + $this->setRedirect( 'index.php?option=com_menus' ); + return; + } + $a_ids[$original->id] = $copy->id; + } + + // create the module copy + $row =& JTable::getInstance('module'); + $row->load( 0 ); + $row->title = $module_name; + $row->iscore = 0; + $row->published = 1; + $row->position = 'left'; + $row->module = 'mod_mainmenu'; + $row->params = 'menutype='. $menu_name; + + if (!$row->check()) { + JError::raiseWarning( 500, $db->getError() ); + $this->setRedirect( 'index.php?option=com_menus' ); + return; + } + if (!$row->store()) { + JError::raiseWarning( 500, $db->getError() ); + $this->setRedirect( 'index.php?option=com_menus' ); + return; + } + $row->checkin(); + $row->reorder( 'position='.$db->Quote($row->position) ); + // module assigned to show on All pages by default + // ToDO: Changed to become a Joomla! db-object + $query = 'INSERT INTO #__modules_menu' . + ' VALUES ( '.(int) $row->id.', 0 )'; + $db->setQuery( $query ); + if ( !$db->query() ) { + JError::raiseWarning( 500, $db->getErrorMsg(true) ); + $this->setRedirect( 'index.php?option=com_menus' ); + return; + //echo "\n"; + //$mainframe->close(); + } + + // Insert the menu type + $query = 'INSERT INTO `#__menu_types` ( `menutype` , `title` , `description` ) ' . + ' VALUES ( '.$db->Quote($menu_name).', '.$db->Quote($menu_name).', "")'; + $db->setQuery( $query ); + if ( !$db->query() ) { + JError::raiseWarning( 500, $db->getErrorMsg(true) ); + $this->setRedirect( 'index.php?option=com_menus' ); + return; + //echo "\n"; + //$mainframe->close(); + } + + $msg = JText::sprintf( 'Copy of Menu created', $type, $total ); + $mainframe->redirect( 'index.php?option=com_menus', $msg ); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_menus/helpers/helper.php b/oss/joomla/trunk/administrator/components/com_menus/helpers/helper.php new file mode 100644 index 00000000..87093b8f --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/helpers/helper.php @@ -0,0 +1,171 @@ +setQuery( $query ); + return $db->loadObjectList(); + } + + /** + * Get a list of the menutypes + * @return array An array of menu type names + */ + function getMenuTypes() + { + $db = &JFactory::getDBO(); + $query = 'SELECT menutype' . + ' FROM #__menu_types'; + $db->setQuery( $query ); + return $db->loadResultArray(); + } + + /** + * Gets a list of components that can link to the menu + */ + function getComponentList() + { + $db = &JFactory::getDBO(); + $query = 'SELECT c.id, c.name, c.link, c.option' . + ' FROM #__components AS c' . + ' WHERE c.link <> "" AND parent = 0' . + ' ORDER BY c.name'; + $db->setQuery( $query ); + $result = $db->loadObjectList( ); + return $result; + } + + /** + * Build the select list for parent menu item + */ + function Parent( &$row ) + { + $db =& JFactory::getDBO(); + + // If a not a new item, lets set the menu item id + if ( $row->id ) { + $id = ' AND id != '.(int) $row->id; + } else { + $id = null; + } + + // In case the parent was null + if (!$row->parent) { + $row->parent = 0; + } + + // get a list of the menu items + // excluding the current menu item and its child elements + $query = 'SELECT m.*' . + ' FROM #__menu m' . + ' WHERE menutype = '.$db->Quote($row->menutype) . + ' AND published != -2' . + $id . + ' ORDER BY parent, ordering'; + $db->setQuery( $query ); + $mitems = $db->loadObjectList(); + + // establish the hierarchy of the menu + $children = array(); + + if ( $mitems ) + { + // first pass - collect children + foreach ( $mitems as $v ) + { + $pt = $v->parent; + $list = @$children[$pt] ? $children[$pt] : array(); + array_push( $list, $v ); + $children[$pt] = $list; + } + } + + // second pass - get an indent list of the items + $list = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0 ); + + // assemble menu items to the array + $mitems = array(); + $mitems[] = JHTML::_('select.option', '0', JText::_( 'Top' ) ); + + foreach ( $list as $item ) { + $mitems[] = JHTML::_('select.option', $item->id, '   '. $item->treename ); + } + + $output = JHTML::_('select.genericlist', $mitems, 'parent', 'class="inputbox" size="10"', 'value', 'text', $row->parent ); + + return $output; + } + + /** + * build the select list for target window + */ + function Target( &$row ) + { + $click[] = JHTML::_('select.option', '0', JText::_( 'Parent Window With Browser Navigation' ) ); + $click[] = JHTML::_('select.option', '1', JText::_( 'New Window With Browser Navigation' ) ); + $click[] = JHTML::_('select.option', '2', JText::_( 'New Window Without Browser Navigation' ) ); + $target = JHTML::_('select.genericlist', $click, 'browserNav', 'class="inputbox" size="4"', 'value', 'text', intval( $row->browserNav ) ); + + return $target; + } + + /** + * build the select list for target window + */ + function Published( &$row ) + { + $put[] = JHTML::_('select.option', '0', JText::_( 'No' )); + $put[] = JHTML::_('select.option', '1', JText::_( 'Yes' )); + + // If not a new item, trash is not an option + if ( !$row->id ) { + $row->published = 1; + } + $published = JHTML::_('select.radiolist', $put, 'published', '', 'value', 'text', $row->published ); + return $published; + } + + /** + * clean system cache + */ + function cleanCache() + { + global $mainframe; + + if ($mainframe->getCfg('caching')) { + // clean system cache + $cache =& JFactory::getCache('_system'); + $cache->clean(); + + // clean mod_mainmenu cache + $cache2 =& JFactory::getCache('mod_mainmenu'); + $cache2->clean(); + } + } +} diff --git a/oss/joomla/trunk/administrator/components/com_menus/helpers/index.html b/oss/joomla/trunk/administrator/components/com_menus/helpers/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/helpers/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/index.html b/oss/joomla/trunk/administrator/components/com_menus/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/menus.xml b/oss/joomla/trunk/administrator/components/com_menus/menus.xml new file mode 100644 index 00000000..876a799c --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/menus.xml @@ -0,0 +1,12 @@ + + + Menus Manager + Joomla! Project + 2006 + Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + admin@joomla.org + www.joomla.org + 1.5.0 + Menu Manager + diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/index.html b/oss/joomla/trunk/administrator/components/com_menus/models/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/item.php b/oss/joomla/trunk/administrator/components/com_menus/models/item.php new file mode 100644 index 00000000..a4ba5427 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/item.php @@ -0,0 +1,792 @@ +_url = 'index.php?option='.$url['option']; + unset($url['option']); + if (count($url)) { + foreach ($url as $k => $v) + { + $this->_url .= '&'.$k.'='.$v; + } + } + } + + $this->setId(); + } + + function setId() + { + $array = JRequest::getVar('cid', array(0), '', 'array'); + $this->_id = (int) $array[0]; + + if (!$this->_id) { + $this->_id = JRequest::getInt('id', 0); + } + } + + function &getItem() + { + static $item; + if (isset($item)) { + return $item; + } + + $table =& $this->_getTable(); + + // Load the current item if it has been defined + $edit = JRequest::getVar('edit',true); + $cid = JRequest::getVar( 'cid', array(0), '', 'array' ); + JArrayHelper::toInteger($cid, array(0)); + if ($edit) { + $table->load($cid[0]); + } + + // Override the current item's type field if defined in the request + if ($type = JRequest::getString('type')) { + $table->type = $type; + } + + // Override the current item's menutype field if defined in the request + if ($menu_type = JRequest::getString('menutype')) { + $table->menutype = $menu_type; + } + + switch ($table->type) + { + case 'separator': + $table->link = null; + $table->componentid = 0; + break; + case 'url': + $table->componentid = 0; + break; + case 'menulink': + $table->componentid = 0; + break; + case 'component': + // Override the current item's link field if defined in the request + if (!is_null($this->_url)) { + $table->link = $this->_url; + } + $url = str_replace('index.php?', '', $table->link); + $url = str_replace('&', '&', $url); + $table->linkparts = null; + if(strpos($url, '&') !== false) + { + $url = str_replace('&','&',$url); + } + + parse_str($url, $table->linkparts); + + $db = &$this->getDBO(); + if ($component = @$table->linkparts['option']) { + $query = 'SELECT `id`' . + ' FROM `#__components`' . + ' WHERE `link` <> \'\'' . + ' AND `parent` = 0' . + ' AND `option` = "'.$db->getEscaped($component).'"'; + $db->setQuery( $query ); + $table->componentid = $db->loadResult(); + } + break; + } + + $item = $table; + return $item; + } + + function &getExpansion() + { + $item = &$this->getItem(); + $return['option'] = JRequest::getCmd('expand'); + $menutype = JRequest::getString('menutype'); + + if ($return['option']) + { + require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_menus'.DS.'classes'.DS.'ilink.php'); + $handler = new iLink($return['option'], $item->id, $menutype); + $return['html'] = $handler->getTree(); + return $return; + } else { + $return['html'] = null; + } + return $return; + } + + function &getUrlParams() + { + // Get the state parameters + $item =& $this->getItem(); + $params = new JParameter(''); + + if ($state =& $this->_getStateXML()) + { + if (is_a($state, 'JSimpleXMLElement')) + { + $sp =& $state->getElementByPath('url'); + $params->setXML($sp); + if (isset($item->linkparts) && is_array($item->linkparts)) { + $params->loadArray($item->linkparts); + } + } + } + return $params; + } + + function &getStateParams() + { + // Get the state parameters + $item =& $this->getItem(); + $params = new JParameter($item->params); + + if ($state =& $this->_getStateXML()) + { + if (is_a($state, 'JSimpleXMLElement')) + { + $sp =& $state->getElementByPath('params'); + $params->setXML($sp); + } + } + return $params; + } + + function &getAdvancedParams() + { + // Get the state parameters + $item =& $this->getItem(); + $params = new JParameter($item->params); + + if ($state =& $this->_getStateXML()) + { + if (is_a($state, 'JSimpleXMLElement')) + { + $ap =& $state->getElementByPath('advanced'); + $params->setXML($ap); + } + } + return $params; + } + + function &getComponentParams() + { + // Initialize variables + $params = null; + $item = &$this->getItem(); + + if ($item->type == 'component') + { + $comp = &$this->getComponent(); + $option = preg_replace( '#\W#', '', $comp->option ); + $path = JPATH_ADMINISTRATOR.DS.'components'.DS.$option.DS.'config.xml'; + + $params = new JParameter( $item->params ); + if (file_exists( $path )) + { + $xml =& JFactory::getXMLParser('Simple'); + if ($xml->loadFile($path)) + { + $document =& $xml->document; + + // if hide is set, don't show the component configuration while editing menu item + $menu = $document->attributes('menu'); + if ( isset($menu) && $menu == 'hide' ) + { + $params = null; + return $params; + } + + if (isset($document->params[0]->param)) + { + // We will collect the hidden elements in an array + // loop will mess up if we do it within the loop + $hide = array(); + for ($i=0,$n=count($document->params[0]->param); $i<$n; $i++) + { + if ($document->params[0]->param[$i]->attributes('menu') == 'hide') + { + $hide[] = &$document->params[0]->param[$i]; + } + else if ($document->params[0]->param[$i]->attributes('type') == 'radio' || $document->params[0]->param[$i]->attributes('type') == 'list') { + $document->params[0]->param[$i]->addAttribute('default', ''); + $document->params[0]->param[$i]->addAttribute('type', 'list'); + $child = &$document->params[0]->param[$i]->addChild('option', array('value' => '')); + $child->setData('Use Global'); + } + } + // Now remove any hidden elements + for ($i = 0, $n = count( $hide ); $i < $n; $i++) { + $document->params[0]->removeChild( $hide[$i] ); + } + } + $params->setXML( $document->params[0] ); + } + } + } + return $params; + } + + function &getSystemParams() + { + // Initialize variables + $params = null; + $item = &$this->getItem(); + + $params = new JParameter( $item->params ); + if ($item->type == 'component') { + $path = JPATH_BASE.DS.'components'.DS.'com_menus'.DS.'models'.DS.'metadata'.DS.'component.xml'; + if (file_exists( $path )) { + $xml =& JFactory::getXMLParser('Simple'); + if ($xml->loadFile($path)) { + $document =& $xml->document; + $params->setXML($document->getElementByPath('state/params')); + } + } + } + return $params; + } + + /** + * Get the name of the current menu item + * + * @return string + * @access public + * @since 1.5 + */ + function getStateName() + { + $state =& $this->_getStateXML(); + + if ( ! is_a($state, 'JSimpleXMLElement')) + { + return null; + } + + $name = null; + $sn =& $state->getElementByPath('name'); + if ($sn) { + $name = $sn->data(); + } + + return JText::_($name); + } + + /** + * Get the description of the current menu item + * + * @return string + * @access public + * @since 1.5 + */ + function getStateDescription() + { + $state =& $this->_getStateXML(); + + + if ( ! is_a($state, 'JSimpleXMLElement')) + { + return null; + } + + $description = null; + $sd =& $state->getElementByPath('description'); + if ($sd) { + $description = $sd->data(); + } + + return JText::_($description); + } + + /** + * Gets the componet table object related to this menu item + */ + function &getComponent() + { + $item =& $this->getItem(); + $id = $item->componentid; + $component = & JTable::getInstance( 'component'); + $component->load( $id ); + return $component; + } + + function checkout($uid = null) + { + $id = JRequest::getVar('cid', array(0), '', 'array'); + JArrayHelper::toInteger( $id, array(0) ); + + // Make sure we have a user id to checkout the article with + if (is_null($uid)) { + $user =& JFactory::getUser(); + $uid = $user->get('id'); + } + + // Lets get to it and checkout the thing... + $item =& $this->getItem(); + if(!$item->checkout($uid, $id[0])) { + $this->setError($this->_db->getErrorMsg()); + return false; + } + + return true; + } + + function checkin() + { + if ($this->_id) { + $item =& $this->_getTable(); + + if(!$item->checkin($this->_id)) { + $this->setError($this->_db->getErrorMsg()); + return false; + } + + return true; + } + + return false; + } + + function store() + { + // Initialize variables + $db =& JFactory::getDBO(); + $row =& $this->getItem(); + $post = $this->_state->get( 'request' ); + + switch ($post['type']) + { + case 'separator': + break; + case 'url': + break; + case 'menulink': + $post['link'] = 'index.php?Itemid='.$post['params']['menu_item']; + break; + case 'component': + break; + } + if (!$row->bind( $post )) { + echo "\n"; + return false; + } + + if ($row->id > 0) + { + // existing item + $query = 'SELECT menutype FROM #__menu WHERE id = '.(int) $row->id; + $this->_db->setQuery( $query ); + $oldType = $this->_db->loadResult(); + if ($oldType != $row->menutype) { + // moved to another menu, disconnect the old parent + $row->parent = 0; + } + $query = 'SELECT parent FROM #__menu WHERE id = '.(int) $row->id; + $this->_db->setQuery( $query ); + $oldParent = $this->_db->loadResult(); + if ($oldParent != $row->parent) { + // we have changed parents, so we have to fix the submenu values + if ($row->parent != 0) { + $query = 'SELECT sublevel FROM #__menu WHERE id = '.(int) $row->parent; + $this->_db->setQuery( $query ); + $sublevel = $this->_db->loadResult() + 1; + } else { + $sublevel = 0; + } + $row->sublevel = $sublevel; + $this->_setSubLevel( array( (int) $row->id ), $sublevel ); + } + } + else + { + // if new item order last in appropriate group + $where = "menutype = " . $db->Quote($row->menutype) . " AND published >= 0 AND parent = ".(int) $row->parent; + $row->ordering = $row->getNextOrder( $where ); + + if( $row->parent != 0 ) { + $query = 'SELECT sublevel FROM #__menu WHERE id = '. (int) $row->parent; + $this->_db->setQuery($query); + $row->sublevel = $this->_db->loadResult() + 1; + } + } + + if (isset($post['urlparams']) && is_array($post['urlparams'])) + { + $pos = strpos( $row->link, '?' ); + if ($pos !== false) + { + $prefix = substr( $row->link, 0, $pos ); + $query = substr( $row->link, $pos+1 ); + + $temp = array(); + if(strpos($query, '&') !== false) { + $query = str_replace('&', '&', $query); + } + parse_str( $query, $temp ); + $temp2 = array_merge( $temp, $post['urlparams'] ); + + $temp3 = array(); + foreach ($temp2 as $k => $v) + { + if ( $k && strlen($v) ) + { + $temp3[] = $k.'='.$v; + } + } + $url = null; + $row->link = $prefix . '?' . implode( '&', $temp3 ); + } + } + + if (!$row->check()) + { + echo "\n"; + return false; + } + + if (!$row->store()) + { + echo "\n"; + return false; + } + + $row->checkin(); + $row->reorder( 'menutype='.$db->Quote( $row->menutype ).' AND parent='.(int)$row->parent ); + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + + + /** + * Delete one or more menu items + * @param mixed int or array of id values + */ + function delete( $ids ) + { + JArrayHelper::toInteger($ids); + + $db = &$this->getDBO(); + + if (count( $ids )) + { + // Delete associated module and template mappings + $where = 'WHERE menuid = ' . implode( ' OR menuid = ', $ids ); + + $query = 'DELETE FROM #__modules_menu ' + . $where; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $menuTable->getErrorMsg() ); + return false; + } + + $query = 'DELETE FROM #__templates_menu ' + . $where; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $menuTable->getErrorMsg() ); + return false; + } + + // Set any alias menu types to not point to missing menu items + $query = 'UPDATE #__menu SET link = 0 WHERE type = \'menulink\' AND (link = '.implode( ' OR id = ', $ids ).')'; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + + // Delete the menu items + $where = 'WHERE id = ' . implode( ' OR id = ', $ids ); + + $query = 'DELETE FROM #__menu ' . $where; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + } + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + /** + * Delete menu items by type + */ + function deleteByType( $type = '' ) + { + $db = &$this->getDBO(); + + $query = 'SELECT id' . + ' FROM #__menu' . + ' WHERE menutype = ' . $db->Quote( $type ); + $db->setQuery( $query ); + $ids = $db->loadResultArray(); + + if ($db->getErrorNum()) + { + $this->setError( $db->getErrorMsg() ); + return false; + } + + return $this->delete( $ids ); + } + + /** + * Returns the internal table object + * @return JTable + */ + function &_getTable() + { + if ($this->_table == null) { + $this->_table =& JTable::getInstance( 'menu'); + } + return $this->_table; + } + + function &_getStateXML() + { + static $xml; + + if (isset($xml)) { + return $xml; + } + $xml = null; + $xmlpath = null; + $item = &$this->getItem(); + + switch ($item->type) + { + case 'separator': + $xmlpath = JPATH_BASE.DS.'components'.DS.'com_menus'.DS.'models'.DS.'metadata'.DS.'separator.xml'; + break; + case 'url': + $xmlpath = JPATH_BASE.DS.'components'.DS.'com_menus'.DS.'models'.DS.'metadata'.DS.'url.xml'; + break; + case 'menulink': + $xmlpath = JPATH_BASE.DS.'components'.DS.'com_menus'.DS.'models'.DS.'metadata'.DS.'menulink.xml'; + break; + case 'component': + default: + if (isset($item->linkparts['view'])) + { + // View is set... so we konw to look in view file + if (isset($item->linkparts['layout'])) { + $layout = $item->linkparts['layout']; + } else { + $layout = 'default'; + } + $lpath = JPATH_ROOT.DS.'components'.DS.$item->linkparts['option'].DS.'views'.DS.$item->linkparts['view'].DS.'tmpl'.DS.$layout.'.xml'; + $vpath = JPATH_ROOT.DS.'components'.DS.$item->linkparts['option'].DS.'views'.DS.$item->linkparts['view'].DS.'metadata.xml'; + if (file_exists($lpath)) { + $xmlpath = $lpath; + } elseif (file_exists($vpath)) { + $xmlpath = $vpath; + } + } + if (!$xmlpath && isset($item->linkparts['option'])) { + $xmlpath = JPATH_ROOT.DS.'components'.DS.$item->linkparts['option'].DS.'metadata.xml'; + if(!file_exists($xmlpath)) { + $xmlpath = JApplicationHelper::getPath('com_xml', $item->linkparts['option']); + } + } + break; + } + + if (file_exists($xmlpath)) + { + $xml =& JFactory::getXMLParser('Simple'); + if ($xml->loadFile($xmlpath)) { + $this->_xml = &$xml; + $document =& $xml->document; + + /* + * HANDLE NO OPTION CASE + */ + $menus =& $document->getElementByPath('menu'); + if (is_a($menus, 'JSimpleXMLElement') && $menus->attributes('options') == 'none') { + $xml =& $menus->getElementByPath('state'); + } else { + $xml =& $document->getElementByPath('state'); + } + + // Handle error case... path doesn't exist + if (!is_a($xml, 'JSimpleXMLElement')) { + return $document; + } + + /* + * HANDLE A SWITCH IF IT EXISTS + */ + if ($switch = $xml->attributes('switch')) + { + $default = $xml->attributes('default'); + // Handle switch + $switchVal = (isset($item->linkparts[$switch]))? $item->linkparts[$switch] : 'default'; + $found = false; + + foreach ($xml->children() as $child) { + if ($child->name() == $switchVal) { + $xml =& $child; + $found = true; + break; + } + } + + if (!$found) { + foreach ($xml->children() as $child) { + if ($child->name() == $default) { + $xml =& $child; + break; + } + } + } + } + + /* + * HANDLE INCLUDED PARAMS + */ + $children = $xml->children(); + if (count($children) == 1) + { + if ($children[0]->name() == 'include') { + $ret =& $this->_getIncludedParams($children[0]); + if ($ret) { + $xml =& $ret; + } + } + } + + if ($switch = $xml->attributes('switch')) + { + $default = $xml->attributes('default'); + // Handle switch + $switchVal = ($item->linkparts[$switch])? $item->linkparts[$switch] : 'default'; + $found = false; + + foreach ($xml->children() as $child) { + if ($child->name() == $switchVal) { + $xml =& $child; + $found = true; + break; + } + } + + if (!$found) { + foreach ($xml->children() as $child) { + if ($child->name() == $default) { + $xml =& $child; + break; + } + } + } + } + } + } + return $xml; + } + + function &_getIncludedParams($include) + { + $tags = array(); + $state = null; + $source = $include->attributes('source'); + $path = $include->attributes('path'); + $item = &$this->getItem(); + + preg_match_all( "/{([A-Za-z\-_]+)}/", $source, $tags); + if (isset($tags[1])) { + for ($i=0;$ilinkparts[$tags[1][$i]], $source); + } + } + + // load the source xml file + if (file_exists( JPATH_ROOT.$source )) + { + $xml = & JFactory::getXMLParser('Simple'); + + if ($xml->loadFile(JPATH_ROOT.$source)) { + $document = &$xml->document; + $state = $document->getElementByPath($path); + } + } + return $state; + } + + /** + * Sets the sublevel for menu items + * + * @param array id values to set + * @param int level to assign to the sublevel + */ + function _setSubLevel( $cid, $level ) + { + JArrayHelper::toInteger($cid, array(0)); + + $ids = implode( ',', $cid ); + + $query = 'UPDATE #__menu SET sublevel = '.(int) $level + .' WHERE id IN ('.$ids.')'; + $this->_db->setQuery( $query ); + $this->_db->query(); + + $query = 'SELECT id FROM #__menu WHERE parent IN ('.$ids.')'; + $this->_db->setQuery( $query ); + $cids = $this->_db->loadResultArray( 0 ); + + if (!empty( $cids )) { + $this->_setSubLevel( $cids, $level + 1 ); + } + } +} diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/list.php b/oss/joomla/trunk/administrator/components/com_menus/models/list.php new file mode 100644 index 00000000..25d842f7 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/list.php @@ -0,0 +1,749 @@ +_table == null) + { + $this->_table =& JTable::getInstance( 'menu'); + } + return $this->_table; + } + + function &getItems() + { + global $mainframe; + + static $items; + + if (isset($items)) { + return $items; + } + + $db =& $this->getDBO(); + + $menutype = $mainframe->getUserStateFromRequest( "com_menus.menutype", 'menutype', 'mainmenu', 'string' ); + $filter_order = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.filter_order', 'filter_order', 'm.ordering', 'cmd' ); + $filter_order_Dir = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.filter_order_Dir', 'filter_order_Dir', 'ASC', 'word' ); + $filter_state = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.filter_state', 'filter_state', '', 'word' ); + $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg( 'list_limit' ), 'int' ); + $limitstart = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.limitstart', 'limitstart', 0, 'int' ); + $levellimit = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.levellimit', 'levellimit', 10, 'int' ); + $search = $mainframe->getUserStateFromRequest( 'com_menus.'.$menutype.'.search', 'search', '', 'string' ); + $search = JString::strtolower( $search ); + + $and = ''; + if ( $filter_state ) + { + if ( $filter_state == 'P' ) { + $and = ' AND m.published = 1'; + } else if ($filter_state == 'U' ) { + $and = ' AND m.published = 0'; + } + } + + // just in case filter_order get's messed up + if ($filter_order) { + $orderby = ' ORDER BY '.$filter_order .' '. $filter_order_Dir .', m.parent, m.ordering'; + } else { + $orderby = ' ORDER BY m.parent, m.ordering'; + } + + // select the records + // note, since this is a tree we have to do the limits code-side + if ($search) { + $query = 'SELECT m.id' . + ' FROM #__menu AS m' . + ' WHERE menutype = '.$db->Quote($menutype) . + ' AND LOWER( m.name ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ) . + $and; + $db->setQuery( $query ); + $search_rows = $db->loadResultArray(); + } + + $query = 'SELECT m.*, u.name AS editor, g.name AS groupname, c.publish_up, c.publish_down, com.name AS com_name' . + ' FROM #__menu AS m' . + ' LEFT JOIN #__users AS u ON u.id = m.checked_out' . + ' LEFT JOIN #__groups AS g ON g.id = m.access' . + ' LEFT JOIN #__content AS c ON c.id = m.componentid AND m.type = "content_typed"' . + ' LEFT JOIN #__components AS com ON com.id = m.componentid AND m.type = "component"' . + ' WHERE m.menutype = '.$db->Quote($menutype) . + ' AND m.published != -2' . + $and . + $orderby; + $db->setQuery( $query ); + $rows = $db->loadObjectList(); + + // establish the hierarchy of the menu + $children = array(); + // first pass - collect children + foreach ($rows as $v ) + { + $pt = $v->parent; + $list = @$children[$pt] ? $children[$pt] : array(); + array_push( $list, $v ); + $children[$pt] = $list; + } + // second pass - get an indent list of the items + $list = JHTML::_('menu.treerecurse', 0, '', array(), $children, max( 0, $levellimit-1 ) ); + // eventually only pick out the searched items. + if ($search) { + $list1 = array(); + + foreach ($search_rows as $sid ) + { + foreach ($list as $item) + { + if ($item->id == $sid) { + $list1[] = $item; + } + } + } + // replace full list with found items + $list = $list1; + } + + $total = count( $list ); + + jimport('joomla.html.pagination'); + $this->_pagination = new JPagination( $total, $limitstart, $limit ); + + // slice out elements based on limits + $list = array_slice( $list, $this->_pagination->limitstart, $this->_pagination->limit ); + + $i = 0; + $query = array(); + foreach ( $list as $mitem ) + { + $edit = ''; + switch ( $mitem->type ) + { + case 'separator': + $list[$i]->descrip = JText::_('Separator'); + break; + + case 'url': + $list[$i]->descrip = JText::_('URL'); + break; + + case 'menulink': + $list[$i]->descrip = JText::_('Menu Link'); + break; + + case 'component': + $list[$i]->descrip = JText::_('Component'); + $query = parse_url($list[$i]->link); + $view = array(); + if(isset($query['query'])) { + if(strpos($query['query'], '&') !== false) + { + $query['query'] = str_replace('&','&',$query['query']); + } + parse_str($query['query'], $view); + } + $list[$i]->view = $list[$i]->com_name; + if (isset($view['view'])) + { + $list[$i]->view .= ' » '.JText::_(ucfirst($view['view'])); + } + if (isset($view['layout'])) + { + $list[$i]->view .= ' / '.JText::_(ucfirst($view['layout'])); + } + if (isset($view['task']) && !isset($view['view'])) + { + $list[$i]->view .= ' :: '.JText::_(ucfirst($view['task'])); + } + break; + + default: + $list[$i]->descrip = JText::_('Unknown'); + break; + } + $i++; + } + + $items = $list; + return $items; + } + + function &getPagination() + { + if ($this->_pagination == null) { + $this->getItems(); + } + return $this->_pagination; + } + + /** + * Form for copying item(s) to a specific menu + */ + function getItemsFromRequest() + { + static $items; + + if (isset($items)) { + return $items; + } + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + if (count($cid) < 1) { + $this->setError(JText::_( 'Select an item to move')); + return false; + } + + // Query to list the selected menu items + $db =& $this->getDBO(); + $cids = implode( ',', $cid ); + $query = 'SELECT `id`, `name`' . + ' FROM `#__menu`' . + ' WHERE `id` IN ( '.$cids.' )'; + + $db->setQuery( $query ); + $items = $db->loadObjectList(); + + return $items; + } + + /** + * Gets the componet table object related to this menu item + */ + function &getComponent() + { + $id = $this->_table->componentid; + $component = & JTable::getInstance( 'component'); + $component->load( $id ); + return $component; + } + + /** + * Save the item(s) to the menu selected + */ + function copy( $items, $menu ) + { + $curr =& JTable::getInstance('menu'); + $itemref = array(); + foreach ($items as $id) + { + $curr->load( $id ); + $curr->id = NULL; + $curr->home = 0; + if ( !$curr->store() ) { + $this->setError($curr->getError()); + return false; + } + $itemref[] = array($id, $curr->id); + } + foreach ($itemref as $ref) + { + $curr->load( $ref[1] ); + if ($curr->parent!=0) { + $found = false; + foreach ( $itemref as $ref2 ) + { + if ($curr->parent == $ref2[0]) { + $curr->parent = $ref2[1]; + $found = true; + break; + } // if + } + if (!$found && $curr->menutype!=$menu) { + $curr->parent = 0; + } + } + $curr->menutype = $menu; + $curr->ordering = '9999'; + $curr->home = 0; + if ( !$curr->store() ) { + $this->setError($curr->getError()); + return false; + } + $curr->reorder( 'menutype = '.$this->_db->Quote($curr->menutype).' AND parent = '.(int) $curr->parent ); + } // foreach + + //Now, we need to rebuild sublevels... + $this->_rebuildSubLevel(); + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + function move($items, $menu) + { + // Add all children to the list + foreach ($items as $id) + { + $this->_addChildren($id, $items); + } + + $row =& $this->getTable(); + $ordering = 1000000; + $firstroot = 0; + foreach ($items as $id) { + $row->load( $id ); + + // is it moved together with his parent? + $found = false; + if ($row->parent != 0) { + foreach ($items as $idx) + { + if ($idx == $row->parent) { + $found = true; + break; + } // if + } + } + if (!$found) { + $row->parent = 0; + $row->ordering = $ordering++; + if (!$firstroot) $firstroot = $row->id; + } // if + + $row->menutype = $menu; + if ( !$row->store() ) { + $this->setError($row->getError()); + return false; + } // if + } // foreach + + if ($firstroot) { + $row->load( $firstroot ); + $row->reorder( 'menutype = '.$this->_db->Quote($row->menutype).' AND parent = '.(int) $row->parent ); + } // if + + //Rebuild sublevel + $this->_rebuildSubLevel(); + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + function toTrash($items) + { + $db =& $this->getDBO(); + $nd = $db->getNullDate(); + $state = -2; + $row =& $this->getTable(); + $default = 0; + + // Add all children to the list + foreach ($items as $id) + { + //Check if it's the default item + $row->load( $id ); + if ($row->home != 1) { + $this->_addChildren($id, $items); + } else { + unset($items[$default]); + JError::raiseWarning( 'SOME_ERROR_CODE', JText::_('You cannot trash the default menu item')); + } + $default++; + } + if (!empty($items)) { + // Sent menu items to the trash + JArrayHelper::toInteger($items, array(0)); + $where = ' WHERE (id = ' . implode( ' OR id = ', $items ) . ') AND home = 0'; + $query = 'UPDATE #__menu' . + ' SET published = '.(int) $state.', parent = 0, ordering = 0, checked_out = 0, checked_out_time = '.$db->Quote($nd) . + $where; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + } + + // clean cache + MenusHelper::cleanCache(); + + return count($items); + } + + function fromTrash($items) + { + $db =& $this->getDBO(); + $nd = $db->getNullDate(); + $state = 0; + + // Add all children to the list + foreach ($items as $id) + { + $this->_addChildren($id, $items); + } + + // Sent menu items to the trash + JArrayHelper::toInteger($items, array(0)); + $where = ' WHERE id = ' . implode( ' OR id = ', $items ); + $query = 'UPDATE #__menu' . + ' SET published = '.(int) $state.', parent = 0, ordering = 99999, checked_out = 0, checked_out_time = '.$db->Quote($nd) . + $where; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + + // clean cache (require helper because method can be called from com_trash) + require_once( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_menus'.DS.'helpers'.DS.'helper.php' ); + MenusHelper::cleanCache(); + + return count($items); + } + + /** + * Set the state of selected menu items + */ + function setHome( $item ) + { + $db =& $this->getDBO(); + + // Clear home field for all other items + $query = 'UPDATE #__menu' . + ' SET home = 0' . + ' WHERE 1'; + $db->setQuery( $query ); + if ( !$db->query() ) { + $this->setError($db->getErrorMsg()); + return false; + } + + // Set the given item to home + $query = 'UPDATE #__menu' . + ' SET home = 1' . + ' WHERE id = '.(int) $item; + $db->setQuery( $query ); + if ( !$db->query() ) { + $this->setError($db->getErrorMsg()); + return false; + } + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + /** + * Set the state of selected menu items + */ + function setItemState( $items, $state ) + { + if(is_array($items)) + { + $row =& $this->getTable(); + foreach ($items as $id) + { + $row->load( $id ); + + if ($row->home != 1) { + $row->published = $state; + + if ($state != 1) { + // Set any alias menu types to not point to unpublished menu items + $db = &$this->getDBO(); + $query = 'UPDATE #__menu SET link = 0 WHERE type = \'menulink\' AND link = '.(int)$id; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + } + + if (!$row->check()) { + $this->setError($row->getError()); + return false; + } + if (!$row->store()) { + $this->setError($row->getError()); + return false; + } + } else { + JError::raiseWarning( 'SOME_ERROR_CODE', JText::_('You cannot unpublish the default menu item')); + return false; + } + } + } + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + /** + * Set the access of selected menu items + */ + function setAccess( $items, $access ) + { + $row =& $this->getTable(); + foreach ($items as $id) + { + $row->load( $id ); + $row->access = $access; + + // Set any alias menu types to not point to unpublished menu items + $db = &$this->getDBO(); + $query = 'UPDATE #__menu SET link = 0 WHERE type = \'menulink\' AND access < '.(int)$access.' AND link = '.(int)$id; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + + if (!$row->check()) { + $this->setError($row->getError()); + return false; + } + if (!$row->store()) { + $this->setError($row->getError()); + return false; + } + } + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + function orderItem($item, $movement) + { + $row =& $this->getTable(); + $row->load( $item ); + if (!$row->move( $movement, 'menutype = '.$this->_db->Quote($row->menutype).' AND parent = '.(int) $row->parent )) { + $this->setError($row->getError()); + return false; + } + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + function setOrder($items, $menutype) + { + $total = count( $items ); + $row =& $this->getTable(); + $groupings = array(); + + $order = JRequest::getVar( 'order', array(), 'post', 'array' ); + JArrayHelper::toInteger($order); + + // update ordering values + for( $i=0; $i < $total; $i++ ) { + $row->load( $items[$i] ); + // track parents + $groupings[] = $row->parent; + if ($row->ordering != $order[$i]) { + $row->ordering = $order[$i]; + if (!$row->store()) { + $this->setError($row->getError()); + return false; + } + } // if + } // for + + // execute updateOrder for each parent group + $groupings = array_unique( $groupings ); + foreach ($groupings as $group){ + $row->reorder('menutype = '.$this->_db->Quote($menutype).' AND parent = '.(int) $group.' AND published >=0'); + } + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + /** + * Delete one or more menu items + * @param mixed int or array of id values + */ + function delete( $ids ) + { + JArrayHelper::toInteger($ids); + + if (!empty( $ids )) { + + // Add all children to the list + foreach ($ids as $id) + { + $this->_addChildren($id, $ids); + } + + $db = &$this->getDBO(); + + // Delete associated module and template mappings + $where = 'WHERE menuid = ' . implode( ' OR menuid = ', $ids ); + + $query = 'DELETE FROM #__modules_menu ' + . $where; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $menuTable->getErrorMsg() ); + return false; + } + + $query = 'DELETE FROM #__templates_menu ' + . $where; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $menuTable->getErrorMsg() ); + return false; + } + + // Set any alias menu types to not point to missing menu items + $query = 'UPDATE #__menu SET link = 0 WHERE type = \'menulink\' AND (link = '.implode( ' OR id = ', $ids ).')'; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + + // Delete the menu items + $where = 'WHERE id = ' . implode( ' OR id = ', $ids ); + + $query = 'DELETE FROM #__menu ' . $where; + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + } + + // clean cache + MenusHelper::cleanCache(); + + return true; + } + + /** + * Delete menu items by type + */ + function deleteByType( $type = '' ) + { + $db = &$this->getDBO(); + + $query = 'SELECT id' . + ' FROM #__menu' . + ' WHERE menutype = ' . $db->Quote( $type ); + $db->setQuery( $query ); + $ids = $db->loadResultArray(); + + if ($db->getErrorNum()) { + $this->setError( $db->getErrorMsg() ); + return false; + } + + return $this->delete( $ids ); + } + + function _addChildren($id, &$list) + { + // Initialize variables + $return = true; + + // Get all rows with parent of $id + $db =& $this->getDBO(); + $query = 'SELECT id' . + ' FROM #__menu' . + ' WHERE parent = '.(int) $id; + $db->setQuery( $query ); + $rows = $db->loadObjectList(); + + // Make sure there aren't any errors + if ($db->getErrorNum()) { + $this->setError($db->getErrorMsg()); + return false; + } + + // Recursively iterate through all children... kinda messy + // TODO: Cleanup this method + foreach ($rows as $row) + { + $found = false; + foreach ($list as $idx) + { + if ($idx == $row->id) { + $found = true; + break; + } + } + if (!$found) { + $list[] = $row->id; + } + $return = $this->_addChildren($row->id, $list); + } + return $return; + } + + /* + * Rebuild the sublevel field for items in the menu (if called with 2nd param = 0 or no params, it will rebuild entire menu tree's sublevel + * @param array of menu item ids to change level to + * @param int level to set the menu items to (based on parent + */ + function _rebuildSubLevel($cid = array(0), $level = 0) + { + JArrayHelper::toInteger($cid, array(0)); + $db =& $this->getDBO(); + $ids = implode( ',', $cid ); + $cids = array(); + if($level == 0) { + $query = 'UPDATE #__menu SET sublevel = 0 WHERE parent = 0'; + $db->setQuery($query); + $db->query(); + $query = 'SELECT id FROM #__menu WHERE parent = 0'; + $db->setQuery($query); + $cids = $db->loadResultArray(0); + } else { + $query = 'UPDATE #__menu SET sublevel = '.(int) $level + .' WHERE parent IN ('.$ids.')'; + $db->setQuery( $query ); + $db->query(); + $query = 'SELECT id FROM #__menu WHERE parent IN ('.$ids.')'; + $db->setQuery( $query ); + $cids = $db->loadResultArray( 0 ); + } + if (!empty( $cids )) { + $this->_rebuildSubLevel( $cids, $level + 1 ); + } + } +} diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/menutype.php b/oss/joomla/trunk/administrator/components/com_menus/models/menutype.php new file mode 100644 index 00000000..89ad3aab --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/menutype.php @@ -0,0 +1,280 @@ +_table == null) { + $this->_table = & JTable::getInstance('menuTypes'); + if ($id = JRequest::getVar('id', false, '', 'int')) { + $this->_table->load($id); + } + } + return $this->_table; + } + + /** + * Get a list of the menu records associated with the type + * + * @param string The menu type + * @return array An array of records as objects + */ + function getMenus() + { + global $mainframe; + + $menus= array(); + $db = &$this->getDBO(); + + // Preselect some aggregate data + + // Query to get published menu item counts + $query = 'SELECT a.menutype, COUNT( a.menutype ) AS num' . + ' FROM #__menu AS a' . + ' WHERE a.published = 1' . + ' GROUP BY a.menutype'; + $db->setQuery( $query ); + $published = $db->loadObjectList( 'menutype' ); + + // Query to get unpublished menu item counts + $query = 'SELECT a.menutype, COUNT( a.menutype ) AS num' . + ' FROM #__menu AS a' . + ' WHERE a.published = 0' . + ' GROUP BY a.menutype'; + $db->setQuery( $query ); + $unpublished = $db->loadObjectList( 'menutype' ); + + // Query to get trash menu item counts + $query = 'SELECT a.menutype, COUNT( a.menutype ) AS num' . + ' FROM #__menu AS a' . + ' WHERE a.published = -2' . + ' GROUP BY a.menutype'; + $db->setQuery( $query ); + $trash = $db->loadObjectList( 'menutype' ); + + $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); + $limitstart = $mainframe->getUserStateFromRequest( 'com_menus.limitstart', 'limitstart', 0, 'int' ); + + $query = 'SELECT a.*, SUM(b.home) AS home' . + ' FROM #__menu_types AS a' . + ' LEFT JOIN #__menu AS b ON b.menutype = a.menutype' . + ' GROUP BY a.id'; + $db->setQuery( $query, $limitstart, $limit ); + $menuTypes = $db->loadObjectList(); + + $total = count( $menuTypes ); + $i = 0; + for ($i = 0; $i < $total; $i++) { + $row = &$menuTypes[$i]; + + // query to get number of modules for menutype + $query = 'SELECT count( id )' . + ' FROM #__modules' . + ' WHERE module = "mod_mainmenu"' . + ' AND params LIKE '.$db->Quote('%menutype='.$row->menutype.'%'); + $db->setQuery( $query ); + $modules = $db->loadResult(); + + if ( !$modules ) { + $modules = '-'; + } + $row->modules = $modules; + $row->published = @$published[$row->menutype]->num ? $published[$row->menutype]->num : '-' ; + $row->unpublished = @$unpublished[$row->menutype]->num ? $unpublished[$row->menutype]->num : '-'; + $row->trash = @$trash[$row->menutype]->num ? $trash[$row->menutype]->num : '-'; + $menus[] = $row; + } + return $menus; + } + + /** + * Get a list of the menu records associated with the type + * + * @param string The menu type + * @return array An array of records as objects + */ + function getPagination() + { + global $mainframe; + + $menutypes = MenusHelper::getMenuTypeList(); + $total = count( $menutypes ); + $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); + $limitstart = $mainframe->getUserStateFromRequest( 'com_menus.limitstart', 'limitstart', 0, 'int' ); + + jimport('joomla.html.pagination'); + $pagination = new JPagination( $total, $limitstart, $limit ); + return $pagination; + } + + /** + * Get a list of the menu records associated with the type + * @param string The menu type + * @return array An array of records as objects + */ + function getMenuItems() + { + $table = & $this->getTable(); + if ($table->menutype == '') { + $table->menutype = JRequest::getString('menutype'); + } + + $db = &$this->getDBO(); + $query = 'SELECT a.name, a.id' . + ' FROM #__menu AS a' . + ' WHERE a.menutype = ' . $db->Quote( $table->menutype ) . + ' ORDER BY a.name'; + $db->setQuery( $query ); + $result = $db->loadObjectList(); + return $result; + } + + /** + * Get a list of the menu records associated with the type + * @param string The menu type + * @return array An array of records as objects + */ + function getModules( $type='' ) + { + if ($type == '') { + $type = $this->_table->menutype; + } + + $db = &$this->getDBO(); + $query = 'SELECT id, title, params' . + ' FROM #__modules' . + ' WHERE module = "mod_mainmenu"' . + ' AND params LIKE ' . $db->Quote( '%menutype=' . $type . '%' ); + $db->setQuery( $query ); + $temp = $db->loadObjectList(); + + $result = array(); + $n = count( $temp ); + for ($i = 0; $i < $n; $i++) + { + $params = new JParameter( $temp[$i]->params ); + if ($params->get( 'menutype' ) == $type) { + $result[] = $temp[$i]; + } + } + return $result; + } + + /** + * Checks if the menu can be deleted + * @param string The menu type + * @return boolean + */ + function canDelete( $type='' ) + { + if ($type == '') { + $type = $this->_table->menutype; + } + if ($type == 'mainmenu') { + $this->setError( JText::_( 'WARNDELMAINMENU' ) ); + return false; + } + return true; + } + + /** + * Deletes menu type and associations + * @param string The id of the menu type + * @return boolean + */ + function delete( $id = 0 ) + { + $table = &$this->getTable(); + if ($id != 0) { + $table->load( $id ); + } + + $db = &$this->getDBO(); + + // Delete Associations + if (!$this->deleteByType( $table->menutype )) { + $this->setError( $this->getError() ); + return false; + } + + // TODO: Should invoke JModuleModel::delete to delete the actual module + $moduleTable= &JTable::getInstance( 'module'); + $items = &$this->getModules( $table->menutype ); + $modulesIds = array(); + foreach ($items as $item) + { + if (!$moduleTable->delete( $item->id )) { + $this->setError( $moduleTable->getErrorMsg() ); + return false; + } + $modulesIds[] = (int) $item->id; + } + + if (count( $modulesIds )) { + $query = 'DELETE FROM #__modules_menu' . + ' WHERE menuid = '.implode( ' OR moduleid = ', $modulesIds ); + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $menuTable->getErrorMsg() ); + return false; + } + } + + $result = $table->delete(); + + return $result; + } + + /** + * Delete menu items by type + */ + function deleteByType( $type = '' ) + { + if (!$type) { + return false; + } + $db = &$this->getDBO(); + $query = 'DELETE FROM #__menu' . + ' WHERE menutype = '.$db->Quote( $type ); + $db->setQuery( $query ); + if (!$db->query()) { + $this->setError( $menuTable->getErrorMsg() ); + return false; + } + + // clean cache + MenusHelper::cleanCache(); + + return true; + } +} diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/metadata/component.xml b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/component.xml new file mode 100644 index 00000000..686d7cf3 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/component.xml @@ -0,0 +1,24 @@ + + + + Component + Component Parameters + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/metadata/index.html b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/metadata/menulink.xml b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/menulink.xml new file mode 100644 index 00000000..c4a6e28b --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/menulink.xml @@ -0,0 +1,11 @@ + + + + Menu Link + Menu Link parameters... + + + + + + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/metadata/separator.xml b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/separator.xml new file mode 100644 index 00000000..1eb0dfe7 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/separator.xml @@ -0,0 +1,11 @@ + + + + Separator + Separator parameters... + + + + + + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/models/metadata/url.xml b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/url.xml new file mode 100644 index 00000000..fb7dc359 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/models/metadata/url.xml @@ -0,0 +1,11 @@ + + + + External Link + External link parameters... + + + + + + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/index.html b/oss/joomla/trunk/administrator/components/com_menus/views/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/item/index.html b/oss/joomla/trunk/administrator/components/com_menus/views/item/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/item/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/form.php b/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/form.php new file mode 100644 index 00000000..97d44214 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/form.php @@ -0,0 +1,204 @@ + + + +
    + + + + + + +
    + +
    + + + +
    + +
    +

    name; ?>

    +
    + description; ?> +
    +
    + +
    + + + + + item->id) { ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + : + + item->id; ?> +
    + : + + +
    + : + + +
    + : + + lists->disabled;?> /> +
    + : + + menutypes, 'menutype', 'class="inputbox" size="1"', 'menutype', 'title', $this->item->menutype );?> +
    + : + + item ); ?> +
    + : + + lists->published ?> +
    + : + + item, $this->item->id ); ?> +
    + : + + item ); ?> +
    + : + + item ); ?> +
    +
    +
    + pane->startPane("menu-pane"); + echo $this->pane->startPanel(JText :: _('Parameters - Basic'), "param-page"); + echo $this->urlparams->render('urlparams'); + if(count($this->params->getParams('params'))) : + echo $this->params->render('params'); + endif; + + if(!count($this->params->getNumParams('params')) && !count($this->urlparams->getNumParams('urlparams'))) : + echo "
    ".JText::_('There are no parameters for this item')."
    "; + endif; + echo $this->pane->endPanel(); + + if($params = $this->advanced->render('params')) : + echo $this->pane->startPanel(JText :: _('Parameters - Advanced'), "advanced-page"); + echo $params; + echo $this->pane->endPanel(); + endif; + + if ($this->comp && ($params = $this->comp->render('params'))) : + echo $this->pane->startPanel(JText :: _('Parameters - Component'), "component-page"); + echo $params; + echo $this->pane->endPanel(); + endif; + + if ($this->sysparams && ($params = $this->sysparams->render('params'))) : + echo $this->pane->startPanel(JText :: _('Parameters - System'), "system-page"); + echo $params; + echo $this->pane->endPanel(); + endif; + echo $this->pane->endPane(); + ?> +
    + + item->linkfield; ?> + + + + + + + +
    diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/type.php b/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/type.php new file mode 100644 index 00000000..a0d52ab4 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/item/tmpl/type.php @@ -0,0 +1,46 @@ + + + +
    + + + + + +
    + +
    + + +
    +
    +
    + + + +
    \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/item/view.php b/oss/joomla/trunk/administrator/components/com_menus/views/item/view.php new file mode 100644 index 00000000..059de3c3 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/item/view.php @@ -0,0 +1,187 @@ +_layout = 'form'; + + $item = &$this->get('Item'); + + // clean item data + JFilterOutput::objectHTMLSafe( $item, ENT_QUOTES, '' ); + + // Set toolbar items for the page + if (!$item->id) { + JToolBarHelper::title( JText::_( 'Menu Item' ) .': [ '. JText::_( 'New' ) .' ]', 'menu.png' ); + } else { + JToolBarHelper::title( JText::_( 'Menu Item' ) .': [ '. JText::_( 'Edit' ) .' ]', 'menu.png' ); + } + JToolBarHelper::save(); + JToolBarHelper::apply(); + if ($item->id) { + // for existing items the button is renamed `close` + JToolBarHelper::cancel( 'cancelItem', 'Close' ); + } else { + JToolBarHelper::cancel('cancelItem'); + } + JToolBarHelper::help( 'screen.menus.edit' ); + + // Load component language files + $component = &$this->get('Component'); + $lang->load($component->option, JPATH_ADMINISTRATOR); + + // Initialize variables + $urlparams = $this->get( 'UrlParams' ); + $params = $this->get( 'StateParams' ); + $sysparams = $this->get( 'SystemParams' ); + $advanced = $this->get( 'AdvancedParams' ); + $component = $this->get( 'ComponentParams' ); + $name = $this->get( 'StateName' ); + $description = $this->get( 'StateDescription' ); + $menuTypes = MenusHelper::getMenuTypeList(); + $components = MenusHelper::getComponentList(); + + JHTML::_('behavior.tooltip'); + + $document = & JFactory::getDocument(); + if ($item->id) { + $document->setTitle(JText::_( 'Menu Item' ) .': ['. JText::_( 'Edit' ) .']'); + } else { + $document->setTitle(JText::_( 'Menu Item' ) .': ['. JText::_( 'New' ) .']'); + } + + // Was showing up null in some cases.... + if (!$item->published) { + $item->published = 0; + } + $lists = new stdClass(); + $lists->published = MenusHelper::Published($item); + $lists->disabled = ($item->type != 'url' ? 'readonly="true"' : ''); + + $item->expansion = null; + if ($item->type != 'url') { + $lists->disabled = 'readonly="true"'; + $item->linkfield = ''; + if (($item->id) && ($item->type == 'component') && (isset($item->linkparts['option']))) { + $item->expansion = '&expand='.trim(str_replace('com_', '', $item->linkparts['option'])); + } + } else { + $lists->disabled = null; + $item->linkfield = null; + } + + $this->assignRef('lists' , $lists); + $this->assignRef('item' , $item); + $this->assignRef('urlparams', $urlparams); + $this->assignRef('sysparams', $sysparams); + $this->assignRef('params' , $params); + $this->assignRef('advanced' , $advanced); + $this->assignRef('comp' , $component); + $this->assignRef('menutypes', $menuTypes); + $this->assignRef('name' , $name); + $this->assignRef('description', $description); + + // Add slider pane + // TODO: allowAllClose should default true in J!1.6, so remove the array when it does. + $pane = &JPane::getInstance('sliders', array('allowAllClose' => true)); + $this->assignRef('pane', $pane); + + parent::display($tpl); + } + + function type($tpl = null) + { + JRequest::setVar( 'hidemainmenu', 1 ); + + global $mainframe; + + $lang =& JFactory::getLanguage(); + $this->_layout = 'type'; + + $item = &$this->get('Item'); + + // Set toolbar items for the page + if (!$item->id) { + JToolBarHelper::title( JText::_( 'Menu Item' ) .': [ '. JText::_( 'New' ) .' ]', 'menu.png' ); + } else { + JToolBarHelper::title( JText::_( 'Change Menu Item' ), 'menu.png' ); + } + + // Set toolbar items for the page + JToolBarHelper::cancel('view'); + JToolBarHelper::help( 'screen.menus.edit' ); + + // Add scripts and stylesheets to the document + $document = & JFactory::getDocument(); + + if($lang->isRTL()){ + $document->addStyleSheet('components/com_menus/assets/type_rtl.css'); + } else { + $document->addStyleSheet('components/com_menus/assets/type.css'); + } + JHTML::_('behavior.tooltip'); + + // Load component language files + $components = MenusHelper::getComponentList(); + $n = count($components); + for($i = 0; $i < $n; $i++) + { + $path = JPATH_SITE.DS.'components'.DS.$components[$i]->option.DS.'views'; + $components[$i]->legacy = !is_dir($path); + + $lang->load($components[$i]->option, JPATH_ADMINISTRATOR); + } + + // Initialize variables + $item = &$this->get('Item'); + $expansion = &$this->get('Expansion'); + $component = &$this->get('Component'); + $name = $this->get( 'StateName' ); + $description = $this->get( 'StateDescription' ); + $menuTypes = MenusHelper::getMenuTypeList(); + + // Set document title + if ($item->id) { + $document->setTitle(JText::_( 'Menu Item' ) .': ['. JText::_( 'Edit' ) .']'); + } else { + $document->setTitle(JText::_( 'Menu Item' ) .': ['. JText::_( 'New' ) .']'); + } + + $this->assignRef('item', $item); + $this->assignRef('components', $components); + $this->assignRef('expansion', $expansion); + + parent::display($tpl); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/list/index.html b/oss/joomla/trunk/administrator/components/com_menus/views/list/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/list/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/copy.php b/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/copy.php new file mode 100644 index 00000000..f19daad4 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/copy.php @@ -0,0 +1,50 @@ + + + + +
    + + + + + + +
    + : +
    + MenuList; ?> +

    +
    + : +
    +
      + items as $item ) : ?> +
    1. name; ?>
    2. + +
    +
    + + + + + +items as $item ) : ?> + + + +
    \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/default.php b/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/default.php new file mode 100644 index 00000000..b4cc545b --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/default.php @@ -0,0 +1,130 @@ + + +
    + + + + + + +
    + : + + + + + lists['levellist']; + echo $this->lists['state']; + ?> +
    + + + + + + + + + + + + + + + + + + + + + + items ); + $rows = &$this->items; + foreach ($rows as $row) : + $access = JHTML::_('grid.access', $row, $i ); + $checked = JHTML::_('grid.checkedout', $row, $i ); + $published = JHTML::_('grid.published', $row, $i ); + ?> + "> + + + + + + + + + + + + + +
    + + + + + lists['order_Dir'], @$this->lists['order'] ); ?> + + + + lists['order_Dir'], @$this->lists['order'] ); ?> + + lists['order_Dir'], @$this->lists['order'] ); ?> + ordering) echo JHTML::_('grid.order', $this->items ); ?> + + lists['order_Dir'], @$this->lists['order'] ); ?> + + lists['order_Dir'], @$this->lists['order'] ); ?> + + lists['order_Dir'], @$this->lists['order'] ); ?> +
    + pagination->getListFooter(); ?> +
    + pagination->limitstart;?> + + + + user->get('id'), $row->checked_out ) ) : ?> + treename; ?> + + + treename; ?> + + + home == 1 ) : ?> + <?php echo JText::_( 'Default' ); ?> + +   + + + + + pagination->orderUpIcon( $i, $row->parent == 0 || $row->parent == @$rows[$i-1]->parent, 'orderup', 'Move Up', $this->ordering); ?> + pagination->orderDownIcon( $i, $n, $row->parent == 0 || $row->parent == @$rows[$i+1]->parent, 'orderdown', 'Move Down', $this->ordering ); ?> + ordering ? '' : 'disabled="disabled"'; ?> + class="text_area" style="text-align: center" /> + + + + type == 'component') ? $row->view : $row->type; ?> + + id; ?> +
    + + + + + + + + +
    \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/move.php b/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/move.php new file mode 100644 index 00000000..7e23be35 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/list/tmpl/move.php @@ -0,0 +1,52 @@ + + + + +
    + + + + + + +
    + : +
    + MenuList ?> +

    +
    + + : + +
    +
      + items as $item ) : ?> +
    1. name; ?>
    2. + +
    +
    + + + + + +items as $item ) : ?> + + + +
    diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/list/view.php b/oss/joomla/trunk/administrator/components/com_menus/views/list/view.php new file mode 100644 index 00000000..872c5b82 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/list/view.php @@ -0,0 +1,188 @@ +_layout = 'default'; + + /* + * Set toolbar items for the page + */ + $menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'string' ); + + JToolBarHelper::title( JText::_( 'MENU ITEM MANAGER' ) .': ['.$menutype.']', 'menu.png' ); + + $bar =& JToolBar::getInstance('toolbar'); + $bar->appendButton( 'Link', 'menus', 'Menus', "index.php?option=com_menus" ); + + JToolBarHelper::makeDefault( 'setdefault' ); + JToolBarHelper::publishList(); + JToolBarHelper::unpublishList(); + JToolBarHelper::customX( 'move', 'move.png', 'move_f2.png', 'Move', true ); + JToolBarHelper::customX( 'copy', 'copy.png', 'copy_f2.png', 'Copy', true ); + JToolBarHelper::trash(); + JToolBarHelper::editListX(); + JToolBarHelper::addNewX('newItem'); + JToolBarHelper::help( 'screen.menus' ); + + $document = & JFactory::getDocument(); + $document->setTitle(JText::_('View Menu Items')); + + $limitstart = JRequest::getVar('limitstart', '0', '', 'int'); + $items = &$this->get('Items'); + $pagination = &$this->get('Pagination'); + $lists = &$this->_getViewLists(); + $user = &JFactory::getUser(); + + // Ensure ampersands and double quotes are encoded in item titles + foreach ($items as $i => $item) { + $treename = $item->treename; + $treename = JFilterOutput::ampReplace($treename); + $treename = str_replace('"', '"', $treename); + $items[$i]->treename = $treename; + } + + //Ordering allowed ? + $ordering = ($lists['order'] == 'm.ordering'); + + JHTML::_('behavior.tooltip'); + + $this->assignRef('items', $items); + $this->assignRef('pagination', $pagination); + $this->assignRef('lists', $lists); + $this->assignRef('user', $user); + $this->assignRef('menutype', $menutype); + $this->assignRef('ordering', $ordering); + $this->assignRef('limitstart', $limitstart); + + parent::display($tpl); + } + + function copyForm($tpl=null) + { + global $mainframe; + + $this->_layout = 'copy'; + + /* + * Set toolbar items for the page + */ + JToolBarHelper::title( JText::_( 'Menu Items' ) . ': [ '. JText::_( 'Copy' ) .' ]' ); + JToolBarHelper::custom( 'doCopy', 'copy.png', 'copy_f2.png', 'Copy', false ); + JToolBarHelper::cancel('cancelItem'); + JToolBarHelper::help( 'screen.menus' ); + + $document = & JFactory::getDocument(); + $document->setTitle(JText::_('Copy Menu Items')); + + $menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'string' ); + + // Build the menutypes select list + $menuTypes = MenusHelper::getMenuTypes(); + foreach ( $menuTypes as $menuType ) { + $menu[] = JHTML::_('select.option', $menuType, $menuType ); + } + $MenuList = JHTML::_('select.genericlist', $menu, 'menu', 'class="inputbox" size="10"', 'value', 'text', null ); + + $items = &$this->get('ItemsFromRequest'); + + $this->assignRef('menutype', $menutype); + $this->assignRef('items', $items); + $this->assignRef('menutypes', $menuTypes); + $this->assignRef('MenuList', $MenuList); + + parent::display($tpl); + } + + function moveForm($tpl=null) + { + global $mainframe; + + $this->_layout = 'move'; + + /* + * Set toolbar items for the page + */ + JToolBarHelper::title( JText::_( 'Menu Items' ) . ': [ '. JText::_( 'Move' ) .' ]' ); + JToolBarHelper::custom( 'doMove', 'move.png', 'move_f2.png', 'Move', false ); + JToolBarHelper::cancel('cancelItem'); + JToolBarHelper::help( 'screen.menus' ); + + $document = & JFactory::getDocument(); + $document->setTitle(JText::_('Move Menu Items')); + + $menutype = $mainframe->getUserStateFromRequest( 'com_menus.menutype', 'menutype', 'mainmenu', 'string' ); + + // Build the menutypes select list + $menuTypes = MenusHelper::getMenuTypes(); + foreach ( $menuTypes as $menuType ) { + $menu[] = JHTML::_('select.option', $menuType, $menuType ); + } + $MenuList = JHTML::_('select.genericlist', $menu, 'menu', 'class="inputbox" size="10"', 'value', 'text', null ); + + $items = &$this->get('ItemsFromRequest'); + + $this->assignRef('menutype', $menutype); + $this->assignRef('items', $items); + $this->assignRef('menutypes', $menuTypes); + $this->assignRef('MenuList', $MenuList); + + parent::display($tpl); + } + + function &_getViewLists() + { + global $mainframe; + $db =& JFactory::getDBO(); + + $menutype = $mainframe->getUserStateFromRequest( "com_menus.menutype", 'menutype', 'mainmenu', 'string' ); + $filter_order = $mainframe->getUserStateFromRequest( "com_menus.$menutype.filter_order", 'filter_order', 'm.ordering', 'cmd' ); + $filter_order_Dir = $mainframe->getUserStateFromRequest( "com_menus.$menutype.filter_order_Dir", 'filter_order_Dir', 'ASC', 'word' ); + $filter_state = $mainframe->getUserStateFromRequest( "com_menus.$menutype.filter_state", 'filter_state', '', 'word' ); + $levellimit = $mainframe->getUserStateFromRequest( "com_menus.$menutype.levellimit", 'levellimit', 10, 'int' ); + $search = $mainframe->getUserStateFromRequest( "com_menus.$menutype.search", 'search', '', 'string' ); + $search = JString::strtolower( $search ); + + // level limit filter + $lists['levellist'] = JHTML::_('select.integerlist', 1, 20, 1, 'levellimit', 'size="1" onchange="document.adminForm.submit();"', $levellimit ); + + // state filter + $lists['state'] = JHTML::_('grid.state', $filter_state ); + + // table ordering + $lists['order_Dir'] = $filter_order_Dir; + $lists['order'] = $filter_order; + + // search filter + $lists['search']= $search; + + return $lists; + } +} diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/menus/index.html b/oss/joomla/trunk/administrator/components/com_menus/views/menus/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/menus/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/copy.php b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/copy.php new file mode 100644 index 00000000..d1b8122b --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/copy.php @@ -0,0 +1,63 @@ + + + +
    + + + + + + + + + + +
    + : +
    + +


    + : +
    + +

    +
    + : +
    + table->menutype; ?> +

    + : +
    +
      + items as $item) : ?> +
    1. + name; ?> +
    2. + + +
    +
     
    + + + + + +
    \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/default.php b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/default.php new file mode 100644 index 00000000..19932563 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/default.php @@ -0,0 +1,135 @@ + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + menus as $menu) : ?> + id; + $linkA = 'index.php?option=com_menus&task=view&menutype='. $menu->menutype; + ?> + "> + + + + + + + + + + + + + + +
    + + +   + + + + + + + + + + + + + + + + +
    + pagination->getListFooter(); ?> +
    + pagination->limitstart + 1 + $i; ?> + + + + + + title; ?> + + menutype; ?> + + + + + published; + ?> + + unpublished; + ?> + + trash; + ?> + + modules; + ?> + + id; + ?> +
    + + + + + +
    diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/delete.php b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/delete.php new file mode 100644 index 00000000..1733362d --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/delete.php @@ -0,0 +1,42 @@ + + + +
    +
    +
    + modules ) : ?> + : +
      + modules as $module ) : ?> +
    1. title; ?>
    2. + +
    + +
    +
    + : +
      + menuItems as $item) : ?> +
    1. name; ?>
    2. + +
    +
    +
    +
    + + + + + +
    \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/edit.php b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/edit.php new file mode 100644 index 00000000..0c695cf5 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/edit.php @@ -0,0 +1,88 @@ + + + +
    + + + + + + + + + + + + + + + isnew) : ?> + + + + + +
    + + + +
    + + + + +
    + + + + +
    + + + + +
    + + + + + +
    \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/index.html b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/menus/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_menus/views/menus/view.php b/oss/joomla/trunk/administrator/components/com_menus/views/menus/view.php new file mode 100644 index 00000000..f1ba5c36 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_menus/views/menus/view.php @@ -0,0 +1,142 @@ +_layout = 'default'; + + // Set toolbar items for the page + JToolBarHelper::title( JText::_( 'Menu Manager' ), 'menumgr.png' ); + JToolBarHelper::customX( 'copyMenu', 'copy.png', 'copy_f2.png', 'Copy', true ); + JToolBarHelper::customX( 'deleteMenu', 'delete.png', 'delete_f2.png', 'Delete', true ); + JToolBarHelper::editListX('editMenu'); + JToolBarHelper::addNewX('addMenu'); + JToolBarHelper::help( 'screen.menumanager' ); + + $document = & JFactory::getDocument(); + $document->setTitle(JText::_('View Menus')); + + $limitstart = JRequest::getVar('limitstart', '0', '', 'int'); + + $menus = &$this->get('Menus'); + $pagination = &$this->get('Pagination'); + + $this->assignRef('menus', $menus); + $this->assignRef('pagination', $pagination); + $this->assignRef('limitstart', $limitstart); + + JHTML::_('behavior.tooltip'); + + parent::display($tpl); + } + + function copyForm($tpl=null) + { + global $mainframe; + + $this->_layout = 'copy'; + + // view data + $table = $this->get('Table'); + $items = $this->get('MenuItems'); + + /* + * Set toolbar items for the page + */ + JToolBarHelper::title( JText::_( 'Copy Menu' ) ); + JToolBarHelper::custom( 'doCopyMenu', 'copy.png', 'copy_f2.png', 'Copy', false ); + JToolBarHelper::cancel(); + JToolBarHelper::help( 'screen.menumanager' ); + + $document = & JFactory::getDocument(); + $document->setTitle(JText::_('Copy Menu Items')); + + $this->assignRef('items', $items); + $this->assignRef('table', $table); + + parent::display($tpl); + } + + function deleteForm($tpl=null) + { + global $mainframe; + + $this->_layout = 'delete'; + + /* + * Set toolbar items for the page + */ + JToolBarHelper::title( JText::_( 'Menu' ) . ': [ '. JText::_( 'Delete' ) .' ]' ); + JToolBarHelper::custom( 'doDeleteMenu', 'delete.png', 'delete_f2.png', 'Delete', false ); + JToolBarHelper::cancel(); + JToolBarHelper::help( 'screen.menumanager.delete' ); + + // view data + $table = $this->get('Table'); + $modules = $this->get('Modules'); + $menuItems = $this->get('MenuItems'); + + $document = & JFactory::getDocument(); + $document->setTitle(JText::_('Confirm Delete Menu Type') . ': ' . $table->menutype ); + + + $this->assignRef('table', $table); + $this->assignRef('modules', $modules); + $this->assignRef('menuItems', $menuItems); + + parent::display($tpl); + } + + function editForm($edit,$tpl=null) + { + JRequest::setVar( 'hidemainmenu', 1 ); + + global $mainframe; + + $this->_layout = 'edit'; + if($edit) + $table = &$this->get('Table'); + else + $table=& JTable::getInstance('menuTypes'); + /* + * Set toolbar items for the page + */ + $text = ( ($table->id != 0) ? JText::_( 'Edit' ) : JText::_( 'New' ) ); + JToolBarHelper::title( JText::_( 'Menu Details' ).': [ '. $text.' ]', 'menumgr.png' ); + JToolBarHelper::custom( 'savemenu', 'save.png', 'save_f2.png', 'Save', false ); + JToolBarHelper::cancel(); + JToolBarHelper::help( 'screen.menumanager.new' ); + + $this->assignRef('row', $table); + $this->assign('isnew', ($table->id == 0)); + + JHTML::_('behavior.tooltip'); + + parent::display($tpl); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_messages/admin.messages.html.php b/oss/joomla/trunk/administrator/components/com_messages/admin.messages.html.php new file mode 100644 index 00000000..09f8cb6c --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_messages/admin.messages.html.php @@ -0,0 +1,296 @@ + +
    + + + + + + +
    + : + + + + + +
    + +
    + + + + + + + + + + + + + + + + + + state ? 'tick.png' : 'publish_x.png'; + $alt = $row->state ? JText::_( 'Read' ) : JText::_( 'Read' ); + + if ( $user->authorize( 'com_users', 'manage' ) ) { + $linkA = 'index.php?option=com_users&view=user&task=edit&cid[]='. $row->user_id_from; + $author = ''. $row->user_from .''; + } else { + $author = $row->user_from; + } + + ?> + "> + + + + + + + + + +
    + + + + + + + + + + + +
    + getListFooter(); ?> +
    + limitstart;?> + + message_id ); ?> + + + subject; ?> + + + <?php echo $alt; ?> + + + + date_time, JText::_('DATE_FORMAT_LC2')); ?> +
    +
    + + + + + + + +
    + + +
    + +
    + + + + + + + + + + + + + +
    + : + + +
    + : + + +
    + : + + + +
    +
    + + + + +
    + +
    + + + + + + + + + + + + + + + + + + +
    + : + + user_from;?> +
    + : + + date_time;?> +
    + : + + subject;?> +
    + : + +
    message, ENT_COMPAT, 'UTF-8' );?>
    +
    + + + + + + + + +
    + + +
    + + + + + + + + + + + + + + +
    + : + + +
    + : + + +
    + : + + +
    + + + + + +
    + getUserStateFromRequest( $context.'.filter_order', 'filter_order', 'a.date_time', 'cmd' ); + $filter_order_Dir = $mainframe->getUserStateFromRequest( $context.'.filter_order_Dir','filter_order_Dir', 'DESC', 'word' ); + $filter_state = $mainframe->getUserStateFromRequest( $context.'.filter_state', 'filter_state', '', 'word' ); + $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); + $limitstart = $mainframe->getUserStateFromRequest( $context.'.limitstart', 'limitstart', 0, 'int' ); + $search = $mainframe->getUserStateFromRequest( $context.'search', 'search', '', 'string' ); + $search = JString::strtolower( $search ); + + $where = array(); + $where[] = ' a.user_id_to='.(int) $user->get('id'); + + if ($search != '') { + $searchEscaped = $db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ); + $where[] = '( a.subject LIKE '.$searchEscaped.' OR a.message LIKE '.$searchEscaped.' )'; + } + if ( $filter_state ) { + if ( $filter_state == 'P' ) { + $where[] = 'a.state = 1'; + } else if ($filter_state == 'U' ) { + $where[] = 'a.state = 0'; + } + } + + $where = ( count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '' ); + $orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', a.date_time DESC'; + + $query = 'SELECT COUNT(*)' + . ' FROM #__messages AS a' + . ' INNER JOIN #__users AS u ON u.id = a.user_id_from' + . $where + ; + $db->setQuery( $query ); + $total = $db->loadResult(); + + jimport('joomla.html.pagination'); + $pageNav = new JPagination( $total, $limitstart, $limit ); + + $query = 'SELECT a.*, u.name AS user_from' + . ' FROM #__messages AS a' + . ' INNER JOIN #__users AS u ON u.id = a.user_id_from' + . $where + . $orderby + ; + $db->setQuery( $query, $pageNav->limitstart, $pageNav->limit ); + $rows = $db->loadObjectList(); + if ($db->getErrorNum()) { + echo $db->stderr(); + return false; + } + + // state filter + $lists['state'] = JHTML::_('grid.state', $filter_state, 'Read', 'Unread' ); + + // table ordering + $lists['order_Dir'] = $filter_order_Dir; + $lists['order'] = $filter_order; + + // search filter + $lists['search']= $search; + + HTML_messages::showMessages( $rows, $pageNav, $option, $lists ); +} + +function editConfig( $option ) +{ + $db =& JFactory::getDBO(); + $user =& JFactory::getUser(); + + $query = 'SELECT cfg_name, cfg_value' + . ' FROM #__messages_cfg' + . ' WHERE user_id = '.(int) $user->get('id') + ; + $db->setQuery( $query ); + $data = $db->loadObjectList( 'cfg_name' ); + + // initialize values if they do not exist + if (!isset($data['lock']->cfg_value)) { + $data['lock']->cfg_value = 0; + } + if (!isset($data['mail_on_new']->cfg_value)) { + $data['mail_on_new']->cfg_value = 0; + } + if (!isset($data['auto_purge']->cfg_value)) { + $data['auto_purge']->cfg_value = 7; + } + + $vars = array(); + $vars['lock'] = JHTML::_('select.booleanlist', "vars[lock]", '', $data['lock']->cfg_value, 'yes', 'no', 'varslock' ); + $vars['mail_on_new'] = JHTML::_('select.booleanlist', "vars[mail_on_new]", '', $data['mail_on_new']->cfg_value, 'yes', 'no', 'varsmail_on_new' ); + $vars['auto_purge'] = $data['auto_purge']->cfg_value; + + HTML_messages::editConfig( $vars, $option ); + +} + +function saveConfig( $option ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $user =& JFactory::getUser(); + + $query = 'DELETE FROM #__messages_cfg' + . ' WHERE user_id = '.(int) $user->get('id') + ; + $db->setQuery( $query ); + $db->query(); + + $vars = JRequest::getVar( 'vars', array(), 'post', 'array' ); + foreach ($vars as $k=>$v) { + $v = $db->getEscaped( $v ); + $query = 'INSERT INTO #__messages_cfg' + . ' ( user_id, cfg_name, cfg_value )' + . ' VALUES ( '.(int) $user->get('id').', '.$db->Quote($k).', '.$db->Quote($v).' )' + ; + $db->setQuery( $query ); + $db->query(); + } + $mainframe->redirect( "index.php?option=$option" ); +} + +function newMessage( $option, $user, $subject ) +{ + $db =& JFactory::getDBO(); + $acl =& JFactory::getACL(); + + // get available backend user groups + $gid = $acl->get_group_id( 'Public Backend', 'ARO' ); + $gids = $acl->get_group_children( $gid, 'ARO', 'RECURSE' ); + JArrayHelper::toInteger($gids, array(0)); + $gids = implode( ',', $gids ); + + // get list of usernames + $recipients = array( JHTML::_('select.option', '0', '- '. JText::_( 'Select User' ) .' -' ) ); + $query = 'SELECT id AS value, username AS text FROM #__users' + . ' WHERE gid IN ( '.$gids.' )' + . ' ORDER BY name' + ; + $db->setQuery( $query ); + $recipients = array_merge( $recipients, $db->loadObjectList() ); + + $recipientslist = + JHTML::_('select.genericlist', $recipients, 'user_id_to', 'class="inputbox" size="1"', 'value', 'text', $user); + HTML_messages::newMessage($option, $recipientslist, $subject ); +} + +function saveMessage( $option ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + require_once(dirname(__FILE__).DS.'tables'.DS.'message.php'); + + $db =& JFactory::getDBO(); + $row = new TableMessage( $db ); + + if (!$row->bind(JRequest::get('post'))) { + JError::raiseError(500, $row->getError() ); + } + + if (!$row->check()) { + JError::raiseError(500, $row->getError() ); + } + + if (!$row->send()) { + $mainframe->redirect( "index.php?option=com_messages", $row->getError() ); + } + $mainframe->redirect( "index.php?option=com_messages" ); +} + +function viewMessage( $uid='0', $option ) +{ + $db =& JFactory::getDBO(); + + $query = 'SELECT a.*, u.name AS user_from' + . ' FROM #__messages AS a' + . ' INNER JOIN #__users AS u ON u.id = a.user_id_from' + . ' WHERE a.message_id = '.(int) $uid + . ' ORDER BY date_time DESC' + ; + $db->setQuery( $query ); + $row = $db->loadObject(); + + $query = 'UPDATE #__messages' + . ' SET state = 1' + . ' WHERE message_id = '.(int) $uid + ; + $db->setQuery( $query ); + $db->query(); + + HTML_messages::viewMessage( $row, $option ); +} + +function removeMessage( $cid, $option ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + + JArrayHelper::toInteger($cid); + + if (count( $cid ) < 1) { + JError::raiseError(500, JText::_( 'Select an item to delete' ) ); + } + + if (count( $cid )) + { + $cids = implode( ',', $cid ); + $query = 'DELETE FROM #__messages' + . ' WHERE message_id IN ( '. $cids .' )' + ; + $db->setQuery( $query ); + if (!$db->query()) { + echo "\n"; + } + } + + $limit = JRequest::getVar( 'limit', 10, '', 'int' ); + $limitstart = JRequest::getVar( 'limitstart', 0, '', 'int' ); + + $mainframe->redirect( 'index.php?option='.$option.'&limit='.$limit.'&limitstart='.$limitstart ); +} diff --git a/oss/joomla/trunk/administrator/components/com_messages/index.html b/oss/joomla/trunk/administrator/components/com_messages/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_messages/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_messages/messages.xml b/oss/joomla/trunk/administrator/components/com_messages/messages.xml new file mode 100644 index 00000000..72497e2b --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_messages/messages.xml @@ -0,0 +1,12 @@ + + + Messaging + Joomla! Project + 2006 + Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + admin@joomla.org + www.joomla.org + 1.5.0 + Messaging + diff --git a/oss/joomla/trunk/administrator/components/com_messages/tables/index.html b/oss/joomla/trunk/administrator/components/com_messages/tables/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_messages/tables/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_messages/tables/message.php b/oss/joomla/trunk/administrator/components/com_messages/tables/message.php new file mode 100644 index 00000000..4cfbcd53 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_messages/tables/message.php @@ -0,0 +1,187 @@ +user_id_from; + $toId = $toId ? $toId : $this->user_id_to; + $subject = $subject ? $subject : $this->subject; + $message = $message ? $message : $this->message; + } + + $query = 'SELECT cfg_name, cfg_value' . + ' FROM #__messages_cfg' . + ' WHERE user_id = '.(int) $toId; + $db->setQuery($query); + + $config = $db->loadObjectList('cfg_name'); + $locked = @ $config['lock']->cfg_value; + $domail = @ $config['mail_on_new']->cfg_value; + + if (!$locked) + { + $this->user_id_from = $fromId; + $this->user_id_to = $toId; + $this->subject = $subject; + $this->message = $message; + $date =& JFactory::getDate(); + $this->date_time = $date->toMySQL(); + + if ($this->store()) + { + if ($domail) + { + $query = 'SELECT name, email' . + ' FROM #__users' . + ' WHERE id = '.(int) $fromId; + $db->setQuery($query); + $fromObject = $db->loadObject(); + $fromname = $fromObject->name; + $mailfrom = $fromObject->email; + $siteURL = JURI::base(); + $sitename = $mainframe->getCfg( 'sitename' ); + + $query = 'SELECT email' . + ' FROM #__users' . + ' WHERE id = '.(int) $toId; + $db->setQuery($query); + $recipient = $db->loadResult(); + + $subject = sprintf (JText::_('A new private message has arrived'), $sitename); + $msg = sprintf (JText::_('Please login to read your message'), $siteURL); + + JUtility::sendMail($mailfrom, $fromname, $recipient, $subject, $msg); + } + return true; + } + } + else + { + if (is_object($this)) { + $this->setError(JText::_('MESSAGE_FAILED')); + } + } + return false; + } +} diff --git a/oss/joomla/trunk/administrator/components/com_messages/toolbar.messages.html.php b/oss/joomla/trunk/administrator/components/com_messages/toolbar.messages.html.php new file mode 100644 index 00000000..e9c072bd --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_messages/toolbar.messages.html.php @@ -0,0 +1,55 @@ + +
    + + + + + + +
    + : + + + + + +
    + + + + + + + + + + + id == 0 ) { + ?> + + + + + + + + + + + + + + + id .'&task=edit&cid[]='. $row->id ); + + $access = JHTML::_('grid.access', $row, $i ); + $checked = JHTML::_('grid.checkedout', $row, $i ); + $published = JHTML::_('grid.published', $row, $i ); + ?> + "> + + + + + + id == 0 ) { + ?> + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + getListFooter(); ?> +
    + getRowOffset( $i ); ?> + + + + get ('id'), $row->checked_out ) ) { + echo $row->title; + } else { + ?> + + + title; ?> + + + + + + orderUpIcon( $i, ($row->position == @$rows[$i-1]->position), 'orderup', 'Move Up', $ordering ); ?> + orderDownIcon( $i, $n, ($row->position == @$rows[$i+1]->position),'orderdown', 'Move Down', $ordering ); ?> + + class="text_area" style="text-align: center" /> + + + + position; ?> + + pages )) { + echo JText::_( 'None' ); + } else if ($row->pages > 0) { + echo JText::_( 'Varies' ); + } else { + echo JText::_( 'All' ); + } + ?> + + module ? $row->module : JText::_( 'User' );?> + + id;?> +
    + + + + + + + + +
    + $row is passed with the id + * property set to 0. + * @param JTableCategory The category object + * @param array

    The modules of the left side. The array elements are in the form + * $leftorder[order] = label + * where order is the module order from the db table and label is a + * text label associciated with the order.

    + * @param array See notes for leftorder + * @param array An array of select lists + * @param object Parameters + */ + function edit( &$model, &$row, &$orders2, &$lists, &$params, $client ) + { + JRequest::setVar( 'hidemainmenu', 1 ); + + // clean item data + JFilterOutput::objectHTMLSafe( $row, ENT_QUOTES, 'content' ); + + // Check for component metadata.xml file + //$path = JApplicationHelper::getPath( 'mod'.$client->id.'_xml', $row->module ); + //$params = new JParameter( $row->params, $path ); + $document =& JFactory::getDocument(); + + JHTML::_('behavior.combobox'); + + jimport('joomla.html.pane'); + // TODO: allowAllClose should default true in J!1.6, so remove the array when it does. + $pane = &JPane::getInstance('sliders', array('allowAllClose' => true)); + $editor =& JFactory::getEditor(); + + JHTML::_('behavior.tooltip'); + ?> + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + : + + + module); ?> + +
    + + + +
    + : + + +
    + : + + +
    + + + + + +
    + + + +
    + + + +
    + : + + id; ?> +
    + : + + description); ?> +
    +
    +
    + + + + + + + + + + + +
    + : + + client_id != 1) : ?> + pages == 'all') { ?> + + + + pages == 'none') { ?> + + + + + + + + + +
    + : + + +
    + client_id != 1) : ?> + pages == 'all') { ?> + + pages == 'none') { ?> + + + + +
    +
    + +
    +
    + + + startPane("menu-pane"); + echo $pane->startPanel(JText :: _('Module Parameters'), "param-page"); + $p = $params; + if($params = $p->render('params')) : + echo $params; + else : + echo "
    ".JText::_('There are no parameters for this item')."
    "; + endif; + echo $pane->endPanel(); + + if ($p->getNumParams('advanced')) { + echo $pane->startPanel(JText :: _('Advanced Parameters'), "advanced-page"); + if($params = $p->render('params', 'advanced')) : + echo $params; + else : + echo "
    ".JText::_('There are no advanced parameters for this item')."
    "; + endif; + echo $pane->endPanel(); + } + + if ($p->getNumParams('legacy')) { + echo $pane->startPanel(JText :: _('Legacy Parameters'), "legacy-page"); + if($params = $p->render('params', 'legacy')) : + echo $params; + else : + echo "
    ".JText::_('There are no legacy parameters for this item')."
    "; + endif; + echo $pane->endPanel(); + } + + + if ($p->getNumParams('other')) { + echo $pane->startPanel(JText :: _('Other Parameters'), "other-page"); + if($params = $p->render('params', 'other')) : + echo $params; + else : + echo "
    ".JText::_('There are no other parameters for this item')."
    "; + endif; + echo $pane->endPanel(); + } + echo $pane->endPane(); + ?> +
    +
    +
    + + module || $row->module == 'custom' || $row->module == 'mod_custom' ) { + ?> +
    + + + display( 'content', $row->content, '100%', '400', '60', '20', array('pagebreak', 'readmore') ) ; + ?> + +
    + + + + + + + + + + +
    + + + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + + = $count) : + ?> + + module . '&created=1&client=' . $client->id; + ?> + + + + + +
    + +
      +
      + + name, ENT_QUOTES, 'UTF-8'); ?> +
    + + + + + + + +
    + authorize( 'com_modules', 'manage' )) { + $mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') ); +} + +// Require the base controller +require_once (JPATH_COMPONENT.DS.'controller.php'); + +// Create the controller +$controller = new ModulesController( array( 'default_task' => 'view' )); + +// Perform the Request task +$controller->execute( JRequest::getCmd('task', 'view') ); + +// Redirect if set by the controller +$controller->redirect(); diff --git a/oss/joomla/trunk/administrator/components/com_modules/controller.php b/oss/joomla/trunk/administrator/components/com_modules/controller.php new file mode 100644 index 00000000..2ae42ac4 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/controller.php @@ -0,0 +1,830 @@ +registerTask( 'apply', 'save' ); + $this->registerTask( 'unpublish', 'publish' ); + $this->registerTask( 'orderup', 'reorder' ); + $this->registerTask( 'orderdown', 'reorder' ); + $this->registerTask( 'accesspublic', 'access' ); + $this->registerTask( 'accessregistered','access' ); + $this->registerTask( 'accessspecial', 'access' ); + } + + /** + * Compiles a list of installed or defined modules + */ + function view() + { + global $mainframe; + + // Initialize some variables + $db =& JFactory::getDBO(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $option = 'com_modules'; + + $filter_order = $mainframe->getUserStateFromRequest( $option.'filter_order', 'filter_order', 'm.position', 'cmd' ); + $filter_order_Dir = $mainframe->getUserStateFromRequest( $option.'filter_order_Dir', 'filter_order_Dir', '', 'word' ); + $filter_state = $mainframe->getUserStateFromRequest( $option.'filter_state', 'filter_state', '', 'word' ); + $filter_position = $mainframe->getUserStateFromRequest( $option.'filter_position', 'filter_position', '', 'cmd' ); + $filter_type = $mainframe->getUserStateFromRequest( $option.'filter_type', 'filter_type', '', 'cmd' ); + $filter_assigned = $mainframe->getUserStateFromRequest( $option.'filter_assigned', 'filter_assigned', '', 'cmd' ); + $search = $mainframe->getUserStateFromRequest( $option.'search', 'search', '', 'string' ); + $search = JString::strtolower( $search ); + + $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); + $limitstart = $mainframe->getUserStateFromRequest( $option.'.limitstart', 'limitstart', 0, 'int' ); + + $where[] = 'm.client_id = '.(int) $client->id; + + $joins[] = 'LEFT JOIN #__users AS u ON u.id = m.checked_out'; + $joins[] = 'LEFT JOIN #__groups AS g ON g.id = m.access'; + $joins[] = 'LEFT JOIN #__modules_menu AS mm ON mm.moduleid = m.id'; + + // used by filter + if ( $filter_assigned ) { + $joins[] = 'LEFT JOIN #__templates_menu AS t ON t.menuid = mm.menuid'; + $where[] = 't.template = '.$db->Quote($filter_assigned); + } + if ( $filter_position ) { + $where[] = 'm.position = '.$db->Quote($filter_position); + } + if ( $filter_type ) { + $where[] = 'm.module = '.$db->Quote($filter_type); + } + if ( $search ) { + $where[] = 'LOWER( m.title ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ); + } + if ( $filter_state ) { + if ( $filter_state == 'P' ) { + $where[] = 'm.published = 1'; + } else if ($filter_state == 'U' ) { + $where[] = 'm.published = 0'; + } + } + + $where = ' WHERE ' . implode( ' AND ', $where ); + $join = ' ' . implode( ' ', $joins ); + if ($filter_order == 'm.ordering') { + $orderby = ' ORDER BY m.position, m.ordering '. $filter_order_Dir; + } else { + $orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', m.ordering ASC'; + } + + // get the total number of records + $query = 'SELECT COUNT(DISTINCT m.id)' + . ' FROM #__modules AS m' + . $join + . $where + ; + $db->setQuery( $query ); + $total = $db->loadResult(); + + jimport('joomla.html.pagination'); + $pageNav = new JPagination( $total, $limitstart, $limit ); + + $query = 'SELECT m.*, u.name AS editor, g.name AS groupname, MIN(mm.menuid) AS pages' + . ' FROM #__modules AS m' + . $join + . $where + . ' GROUP BY m.id' + . $orderby + ; + $db->setQuery( $query, $pageNav->limitstart, $pageNav->limit ); + $rows = $db->loadObjectList(); + if ($db->getErrorNum()) { + echo $db->stderr(); + return false; + } + + // get list of Positions for dropdown filter + $query = 'SELECT m.position AS value, m.position AS text' + . ' FROM #__modules as m' + . ' WHERE m.client_id = '.(int) $client->id + . ' GROUP BY m.position' + . ' ORDER BY m.position' + ; + $positions[] = JHTML::_('select.option', '0', '- '. JText::_( 'Select Position' ) .' -' ); + $db->setQuery( $query ); + $positions = array_merge( $positions, $db->loadObjectList() ); + $lists['position'] = JHTML::_('select.genericlist', $positions, 'filter_position', 'class="inputbox" size="1" onchange="this.form.submit()"', 'value', 'text', "$filter_position" ); + + // get list of Positions for dropdown filter + $query = 'SELECT module AS value, module AS text' + . ' FROM #__modules' + . ' WHERE client_id = '.(int) $client->id + . ' GROUP BY module' + . ' ORDER BY module' + ; + $db->setQuery( $query ); + $types[] = JHTML::_('select.option', '0', '- '. JText::_( 'Select Type' ) .' -' ); + $types = array_merge( $types, $db->loadObjectList() ); + $lists['type'] = JHTML::_('select.genericlist', $types, 'filter_type', 'class="inputbox" size="1" onchange="this.form.submit()"', 'value', 'text', "$filter_type" ); + + // state filter + $lists['state'] = JHTML::_('grid.state', $filter_state ); + + // template assignment filter + $query = 'SELECT DISTINCT(template) AS text, template AS value'. + ' FROM #__templates_menu' . + ' WHERE client_id = '.(int) $client->id; + $db->setQuery( $query ); + $assigned[] = JHTML::_('select.option', '0', '- '. JText::_( 'Select Template' ) .' -' ); + $assigned = array_merge( $assigned, $db->loadObjectList() ); + $lists['assigned'] = JHTML::_('select.genericlist', $assigned, 'filter_assigned', 'class="inputbox" size="1" onchange="this.form.submit()"', 'value', 'text', "$filter_assigned" ); + + // table ordering + $lists['order_Dir'] = $filter_order_Dir; + $lists['order'] = $filter_order; + + // search filter + $lists['search']= $search; + + require_once( JApplicationHelper::getPath( 'admin_html' ) ); + HTML_modules::view( $rows, $client, $pageNav, $lists ); + } + + /** + * Compiles information to add or edit a module + * @param string The current GET/POST option + * @param integer The unique id of the record to edit + */ + function copy() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize some variables + $db =& JFactory::getDBO(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + $n = count( $cid ); + + if ($n == 0) { + return JError::raiseWarning( 500, JText::_( 'No items selected' ) ); + } + + $row =& JTable::getInstance('module'); + $tuples = array(); + + foreach ($cid as $id) + { + // load the row from the db table + $row->load( (int) $id ); + $row->title = JText::sprintf( 'Copy of', $row->title ); + $row->id = 0; + $row->iscore = 0; + $row->published = 0; + + if (!$row->check()) { + return JError::raiseWarning( 500, $row->getError() ); + } + if (!$row->store()) { + return JError::raiseWarning( 500, $row->getError() ); + } + $row->checkin(); + + $row->reorder( 'position='.$db->Quote( $row->position ).' AND client_id='.(int) $client->id ); + + $query = 'SELECT menuid' + . ' FROM #__modules_menu' + . ' WHERE moduleid = '.(int) $cid[0] + ; + $db->setQuery( $query ); + $rows = $db->loadResultArray(); + + foreach ($rows as $menuid) { + $tuples[] = '('.(int) $row->id.','.(int) $menuid.')'; + } + } + + if (!empty( $tuples )) + { + // Module-Menu Mapping: Do it in one query + $query = 'INSERT INTO #__modules_menu (moduleid,menuid) VALUES '.implode( ',', $tuples ); + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseWarning( 500, $db->getError() ); + } + } + + $msg = JText::sprintf( 'Items Copied', $n ); + $this->setRedirect( 'index.php?option=com_modules&client='. $client->id, $msg ); + } + + /** + * Saves the module after an edit form submit + */ + function save() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + global $mainframe; + + // Initialize some variables + $db =& JFactory::getDBO(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + + $post = JRequest::get( 'post' ); + // fix up special html fields + $post['content'] = JRequest::getVar( 'content', '', 'post', 'string', JREQUEST_ALLOWRAW ); + $post['client_id'] = $client->id; + + $row =& JTable::getInstance('module'); + + if (!$row->bind( $post, 'selections' )) { + return JError::raiseWarning( 500, $row->getError() ); + } + + if (!$row->check()) { + return JError::raiseWarning( 500, $row->getError() ); + } + + // if new item, order last in appropriate group + if (!$row->id) { + $where = 'position='.$db->Quote( $row->position ).' AND client_id='.(int) $client->id ; + $row->ordering = $row->getNextOrder( $where ); + } + + if (!$row->store()) { + return JError::raiseWarning( 500, $row->getError() ); + } + $row->checkin(); + + $menus = JRequest::getVar( 'menus', '', 'post', 'word' ); + $selections = JRequest::getVar( 'selections', array(), 'post', 'array' ); + JArrayHelper::toInteger($selections); + + // delete old module to menu item associations + $query = 'DELETE FROM #__modules_menu' + . ' WHERE moduleid = '.(int) $row->id + ; + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseWarning( 500, $db->getError() ); + } + + // check needed to stop a module being assigned to `All` + // and other menu items resulting in a module being displayed twice + if ( $menus == 'all' ) { + // assign new module to `all` menu item associations + $query = 'INSERT INTO #__modules_menu' + . ' SET moduleid = '.(int) $row->id.' , menuid = 0' + ; + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseWarning( 500, $db->getError() ); + } + } + else + { + foreach ($selections as $menuid) + { + // this check for the blank spaces in the select box that have been added for cosmetic reasons + if ( (int) $menuid >= 0 ) { + // assign new module to menu item associations + $query = 'INSERT INTO #__modules_menu' + . ' SET moduleid = '.(int) $row->id .', menuid = '.(int) $menuid + ; + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseWarning( 500, $db->getError() ); + } + } + } + } + + // clean cache for all 3 front-end user groups (guest, reg, special) + $cache =& JFactory::getCache(); + $cache->remove($row->id . '0', $row->module); + $cache->remove($row->id . '1', $row->module); + $cache->remove($row->id . '2', $row->module); + // clean content cache because of loadposition plugin + $cache->clean( 'com_content' ); + + $this->setMessage( JText::_( 'Item saved' ) ); + switch ($this->getTask()) + { + case 'apply': + $this->setRedirect( 'index.php?option=com_modules&client='. $client->id .'&task=edit&id='. $row->id ); + break; + } + } + + /** + * Compiles information to add or edit a module + * @param string The current GET/POST option + * @param integer The unique id of the record to edit + */ + function edit( ) + { + // Initialize some variables + $db =& JFactory::getDBO(); + $user =& JFactory::getUser(); + + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $module = JRequest::getVar( 'module', '', '', 'cmd' ); + $id = JRequest::getVar( 'id', 0, 'method', 'int' ); + $cid = JRequest::getVar( 'cid', array( $id ), 'method', 'array' ); + JArrayHelper::toInteger($cid, array(0)); + + $model = &$this->getModel('module'); + $model->setState( 'id', $cid[0] ); + $model->setState( 'clientId', $client->id ); + + $lists = array(); + $row =& JTable::getInstance('module'); + // load the row from the db table + $row->load( (int) $cid[0] ); + // fail if checked out not by 'me' + if ($row->isCheckedOut( $user->get('id') )) { + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + return JError::raiseWarning( 500, JText::sprintf( 'DESCBEINGEDITTED', JText::_( 'The module' ), $row->title ) ); + } + + $row->content = htmlspecialchars($row->content, ENT_COMPAT, 'UTF-8'); + + if ( $cid[0] ) { + $row->checkout( $user->get('id') ); + } + // if a new record we must still prime the JTableModel object with a default + // position and the order; also add an extra item to the order list to + // place the 'new' record in last position if desired + if ($cid[0] == 0) { + $row->position = 'left'; + $row->showtitle = true; + $row->published = 1; + //$row->ordering = $l; + + $row->module = $module; + } + + if ($client->id == 1) + { + $where = 'client_id = 1'; + $lists['client_id'] = 1; + $path = 'mod1_xml'; + } + else + { + $where = 'client_id = 0'; + $lists['client_id'] = 0; + $path = 'mod0_xml'; + } + + $query = 'SELECT position, ordering, showtitle, title' + . ' FROM #__modules' + . ' WHERE '. $where + . ' ORDER BY ordering' + ; + $db->setQuery( $query ); + $orders = $db->loadObjectList(); + if ($db->getErrorNum()) { + echo $db->stderr(); + return false; + } + + $orders2 = array(); + + $l = 0; + $r = 0; + for ($i=0, $n=count( $orders ); $i < $n; $i++) { + $ord = 0; + if (array_key_exists( $orders[$i]->position, $orders2 )) { + $ord =count( array_keys( $orders2[$orders[$i]->position] ) ) + 1; + } + + $orders2[$orders[$i]->position][] = JHTML::_('select.option', $ord, $ord.'::'.addslashes( $orders[$i]->title ) ); + } + + // get selected pages for $lists['selections'] + if ( $cid[0] ) { + $query = 'SELECT menuid AS value' + . ' FROM #__modules_menu' + . ' WHERE moduleid = '.(int) $row->id + ; + $db->setQuery( $query ); + $lookup = $db->loadObjectList(); + if (empty( $lookup )) { + $lookup = array( JHTML::_('select.option', '-1' ) ); + $row->pages = 'none'; + } elseif (count($lookup) == 1 && $lookup[0]->value == 0) { + $row->pages = 'all'; + } else { + $row->pages = null; + } + } else { + $lookup = array( JHTML::_('select.option', 0, JText::_( 'All' ) ) ); + $row->pages = 'all'; + } + + if ( $row->access == 99 || $row->client_id == 1 || $lists['client_id'] ) { + $lists['access'] = 'Administrator'; + $lists['showtitle'] = 'N/A '; + $lists['selections'] = 'N/A'; + } else { + if ( $client->id == '1' ) { + $lists['access'] = 'N/A'; + $lists['selections'] = 'N/A'; + } else { + $lists['access'] = JHTML::_('list.accesslevel', $row ); + + $selections = JHTML::_('menu.linkoptions'); + $lists['selections'] = JHTML::_('select.genericlist', $selections, 'selections[]', 'class="inputbox" size="15" multiple="multiple"', 'value', 'text', $lookup, 'selections' ); + } + $lists['showtitle'] = JHTML::_('select.booleanlist', 'showtitle', 'class="inputbox"', $row->showtitle ); + } + + // build the html select list for published + $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published ); + + $row->description = ''; + + $lang =& JFactory::getLanguage(); + if ( $client->id != '1' ) { + $lang->load( trim($row->module), JPATH_SITE ); + } else { + $lang->load( trim($row->module) ); + } + + // xml file for module + if ($row->module == 'custom') { + $xmlfile = JApplicationHelper::getPath( $path, 'mod_custom' ); + } else { + $xmlfile = JApplicationHelper::getPath( $path, $row->module ); + } + + $data = JApplicationHelper::parseXMLInstallFile($xmlfile); + if ($data) + { + foreach($data as $key => $value) { + $row->$key = $value; + } + } + + // get params definitions + $params = new JParameter( $row->params, $xmlfile, 'module' ); + + require_once( JApplicationHelper::getPath( 'admin_html' ) ); + HTML_modules::edit( $model, $row, $orders2, $lists, $params, $client ); + } + + /** + * Displays a list to select the creation of a new module + */ + function add() + { + global $mainframe; + + // Initialize some variables + $modules = array(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + + // path to search for modules + if ($client->id == '1') { + $path = JPATH_ADMINISTRATOR.DS.'modules'; + $langbase = JPATH_ADMINISTRATOR; + } else { + $path = JPATH_ROOT.DS.'modules'; + $langbase = JPATH_ROOT; + } + + jimport('joomla.filesystem.folder'); + $dirs = JFolder::folders( $path ); + $lang =& JFactory::getLanguage(); + + foreach ($dirs as $dir) + { + if (substr( $dir, 0, 4 ) == 'mod_') + { + $files = JFolder::files( $path.DS.$dir, '^([_A-Za-z0-9]*)\.xml$' ); + $module = new stdClass; + $module->file = $files[0]; + $module->module = str_replace( '.xml', '', $files[0] ); + $module->path = $path.DS.$dir; + $modules[] = $module; + + $lang->load( $module->module, $langbase ); + } + } + + require_once( JPATH_COMPONENT.DS.'helpers'.DS.'xml.php' ); + ModulesHelperXML::parseXMLModuleFile( $modules, $client ); + + $n = count($modules); + for ($i = 0; $i < $n; $i++) { + $modules[$i]->name = JText::_(stripslashes($modules[$i]->name)); + } + + // sort array of objects alphabetically by name + JArrayHelper::sortObjects( $modules, 'name' ); + + require_once( JApplicationHelper::getPath( 'admin_html' ) ); + HTML_modules::add( $modules, $client ); + } + + /** + * Deletes one or more modules + * + * Also deletes associated entries in the #__module_menu table. + * @param array An array of unique category id numbers + */ + function remove() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize some variables + $db =& JFactory::getDBO(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger( $cid ); + + if (empty( $cid )) { + return JError::raiseWarning( 500, 'No items selected' ); + } + + $cids = implode( ',', $cid ); + + // pasamio: Disabled this as it breaks the uninstall ability! + /*$query = 'SELECT id, module, title, iscore, params' + . ' FROM #__modules WHERE id IN ('.$cids.')' + ; + $db->setQuery( $query ); + if (!($rows = $db->loadObjectList())) { + return JError::raiseError( 500, $db->getErrorMsg() ); + }*/ + + // remove mappings first (lest we leave orphans) + $query = 'DELETE FROM #__modules_menu' + . ' WHERE moduleid IN ( '.$cids.' )' + ; + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseError( 500, $db->getErrorMsg() ); + } + // remove module + $query = 'DELETE FROM #__modules' + . ' WHERE id IN ('.$cids.')' + ; + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseError( 500, $db->getErrorMsg() ); + } + + $this->setMessage( JText::sprintf( 'Items removed', count( $cid ) ) ); + } + + /** + * Publishes or Unpublishes one or more modules + */ + function publish() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize some variables + $db =& JFactory::getDBO(); + $user =& JFactory::getUser(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + + $cache = & JFactory::getCache(); + $cache->clean( 'com_content' ); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $task = $this->getTask(); + $publish = ($task == 'publish'); + + if (empty( $cid )) { + return JError::raiseWarning( 500, 'No items selected' ); + } + + $cids = implode( ',', $cid ); + + $query = 'UPDATE #__modules' + . ' SET published = ' . intval( $publish ) + . ' WHERE id IN ( '.$cids.' )' + . ' AND ( checked_out = 0 OR ( checked_out = '.(int) $user->get('id').' ) )' + ; + $db->setQuery( $query ); + if (!$db->query()) { + return JError::raiseWarning( 500, $db->getErrorMsg() ); + } + + if (count( $cid ) == 1) { + $row =& JTable::getInstance('module'); + $row->checkin( $cid[0] ); + } + } + + /** + * Cancels an edit operation + */ + function cancel() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize some variables + $db =& JFactory::getDBO(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + + $row =& JTable::getInstance('module'); + // ignore array elements + $row->bind(JRequest::get('post'), 'selections params' ); + $row->checkin(); + } + + /** + * Moves the order of a record + */ + function reorder() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize some variables + $db =& JFactory::getDBO(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $task = $this->getTask(); + $inc = ($task == 'orderup' ? -1 : 1); + + if (empty( $cid )) { + return JError::raiseWarning( 500, 'No items selected' ); + } + + $row =& JTable::getInstance('module'); + $row->load( (int) $cid[0] ); + + $row->move( $inc, 'position = '.$db->Quote( $row->position ).' AND client_id='.(int) $client->id ); + } + + /** + * Changes the access level of a record + */ + function access() + { + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize some variables + $db =& JFactory::getDBO(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $task = JRequest::getCmd( 'task' ); + + if (empty( $cid )) { + return JError::raiseWarning( 500, 'No items selected' ); + } + + switch ( $task ) + { + case 'accesspublic': + $access = 0; + break; + + case 'accessregistered': + $access = 1; + break; + + case 'accessspecial': + $access = 2; + break; + } + + $row =& JTable::getInstance('module'); + $row->load( (int) $cid[0] ); + $row->access = $access; + + if ( !$row->check() ) { + JError::raiseWarning( 500, $row->getError() ); + } + if ( !$row->store() ) { + JError::raiseWarning( 500, $row->getError() ); + } + } + + /** + * Saves the orders of the supplied list + */ + function saveOrder() + { + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + // Initialize some variables + $db =& JFactory::getDBO(); + $client =& JApplicationHelper::getClientInfo(JRequest::getVar('client', '0', '', 'int')); + $this->setRedirect( 'index.php?option=com_modules&client='.$client->id ); + + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + if (empty( $cid )) { + return JError::raiseWarning( 500, 'No items selected' ); + } + + $total = count( $cid ); + $row =& JTable::getInstance('module'); + $groupings = array(); + + $order = JRequest::getVar( 'order', array(0), 'post', 'array' ); + JArrayHelper::toInteger($order); + + // update ordering values + for ($i = 0; $i < $total; $i++) + { + $row->load( (int) $cid[$i] ); + // track postions + $groupings[] = $row->position; + + if ($row->ordering != $order[$i]) + { + $row->ordering = $order[$i]; + if (!$row->store()) { + return JError::raiseWarning( 500, $db->getErrorMsg() ); + } + } + } + + // execute updateOrder for each parent group + $groupings = array_unique( $groupings ); + foreach ($groupings as $group){ + $row->reorder('position = '.$db->Quote($group).' AND client_id = '.(int) $client->id); + } + + $this->setMessage (JText::_( 'New ordering saved' )); + } + + function preview() + { + $document =& JFactory::getDocument(); + $document->setTitle(JText::_('Module Preview')); + + require_once( JApplicationHelper::getPath( 'admin_html' ) ); + HTML_modules::preview( ); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_modules/helpers/index.html b/oss/joomla/trunk/administrator/components/com_modules/helpers/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/helpers/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_modules/helpers/xml.php b/oss/joomla/trunk/administrator/components/com_modules/helpers/xml.php new file mode 100644 index 00000000..c75479bb --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/helpers/xml.php @@ -0,0 +1,46 @@ + $row) + { + if ($row->module == '') + { + $rows[$i]->name = 'custom'; + $rows[$i]->module = 'custom'; + $rows[$i]->descrip = 'Custom created module, using Module Manager `New` function'; + } + else + { + $data = JApplicationHelper::parseXMLInstallFile( $row->path.DS.$row->file); + + if ( $data['type'] == 'module' ) + { + $rows[$i]->name = $data['name']; + $rows[$i]->descrip = $data['description']; + } + } + } + } +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_modules/index.html b/oss/joomla/trunk/administrator/components/com_modules/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_modules/models/index.html b/oss/joomla/trunk/administrator/components/com_modules/models/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/models/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_modules/models/module.php b/oss/joomla/trunk/administrator/components/com_modules/models/module.php new file mode 100644 index 00000000..495e0de4 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/models/module.php @@ -0,0 +1,170 @@ +getTable( 'Module', 'JTable' ); + if ($id = $this->getState( 'id' )) { + $instance->load( (int) $id ); + } + } + return $instance; + } + + function &_getXML() + { + if (!$this->_xml) + { + $clientId = $this->getState( 'clientId', 0 ); + $path = ($clientId == 1) ? 'mod1_xml' : 'mod0_xml'; + $module = &$this->getModule(); + + if ($module->module == 'custom') { + $xmlpath = JApplicationHelper::getPath( $path, 'mod_custom' ); + } else { + $xmlpath = JApplicationHelper::getPath( $path, $module->module ); + } + + if (file_exists($xmlpath)) + { + $xml =& JFactory::getXMLParser('Simple'); + if ($xml->loadFile($xmlpath)) { + $this->_xml = &$xml; + } + } + } + return $this->_xml; + } + + function &getParams() + { + // Get the state parameters + $module =& $this->getModule(); + $params = new JParameter($module->params); + + if ($xml =& $this->_getXML()) + { + if ($ps = & $xml->document->params) { + foreach ($ps as $p) + { + $params->setXML( $p ); + } + } + } + return $params; + } + + function getPositions() + { + jimport('joomla.filesystem.folder'); + + $client =& JApplicationHelper::getClientInfo($this->getState('clientId')); + if ($client === false) { + return false; + } + + //Get the database object + $db =& JFactory::getDBO(); + + // template assignment filter + $query = 'SELECT DISTINCT(template) AS text, template AS value'. + ' FROM #__templates_menu' . + ' WHERE client_id = '.(int) $client->id; + $db->setQuery( $query ); + $templates = $db->loadObjectList(); + + // Get a list of all module positions as set in the database + $query = 'SELECT DISTINCT(position)'. + ' FROM #__modules' . + ' WHERE client_id = '.(int) $client->id; + $db->setQuery( $query ); + $positions = $db->loadResultArray(); + $positions = (is_array($positions)) ? $positions : array(); + + // Get a list of all template xml files for a given application + + // Get the xml parser first + for ($i = 0, $n = count($templates); $i < $n; $i++ ) + { + $path = $client->path.DS.'templates'.DS.$templates[$i]->value; + + $xml =& JFactory::getXMLParser('Simple'); + if ($xml->loadFile($path.DS.'templateDetails.xml')) + { + $p =& $xml->document->getElementByPath('positions'); + if (is_a($p, 'JSimpleXMLElement') && count($p->children())) + { + foreach ($p->children() as $child) + { + if (!in_array($child->data(), $positions)) { + $positions[] = $child->data(); + } + } + } + } + } + + if(defined('_JLEGACY') && _JLEGACY == '1.0') + { + $positions[] = 'left'; + $positions[] = 'right'; + $positions[] = 'top'; + $positions[] = 'bottom'; + $positions[] = 'inset'; + $positions[] = 'banner'; + $positions[] = 'header'; + $positions[] = 'footer'; + $positions[] = 'newsflash'; + $positions[] = 'legals'; + $positions[] = 'pathway'; + $positions[] = 'breadcrumb'; + $positions[] = 'user1'; + $positions[] = 'user2'; + $positions[] = 'user3'; + $positions[] = 'user4'; + $positions[] = 'user5'; + $positions[] = 'user6'; + $positions[] = 'user7'; + $positions[] = 'user8'; + $positions[] = 'user9'; + $positions[] = 'advert1'; + $positions[] = 'advert2'; + $positions[] = 'advert3'; + $positions[] = 'debug'; + $positions[] = 'syndicate'; + } + + $positions = array_unique($positions); + sort($positions); + + return $positions; + } +} diff --git a/oss/joomla/trunk/administrator/components/com_modules/modules.xml b/oss/joomla/trunk/administrator/components/com_modules/modules.xml new file mode 100644 index 00000000..ec6e6321 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/modules.xml @@ -0,0 +1,12 @@ + + + Module Manager + Joomla! Project + 2006 + Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + admin@joomla.org + www.joomla.org + 1.5.0 + Module Manager + diff --git a/oss/joomla/trunk/administrator/components/com_modules/toolbar.modules.html.php b/oss/joomla/trunk/administrator/components/com_modules/toolbar.modules.html.php new file mode 100644 index 00000000..0b69be78 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/toolbar.modules.html.php @@ -0,0 +1,73 @@ +[ '. JText::_( 'New' ) .' ]', 'module.png' ); + JToolBarHelper::customX( 'edit', 'forward.png', 'forward_f2.png', 'Next', true ); + JToolBarHelper::cancel(); + if ($client->name == 'site') { + JToolBarHelper::help( 'screen.modulessite.edit' ); + } + else { + JToolBarHelper::help( 'screen.modulesadministrator.edit'); + } + } + + /** + * Draws the menu for Editing an existing module + */ + function _EDIT( $client ) + { + $moduleType = JRequest::getCmd( 'module' ); + $cid = JRequest::getVar( 'cid', array(0), '', 'array' ); + JArrayHelper::toInteger($cid, array(0)); + + JToolBarHelper::title( JText::_( 'Module' ) . ': [ '. JText::_( 'Edit' ) .' ]', 'module.png' ); + + if($moduleType == 'custom') { + JToolBarHelper::Preview('index.php?option=com_modules&tmpl=component&client='.$client->id.'&pollid='.$cid[0]); + } + + JToolBarHelper::save(); + JToolBarHelper::apply(); + if ( $cid[0] ) { + // for existing items the button is renamed `close` + JToolBarHelper::cancel( 'cancel', 'Close' ); + } else { + JToolBarHelper::cancel(); + } + JToolBarHelper::help( 'screen.modules.edit' ); + } + + function _DEFAULT($client) + { + JToolBarHelper::title( JText::_( 'Module Manager' ), 'module.png' ); + JToolBarHelper::publishList(); + JToolBarHelper::unpublishList(); + JToolBarHelper::custom( 'copy', 'copy.png', 'copy_f2.png', 'Copy', true ); + JToolBarHelper::deleteList(); + JToolBarHelper::editListX(); + JToolBarHelper::addNewX(); + JToolBarHelper::help( 'screen.modules' ); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_modules/toolbar.modules.php b/oss/joomla/trunk/administrator/components/com_modules/toolbar.modules.php new file mode 100644 index 00000000..568baa64 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_modules/toolbar.modules.php @@ -0,0 +1,36 @@ + +
    + + + + + + +
    + : + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + id ); + + $checked = JHTML::_('grid.checkedout', $row, $i ); + $published = JHTML::_('grid.published', $row, $i ); + + $row->cat_link = JRoute::_( 'index.php?option=com_categories§ion=com_newsfeeds&task=edit&cid[]='. $row->catid ); + ?> + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + +
    + getListFooter(); ?> +
    + getRowOffset( $i ); ?> + + + + get ('id'), $row->checked_out ) ) { + echo $row->name; + } else { + ?> + + + name; ?> + + + + + orderUpIcon($i, ($row->catid == @$rows[$i-1]->catid), 'orderup', 'Move Up', $ordering ); ?> + orderDownIcon($i, $n, ($row->catid == @$rows[$i+1]->catid), 'orderdown', 'Move Down', $ordering ); ?> + + class="text_area" style="text-align: center" /> + + + catname;?> + + numarticles;?> + + cache_time;?> + + id; ?> +
    + + + + + +
    + + get('gid') == 25 ) { + $visible = 1; + } + HTML_newsfeeds::writableCell( JPATH_SITE.DS.'cache', 0, ''. JText::_('Cache Directory') .' ', $visible ); + ?> +
    +
    + + + + + + + +
    + + + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + : + + +
    + + + +
    + + + +
    + + + +
    + + + + + +
    + + + +
    + + + +
    +
    +
    +
    +
    + + + + + + +
    + '. JText::_( 'Writable' ) .''; + $unwriteable = ''. JText::_( 'Unwritable' ) .''; + + echo ''; + echo ''; + echo $text; + if ( $visible ) { + echo $folder . '/'; + } + echo ''; + echo ''; + if ( $relative ) { + echo is_writable( "../$folder" ) ? $writeable : $unwriteable; + } else { + echo is_writable( "$folder" ) ? $writeable : $unwriteable; + } + echo ''; + echo ''; + } +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/admin.newsfeeds.php b/oss/joomla/trunk/administrator/components/com_newsfeeds/admin.newsfeeds.php new file mode 100644 index 00000000..e17327d5 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/admin.newsfeeds.php @@ -0,0 +1,464 @@ +authorize( 'com_newsfeeds', 'manage' )) { + $mainframe->redirect( 'index.php', JText::_('ALERTNOTAUTH') ); +} + +// Set the table directory +JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_newsfeeds'.DS.'tables'); + +require_once( JApplicationHelper::getPath( 'admin_html' ) ); + +$task = JRequest::getCmd('task'); + +switch ($task) { + + case 'add' : + editNewsFeed(false); + break; + case 'edit': + editNewsFeed(true); + break; + + case 'save': + case 'apply': + saveNewsFeed( ); + break; + + case 'publish': + publishNewsFeeds( ); + break; + + case 'unpublish': + unPublishNewsFeeds( ); + break; + + case 'remove': + removeNewsFeeds( ); + break; + + case 'cancel': + cancelNewsFeed( ); + break; + + case 'orderup': + moveUpNewsFeed( ); + break; + + case 'orderdown': + moveDownNewsFeed( ); + break; + + case 'saveorder': + saveOrder( ); + break; + + default: + showNewsFeeds( ); + break; +} + +/** +* List the records +*/ +function showNewsFeeds( ) +{ + global $mainframe, $option; + + $db =& JFactory::getDBO(); + + $filter_order = $mainframe->getUserStateFromRequest( "$option.filter_order", 'filter_order', 'a.ordering', 'cmd' ); + $filter_order_Dir = $mainframe->getUserStateFromRequest( "$option.filter_order_Dir", 'filter_order_Dir', '', 'word' ); + $filter_state = $mainframe->getUserStateFromRequest( "$option.filter_state", 'filter_state', '', 'word' ); + $filter_catid = $mainframe->getUserStateFromRequest( "$option.filter_catid", 'filter_catid', 0, 'int' ); + $search = $mainframe->getUserStateFromRequest( "$option.search", 'search', '', 'string' ); + $search = JString::strtolower( $search ); + + $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); + $limitstart = $mainframe->getUserStateFromRequest( $option.'.limitstart', 'limitstart', 0, 'int' ); + + $where = array(); + if ( $filter_catid ) { + $where[] = 'a.catid = '.(int) $filter_catid; + } + if ($search) { + $where[] = 'LOWER(a.name) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ); + } + if ( $filter_state ) { + if ( $filter_state == 'P' ) { + $where[] = 'a.published = 1'; + } else if ($filter_state == 'U' ) { + $where[] = 'a.published = 0'; + } + } + + $where = ( count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '' ); + if ($filter_order == 'a.ordering'){ + $orderby = ' ORDER BY catname, a.ordering'; + } else { + $orderby = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', catname, a.ordering'; + } + + // get the total number of records + $query = 'SELECT COUNT(*) ' + . ' FROM #__newsfeeds AS a' + . $where + ; + $db->setQuery( $query ); + $total = $db->loadResult(); + + jimport('joomla.html.pagination'); + $pageNav = new JPagination( $total, $limitstart, $limit ); + + // get the subset (based on limits) of required records + $query = 'SELECT a.*, c.title AS catname, u.name AS editor' + . ' FROM #__newsfeeds AS a' + . ' LEFT JOIN #__categories AS c ON c.id = a.catid' + . ' LEFT JOIN #__users AS u ON u.id = a.checked_out' + . $where + . $orderby + ; + $db->setQuery( $query, $pageNav->limitstart, $pageNav->limit ); + + $rows = $db->loadObjectList(); + if ($db->getErrorNum()) { + echo $db->stderr(); + return false; + } + + // build list of categories + $javascript = 'onchange="document.adminForm.submit();"'; + $lists['catid'] = JHTML::_('list.category', 'filter_catid', 'com_newsfeeds', $filter_catid, $javascript ); + + // state filter + $lists['state'] = JHTML::_('grid.state', $filter_state ); + + // table ordering + $lists['order_Dir'] = $filter_order_Dir; + $lists['order'] = $filter_order; + + // search filter + $lists['search']= $search; + + HTML_newsfeeds::showNewsFeeds( $rows, $lists, $pageNav, $option ); +} + +/** +* Creates a new or edits and existing user record +*/ +function editNewsFeed($edit) +{ + $db =& JFactory::getDBO(); + $user =& JFactory::getUser(); + + $catid = JRequest::getVar( 'catid', 0, '', 'int' ); + $cid = JRequest::getVar( 'cid', array(0), '', 'array' ); + $option = JRequest::getCmd( 'option' ); + JArrayHelper::toInteger($cid, array(0)); + + $row =& JTable::getInstance( 'newsfeed', 'Table' ); + // load the row from the db table + if($edit) + $row->load( $cid[0] ); + + if ($edit) { + // do stuff for existing records + $row->checkout( $user->get('id') ); + } else { + // do stuff for new records + $row->ordering = 0; + $row->numarticles = 5; + $row->cache_time = 3600; + $row->published = 1; + } + + // build the html select list for ordering + $query = 'SELECT a.ordering AS value, a.name AS text' + . ' FROM #__newsfeeds AS a' + . ' ORDER BY a.ordering' + ; + + if($edit) + $lists['ordering'] = JHTML::_('list.specificordering', $row, $cid[0], $query ); + else + $lists['ordering'] = JHTML::_('list.specificordering', $row, '', $query ); + + // build list of categories + $lists['category'] = JHTML::_('list.category', 'catid', $option, intval( $row->catid ) ); + // build the html select list + $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published ); + $rtl[] = JHTML::_('select.option', '0', JText::_( 'Site Language Direction' ) ); + $rtl[] = JHTML::_('select.option', '1', JText::_( 'Left to Right Direction' ) ); + $rtl[] = JHTML::_('select.option', '2', JText::_( 'Right to Left Direction' ) ); + $lists['rtl'] = JHTML::_('select.genericlist', $rtl, 'rtl', 'class="inputbox"', 'value', 'text', intval( $row->rtl ) ); + HTML_newsfeeds::editNewsFeed( $row, $lists, $option ); +} + +/** +* Saves the record from an edit form submit +*/ +function saveNewsFeed( ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $task = JRequest::getVar( 'task'); + + $row =& JTable::getInstance( 'newsfeed', 'Table' ); + if (!$row->bind(JRequest::get('post'))) { + JError::raiseError(500, $row->getError() ); + } + + // Sets rtl value when rtl checkbox ticked + $isRtl = JRequest::getInt('rtl'); + + + // pre-save checks + if (!$row->check()) { + JError::raiseError(500, $row->getError() ); + } + + // if new item, order last in appropriate group + if (!$row->id) { + $where = "catid = " . (int) $row->catid; + $row->ordering = $row->getNextOrder( $where ); + } + + // save the changes + if (!$row->store()) { + JError::raiseError(500, $row->getError() ); + } + $row->checkin(); + + switch ($task) + { + case 'apply': + $msg = JText::_( 'Changes to Newsfeed saved' ); + $link = 'index.php?option=com_newsfeeds&task=edit&cid[]='. $row->id ; + break; + + case 'save': + default: + $msg = JText::_( 'Newsfeed saved' ); + $link = 'index.php?option=com_newsfeeds'; + break; + } + + $mainframe->redirect( $link, $msg ); +} + +/** +* Publishes one or more modules +*/ +function publishNewsFeeds( ) { + changePublishNewsFeeds( 1 ); +} + +/** +* Unpublishes one or more modules +*/ +function unPublishNewsFeeds( ) { + changePublishNewsFeeds( 0 ); +} + +/** +* Publishes or Unpublishes one or more modules +* @param integer 0 if unpublishing, 1 if publishing +*/ +function changePublishNewsFeeds( $publish ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $user =& JFactory::getUser(); + + $cid = JRequest::getVar('cid', array(), '', 'array'); + $option = JRequest::getCmd('option'); + JArrayHelper::toInteger($cid); + + if (empty( $cid )) { + JError::raiseWarning( 500, 'No items selected' ); + $mainframe->redirect( 'index.php?option='. $option ); + } + + $cids = implode( ',', $cid ); + + $query = 'UPDATE #__newsfeeds' + . ' SET published = '.(int) $publish + . ' WHERE id IN ( '. $cids .' )' + . ' AND ( checked_out = 0 OR ( checked_out = '.(int) $user->get('id') .' ) )' + ; + $db->setQuery( $query ); + if (!$db->query()) { + JError::raiseError(500, $db->getErrorMsg() ); + } + + if (count( $cid ) == 1) { + $row =& JTable::getInstance( 'newsfeed', 'Table' ); + $row->checkin( $cid[0] ); + } + + $mainframe->redirect( 'index.php?option='. $option ); +} + +/** +* Removes records +*/ +function removeNewsFeeds( ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $cid = JRequest::getVar('cid', array(), '', 'array'); + $option = JRequest::getCmd('option'); + JArrayHelper::toInteger($cid); + + if (count($cid) < 1) { + JError::raiseWarning(500, JText::_( 'Select an item to delete', true ) ); + $mainframe->redirect( 'index.php?option='. $option ); + } + + $cids = implode( ',', $cid ); + $query = 'DELETE FROM #__newsfeeds' + . ' WHERE id IN ( '. $cids .' )' + ; + $db->setQuery( $query ); + if (!$db->query()) { + echo "\n"; + } + + $mainframe->redirect( 'index.php?option='. $option ); +} + +/** +* Cancels an edit operation +*/ +function cancelNewsFeed( ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $option = JRequest::getCmd('option'); + + $row =& JTable::getInstance( 'newsfeed', 'Table' ); + $row->bind(JRequest::get('post')); + $row->checkin(); + $mainframe->redirect( 'index.php?option='. $option ); +} + +/** +* Moves the record up one position +*/ +function moveUpNewsFeed( ) { + orderNewsFeed( -1 ); +} + +/** +* Moves the record down one position +*/ +function moveDownNewsFeed( ) { + orderNewsFeed( 1 ); +} + +/** +* Moves the order of a record +* @param integer The direction to reorder, +1 down, -1 up +*/ +function orderNewsFeed( $inc ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $cid = JRequest::getVar('cid', array(0), '', 'array'); + $option = JRequest::getCmd('option'); + JArrayHelper::toInteger($cid, array(0)); + + $limit = JRequest::getVar( 'limit', 0, '', 'int' ); + $limitstart = JRequest::getVar( 'limitstart', 0, '', 'int' ); + $catid = JRequest::getVar( 'catid', 0, '', 'int' ); + + $row =& JTable::getInstance( 'newsfeed', 'Table' ); + $row->load( $cid[0] ); + $row->move( $inc, 'catid = '.(int) $row->catid.' AND published != 0' ); + + $mainframe->redirect( 'index.php?option='. $option ); +} + +/** +* Saves user reordering entry +*/ +function saveOrder( ) +{ + global $mainframe; + + // Check for request forgeries + JRequest::checkToken() or jexit( 'Invalid Token' ); + + $db =& JFactory::getDBO(); + $cid = JRequest::getVar( 'cid', array(), 'post', 'array' ); + JArrayHelper::toInteger($cid); + + $total = count( $cid ); + $order = JRequest::getVar( 'order', array(0), 'post', 'array' ); + JArrayHelper::toInteger($order, array(0)); + + $row =& JTable::getInstance( 'newsfeed', 'Table' ); + $groupings = array(); + + // update ordering values + for( $i=0; $i < $total; $i++ ) { + $row->load( (int) $cid[$i] ); + // track categories + $groupings[] = $row->catid; + + if ($row->ordering != $order[$i]) { + $row->ordering = $order[$i]; + if (!$row->store()) { + JError::raiseError(500, $db->getErrorMsg() ); + } + } + } + + // execute updateOrder for each parent group + $groupings = array_unique( $groupings ); + foreach ($groupings as $group){ + $row->reorder('catid = '.(int) $group); + } + + $msg = JText::_( 'New ordering saved' ); + $mainframe->redirect( 'index.php?option=com_newsfeeds', $msg ); +} diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/config.xml b/oss/joomla/trunk/administrator/components/com_newsfeeds/config.xml new file mode 100644 index 00000000..6e85a72a --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/config.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/elements/index.html b/oss/joomla/trunk/administrator/components/com_newsfeeds/elements/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/elements/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/elements/newsfeed.php b/oss/joomla/trunk/administrator/components/com_newsfeeds/elements/newsfeed.php new file mode 100644 index 00000000..69dfb6bf --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/elements/newsfeed.php @@ -0,0 +1,59 @@ +setQuery( $query ); + $options = $db->loadObjectList( ); + + $n = count( $options ); + for ($i = 0; $i < $n; $i++) + { + $options[$i]->text = $options[$i]->title . '-' . $options[$i]->name; + } + + array_unshift($options, JHTML::_('select.option', '0', '- '.JText::_('Select Feed').' -', 'id', 'text')); + + return JHTML::_('select.genericlist', $options, ''.$control_name.'['.$name.']', 'class="inputbox"', 'id', 'text', $value, $control_name.$name ); + } +} diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/index.html b/oss/joomla/trunk/administrator/components/com_newsfeeds/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/newsfeeds.xml b/oss/joomla/trunk/administrator/components/com_newsfeeds/newsfeeds.xml new file mode 100644 index 00000000..2ec4c241 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/newsfeeds.xml @@ -0,0 +1,12 @@ + + + Newsfeeds + Joomla! Project + April 2006 + (C) 2005 - 2008 Open Source Matters. All rights reserved. + http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + admin@joomla.org + www.joomla.org + 1.5.0 + This component manages RSS/RDF newsfeeds + diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/tables/index.html b/oss/joomla/trunk/administrator/components/com_newsfeeds/tables/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/tables/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/tables/newsfeed.php b/oss/joomla/trunk/administrator/components/com_newsfeeds/tables/newsfeed.php new file mode 100644 index 00000000..36d9bf2e --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/tables/newsfeed.php @@ -0,0 +1,79 @@ +alias)) { + $this->alias = $this->name; + } + $this->alias = JFilterOutput::stringURLSafe($this->alias); + if(trim(str_replace('-','',$this->alias)) == '') { + $datenow =& JFactory::getDate(); + $this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S"); + } + + return true; + } +} diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/toolbar.newsfeeds.html.php b/oss/joomla/trunk/administrator/components/com_newsfeeds/toolbar.newsfeeds.html.php new file mode 100644 index 00000000..9cdad80d --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/toolbar.newsfeeds.html.php @@ -0,0 +1,54 @@ +[ '. $text.' ]' ); + JToolBarHelper::save(); + JToolBarHelper::apply(); + if ($edit) { + // for existing items the button is renamed `close` + JToolBarHelper::cancel( 'cancel', 'Close' ); + } else { + JToolBarHelper::cancel(); + } + JToolBarHelper::help( 'screen.newsfeeds.edit' ); + } +} \ No newline at end of file diff --git a/oss/joomla/trunk/administrator/components/com_newsfeeds/toolbar.newsfeeds.php b/oss/joomla/trunk/administrator/components/com_newsfeeds/toolbar.newsfeeds.php new file mode 100644 index 00000000..a9dada68 --- /dev/null +++ b/oss/joomla/trunk/administrator/components/com_newsfeeds/toolbar.newsfeeds.php @@ -0,0 +1,32 @@ +