Permalink
Browse files

Massive Refactoring for using namespaces (at last). Step 1.

Use class_alias to avoid unserialization issues.
Replace is_a() usage by instanceof everywhere possible to ease future refactoring.
  • Loading branch information...
1 parent 920258a commit f99f31ed3abf67c182531509bce4d2c1c9094b68 @cdujeu cdujeu committed May 6, 2016
Showing with 2,117 additions and 732 deletions.
  1. +10 −0 core/src/cmd.php
  2. +14 −4 core/src/conf/bootstrap_context.php
  3. +2 −0 core/src/core/classes/class.AJXP_Cache.php
  4. +28 −21 core/src/core/classes/class.AJXP_Controller.php
  5. +6 −2 core/src/core/classes/class.AJXP_Exception.php
  6. +6 −3 core/src/core/classes/class.AJXP_JSPacker.php
  7. +0 −107 core/src/core/classes/class.AJXP_KeyValueCache.php
  8. +35 −26 core/src/core/classes/class.AJXP_Plugin.php
  9. +18 −12 core/src/core/classes/class.AJXP_PluginsService.php
  10. +2 −0 core/src/core/classes/class.AJXP_ProgressBarCLI.php
  11. +2 −0 core/src/core/classes/class.AJXP_PromptException.php
  12. +8 −5 core/src/core/classes/class.AJXP_ShutdownScheduler.php
  13. +1 −0 core/src/core/classes/class.AJXP_UserAlertException.php
  14. +28 −19 core/src/core/classes/class.AJXP_Utils.php
  15. +6 −0 core/src/core/classes/class.AJXP_VarsFilter.php
  16. +18 −6 core/src/core/classes/class.AJXP_XMLWriter.php
  17. +4 −0 core/src/core/classes/class.AbstractTest.php
  18. +26 −11 core/src/core/classes/class.AuthService.php
  19. +4 −0 core/src/core/classes/class.CacheService.php
  20. +2 −0 core/src/core/classes/class.CaptchaProvider.php
  21. +39 −18 core/src/core/classes/class.ConfService.php
  22. +2 −0 core/src/core/classes/class.HTMLWriter.php
  23. +2 −0 core/src/core/classes/class.HttpClient.php
  24. +1 −0 core/src/core/classes/class.PydioSdkGenerator.php
  25. +4 −0 core/src/core/classes/class.SystemTextEncoding.php
  26. +2 −0 core/src/core/classes/class.UnixProcess.php
  27. +29 −0 core/src/core/classes/compat.php
  28. +2 −0 core/src/core/classes/interface.SqlTableProvider.php
  29. +6 −0 core/src/core/classes/sabredav/ajaxplorer/class.AJXP_Sabre_AuthBackendBasic.php
  30. +5 −0 core/src/core/classes/sabredav/ajaxplorer/class.AJXP_Sabre_AuthBackendDigest.php
  31. +2 −0 core/src/core/classes/sabredav/ajaxplorer/class.AJXP_Sabre_BrowserPlugin.php
  32. +4 −0 core/src/core/classes/sabredav/ajaxplorer/class.AJXP_Sabre_Collection.php
  33. +11 −3 core/src/core/classes/sabredav/ajaxplorer/class.AJXP_Sabre_Node.php
  34. +4 −0 core/src/core/classes/sabredav/ajaxplorer/class.AJXP_Sabre_NodeLeaf.php
  35. +5 −1 core/src/core/classes/sabredav/ajaxplorer/class.AJXP_Sabre_RootCollection.php
  36. +2 −0 core/src/core/tests/test.AJXPVersion.php
  37. +2 −0 core/src/core/tests/test.Client.php
  38. +5 −0 core/src/core/tests/test.PHPCLI.php
  39. +2 −0 core/src/core/tests/test.PHPDomXML.php
  40. +2 −0 core/src/core/tests/test.PHPErrorLevel.php
  41. +2 −0 core/src/core/tests/test.PHPExif.php
  42. +2 −0 core/src/core/tests/test.PHPGDVersion.php
  43. +2 −0 core/src/core/tests/test.PHPLimits.php
  44. +2 −0 core/src/core/tests/test.PHPMCrypt.php
  45. +2 −0 core/src/core/tests/test.PHPOS.php
  46. +2 −0 core/src/core/tests/test.PHPSession.php
  47. +2 −0 core/src/core/tests/test.PHPVersion.php
  48. +2 −0 core/src/core/tests/test.PHP_APC.php
  49. +2 −0 core/src/core/tests/test.PHP_OB.php
  50. +2 −0 core/src/core/tests/test.PHP_file_uploads.php
  51. +2 −0 core/src/core/tests/test.PHP_magic_quotes.php
  52. +2 −0 core/src/core/tests/test.SSLEncryption.php
  53. +2 −0 core/src/core/tests/test.ServerEncoding.php
  54. +4 −0 core/src/core/tests/test.Upload.php
  55. +5 −0 core/src/core/tests/test.UsersConfig.php
  56. +4 −0 core/src/core/tests/test.Writeability.php
  57. +2 −0 core/src/core/tests/test.Zlib.php
  58. +6 −0 core/src/dav.php
  59. +11 −2 core/src/index.php
  60. +4 −0 core/src/opencollab.php
  61. +61 −41 core/src/plugins/access.ajxp_conf/class.ajxp_confAccessDriver.php
  62. +1 −1 core/src/plugins/access.ajxp_conf/manifest.xml
  63. +4 −0 core/src/plugins/access.ajxp_home/class.HomePagePlugin.php
  64. +1 −1 core/src/plugins/access.ajxp_home/manifest.xml
  65. +17 −2 core/src/plugins/access.ajxp_user/class.UserDashboardDriver.php
  66. +1 −1 core/src/plugins/access.ajxp_user/manifest.xml
  67. +5 −0 core/src/plugins/access.demo/class.demoAccessDriver.php
  68. +2 −2 core/src/plugins/access.demo/manifest.xml
  69. +13 −5 core/src/plugins/access.dropbox/class.dropboxAccessDriver.php
  70. +12 −2 core/src/plugins/access.dropbox/class.dropboxWrapper.php
  71. +2 −2 core/src/plugins/access.dropbox/manifest.xml
  72. +52 −26 core/src/plugins/access.fs/class.fsAccessDriver.php
  73. +18 −5 core/src/plugins/access.fs/class.fsAccessWrapper.php
  74. +2 −2 core/src/plugins/access.fs/manifest.xml
  75. +17 −3 core/src/plugins/access.ftp/class.ftpAccessDriver.php
  76. +20 −6 core/src/plugins/access.ftp/class.ftpAccessWrapper.php
  77. +2 −2 core/src/plugins/access.ftp/manifest.xml
  78. +9 −1 core/src/plugins/access.imap/class.imapAccessDriver.php
  79. +17 −7 core/src/plugins/access.imap/class.imapAccessWrapper.php
  80. +4 −4 core/src/plugins/access.imap/manifest.xml
  81. +11 −3 core/src/plugins/access.inbox/class.inboxAccessDriver.php
  82. +13 −2 core/src/plugins/access.inbox/class.inboxAccessWrapper.php
  83. +2 −2 core/src/plugins/access.inbox/manifest.xml
  84. +10 −1 core/src/plugins/access.jsapi/class.jsapiAccessDriver.php
  85. +1 −1 core/src/plugins/access.jsapi/manifest.xml
  86. +16 −8 core/src/plugins/access.mysql/class.mysqlAccessDriver.php
  87. +1 −1 core/src/plugins/access.mysql/manifest.xml
  88. +15 −2 core/src/plugins/access.remote_fs/class.remote_fsAccessDriver.php
  89. +13 −2 core/src/plugins/access.remote_fs/class.remote_fsAccessWrapper.php
  90. +2 −2 core/src/plugins/access.remote_fs/manifest.xml
  91. +1 −1 core/src/plugins/access.s3/class.pydioS3Client.php
  92. +15 −5 core/src/plugins/access.s3/class.s3AccessDriver.php
  93. +12 −5 core/src/plugins/access.s3/class.s3AccessWrapper.php
  94. +7 −4 core/src/plugins/access.s3/class.s3CacheService.php
  95. +2 −2 core/src/plugins/access.s3/manifest.xml
  96. +16 −3 core/src/plugins/access.sftp/class.sftpAccessDriver.php
  97. +18 −8 core/src/plugins/access.sftp/class.sftpAccessWrapper.php
  98. +2 −2 core/src/plugins/access.sftp/manifest.xml
  99. +10 −1 core/src/plugins/access.sftp_psl/class.sftpPSLAccessDriver.php
  100. +21 −6 core/src/plugins/access.sftp_psl/class.sftpPSLAccessWrapper.php
  101. +2 −2 core/src/plugins/access.sftp_psl/manifest.xml
  102. +14 −1 core/src/plugins/access.smb/class.smbAccessDriver.php
  103. +20 −8 core/src/plugins/access.smb/class.smbAccessWrapper.php
  104. +2 −2 core/src/plugins/access.smb/manifest.xml
  105. +10 −2 core/src/plugins/access.swift/class.swiftAccessDriver.php
  106. +10 −3 core/src/plugins/access.swift/class.swiftAccessWrapper.php
  107. +2 −2 core/src/plugins/access.swift/manifest.xml
  108. +6 −5 core/src/plugins/access.webdav/src/Driver.php
  109. +8 −1 core/src/plugins/access.wms/class.WmsBrowser.php
  110. +1 −1 core/src/plugins/access.wms/manifest.xml
  111. +4 −1 core/src/plugins/action.antivirus/class.AntivirusScanner.php
  112. +4 −0 core/src/plugins/action.avatar/class.AvatarProvider.php
  113. +4 −0 core/src/plugins/action.cart/class.CartManager.php
  114. +13 −2 core/src/plugins/action.compression/class.PluginCompression.php
  115. +5 −0 core/src/plugins/action.disclaimer/class.DisclaimerProvider.php
  116. +10 −0 core/src/plugins/action.powerfs/class.PowerFSController.php
  117. +10 −1 core/src/plugins/action.scheduler/class.AjxpScheduler.php
  118. +6 −0 core/src/plugins/action.share/class.CompositeShare.php
  119. +11 −0 core/src/plugins/action.share/class.LegacyPubliclet.php
  120. +8 −0 core/src/plugins/action.share/class.MinisiteRenderer.php
  121. +3 −0 core/src/plugins/action.share/class.PublicAccessManager.php
  122. +5 −0 core/src/plugins/action.share/class.PublicletCounter.php
  123. +20 −5 core/src/plugins/action.share/class.ShareCenter.php
  124. +4 −0 core/src/plugins/action.share/class.ShareLink.php
  125. +3 −0 core/src/plugins/action.share/class.ShareMetaManager.php
  126. +13 −2 core/src/plugins/action.share/class.ShareRightsManager.php
  127. +15 −4 core/src/plugins/action.share/class.ShareStore.php
  128. +5 −2 core/src/plugins/action.skeleton/class.PluginSkeleton.php
  129. +9 −6 core/src/plugins/action.timestamp/class.TimestampCreator.php
  130. +4 −3 core/src/plugins/action.updater/class.AjaXplorerUpgrader.php
  131. +5 −0 core/src/plugins/action.updater/class.UpdateController.php
  132. +3 −0 core/src/plugins/auth.basic_http/class.basic_httpAuthDriver.php
  133. +5 −1 core/src/plugins/auth.cmsms/class.cmsmsAuthDriver.php
  134. +4 −0 core/src/plugins/auth.custom_db/class.customDbAuthDriver.php
  135. +8 −0 core/src/plugins/auth.ftp/class.ftpAuthDriver.php
  136. +6 −0 core/src/plugins/auth.ldap/class.ldapAuthDriver.php
  137. +4 −0 core/src/plugins/auth.multi/class.multiAuthDriver.php
  138. +2 −0 core/src/plugins/auth.phpbb/class.phpbbAuthDriver.php
  139. +6 −0 core/src/plugins/auth.radius/class.radiusAuthDriver.php
  140. +5 −0 core/src/plugins/auth.remote/class.remoteAuthDriver.php
  141. +2 −0 core/src/plugins/auth.remote_ajxp/class.remote_ajxpAuthDriver.php
  142. +6 −0 core/src/plugins/auth.serial/class.serialAuthDriver.php
  143. +6 −0 core/src/plugins/auth.smb/class.smbAuthDriver.php
  144. +4 −0 core/src/plugins/auth.sql/class.sqlAuthDriver.php
  145. +9 −0 core/src/plugins/authfront.cas/class.CasAuthFrontend.php
  146. +4 −0 core/src/plugins/authfront.cyphered/class.CypheredAuthFrontend.php
  147. +7 −0 core/src/plugins/authfront.duosecurity/class.DuoSecurityFrontend.php
  148. +3 −0 core/src/plugins/authfront.http_basic/class.BasicHttpAuthFrontend.php
  149. +3 −0 core/src/plugins/authfront.http_server/class.ServerHttpAuthFrontend.php
  150. +14 −7 core/src/plugins/authfront.keystore/class.KeystoreAuthFrontend.php
  151. +2 −0 core/src/plugins/authfront.multi/class.MultiAuthFrontend.php
  152. +5 −0 core/src/plugins/authfront.otp/class.OtpAuthFrontend.php
  153. +8 −0 core/src/plugins/authfront.session_login/class.SessionLoginFrontend.php
  154. +2 −0 core/src/plugins/authfront.webftp/class.FTPAuthFrontend.php
  155. +25 −10 core/src/plugins/boot.conf/class.BootConfLoader.php
  156. +3 −0 core/src/plugins/cache.doctrine/class.DoctrineCacheDriver.php
  157. +8 −1 core/src/plugins/conf.serial/class.AJXP_SerialUser.php
  158. +10 −1 core/src/plugins/conf.serial/class.serialConfDriver.php
  159. +27 −13 core/src/plugins/conf.sql/class.AJXP_SqlUser.php
  160. +28 −10 core/src/plugins/conf.sql/class.sqlConfDriver.php
  161. +1 −1 core/src/plugins/conf.sql/manifest.xml
  162. +20 −15 ...re/classes/class.AJXP_MetaStreamWrapper.php → plugins/core.access/src/AJXP_MetaStreamWrapper.php}
  163. +11 −3 core/src/{core/classes/class.AJXP_Node.php → plugins/core.access/src/AJXP_Node.php}
  164. +3 −2 ...lass.AJXP_SchemeTranslatorWrapper.php → plugins/core.access/src/AJXP_SchemeTranslatorWrapper.php}
  165. +30 −30 core/src/plugins/core.access/{class.AbstractAccessDriver.php → src/AbstractAccessDriver.php}
  166. +5 −0 core/src/{core/classes/class.ContentFilter.php → plugins/core.access/src/ContentFilter.php}
  167. +4 −3 ...src/{core/classes/class.AJXP_Permission.php → plugins/core.access/src/Filter/AJXP_Permission.php}
  168. +4 −1 ...e/classes/class.AJXP_PermissionMask.php → plugins/core.access/src/Filter/AJXP_PermissionMask.php}
  169. +3 −1 core/src/{core/classes/interface.AjxpWrapper.php → plugins/core.access/src/IAjxpWrapper.php}
  170. +3 −1 ...ore/classes/interface.AjxpWrapperProvider.php → plugins/core.access/src/IAjxpWrapperProvider.php}
  171. +2 −0 core/src/{core/classes/class.RecycleBinManager.php → plugins/core.access/src/RecycleBinManager.php}
  172. +15 −5 core/src/{core/classes/class.Repository.php → plugins/core.access/src/Repository.php}
  173. +6 −6 core/src/plugins/core.access/src/Stream/AuthWrapper.php
  174. +1 −1 core/src/plugins/core.access/src/Stream/Client.php
  175. +7 −8 core/src/plugins/core.access/src/Stream/OAuthWrapper.php
  176. +4 −4 core/src/plugins/core.access/src/Stream/PathWrapper.php
  177. +10 −10 core/src/plugins/core.access/src/Stream/StreamWrapper.php
  178. +11 −6 core/src/{core/classes/class.UserSelection.php → plugins/core.access/src/UserSelection.php}
  179. +1 −1 core/src/plugins/core.ajaxplorer/i18n/ca.php
  180. +1 −1 core/src/plugins/core.ajaxplorer/i18n/cs.php
  181. +1 −1 core/src/plugins/core.ajaxplorer/i18n/da.php
  182. +1 −1 core/src/plugins/core.ajaxplorer/i18n/de.php
  183. +1 −1 core/src/plugins/core.ajaxplorer/i18n/en.php
  184. +1 −1 core/src/plugins/core.ajaxplorer/i18n/es.php
  185. +1 −1 core/src/plugins/core.ajaxplorer/i18n/et.php
  186. +1 −1 core/src/plugins/core.ajaxplorer/i18n/eus.php
  187. +1 −1 core/src/plugins/core.ajaxplorer/i18n/fi.php
  188. +1 −1 core/src/plugins/core.ajaxplorer/i18n/fr.php
  189. +1 −1 core/src/plugins/core.ajaxplorer/i18n/gr.php
  190. +1 −1 core/src/plugins/core.ajaxplorer/i18n/he.php
  191. +1 −1 core/src/plugins/core.ajaxplorer/i18n/hu.php
  192. +1 −1 core/src/plugins/core.ajaxplorer/i18n/it.php
  193. +1 −1 core/src/plugins/core.ajaxplorer/i18n/ja.php
  194. +1 −1 core/src/plugins/core.ajaxplorer/i18n/kr.php
  195. +1 −1 core/src/plugins/core.ajaxplorer/i18n/nl.php
  196. +1 −1 core/src/plugins/core.ajaxplorer/i18n/no.php
  197. +1 −1 core/src/plugins/core.ajaxplorer/i18n/pl.php
  198. +1 −1 core/src/plugins/core.ajaxplorer/i18n/pt-br.php
  199. +1 −1 core/src/plugins/core.ajaxplorer/i18n/pt.php
  200. +1 −1 core/src/plugins/core.ajaxplorer/i18n/ru.php
  201. +1 −1 core/src/plugins/core.ajaxplorer/i18n/si.php
  202. +1 −1 core/src/plugins/core.ajaxplorer/i18n/sv.php
  203. +1 −1 core/src/plugins/core.ajaxplorer/i18n/tr.php
  204. +1 −1 core/src/plugins/core.ajaxplorer/i18n/zh-tw.php
  205. +1 −1 core/src/plugins/core.ajaxplorer/i18n/zh.php
  206. +6 −0 core/src/{core/classes → plugins/core.auth}/class.AJXP_Safe.php
  207. +10 −2 core/src/plugins/core.auth/class.AbstractAuthDriver.php
  208. +6 −1 core/src/plugins/core.auth/class.CoreAuthLoader.php
  209. +3 −0 core/src/plugins/core.authfront/class.AbstractAuthFrontend.php
  210. +5 −0 core/src/plugins/core.authfront/class.FrontendsLoader.php
  211. +1 −1 core/src/plugins/core.authfront/manifest.xml
  212. +5 −1 core/src/plugins/core.cache/class.AbstractCacheDriver.php
  213. +9 −0 core/src/plugins/core.cache/class.CacheStreamLayer.php
  214. +11 −2 core/src/plugins/core.cache/class.CoreCacheLoader.php
  215. +1 −1 core/src/plugins/core.cache/manifest.xml
  216. +5 −1 core/src/{core/classes → plugins/core.conf}/class.AJXP_Role.php
  217. +6 −0 core/src/plugins/core.conf/class.AbstractAjxpUser.php
  218. +43 −28 core/src/plugins/core.conf/class.AbstractConfDriver.php
  219. +2 −0 core/src/{core/classes → plugins/core.conf}/class.AjxpRole.php
  220. +7 −1 core/src/plugins/core.conf/class.CoreConfLoader.php
  221. +2 −0 core/src/{core/classes → plugins/core.conf}/interface.AjxpGroupPathProvider.php
  222. +1 −1 core/src/plugins/core.conf/manifest.xml
  223. +5 −0 core/src/plugins/core.index/class.AbstractSearchEngineIndexer.php
  224. +11 −0 core/src/plugins/core.index/class.CoreIndexer.php
  225. +11 −3 core/src/plugins/core.log/class.AJXP_Logger.php
  226. +4 −0 core/src/plugins/core.log/class.AbstractLogDriver.php
  227. +1 −1 core/src/plugins/core.log/manifest.xml
  228. +13 −1 core/src/plugins/core.mailer/class.AjxpMailer.php
  229. +6 −0 core/src/{core/classes → plugins/core.meta}/class.AJXP_AbstractMetaSource.php
  230. +4 −1 core/src/plugins/core.metastore/interface.MetaStoreProvider.php
  231. +10 −0 core/src/plugins/core.mq/class.MqManager.php
  232. +6 −0 core/src/plugins/core.notifications/class.AJXP_Notification.php
  233. +10 −0 core/src/plugins/core.notifications/class.AJXP_NotificationCenter.php
  234. +10 −8 core/src/plugins/core.ocs/OCSPlugin.php
  235. +1 −1 core/src/plugins/core.ocs/src/Client/OCSClient.php
  236. +6 −3 core/src/plugins/core.ocs/src/Model/RemoteShare.php
  237. +5 −2 core/src/plugins/core.ocs/src/Model/SQLStore.php
  238. +14 −12 core/src/plugins/core.ocs/src/Server/Federated/Server.php
  239. +3 −0 core/src/plugins/core.uploader/class.CoreUploaderLoader.php
  240. +8 −0 core/src/plugins/cypher.encfs/class.EncfsMounter.php
  241. +10 −0 core/src/plugins/editor.audio/class.AudioPreviewer.php
  242. +8 −0 core/src/plugins/editor.browser/class.FileMimeSender.php
  243. +9 −0 core/src/plugins/editor.diaporama/class.ImagePreviewer.php
  244. +13 −0 core/src/plugins/editor.eml/class.EmlParser.php
  245. +9 −0 core/src/plugins/editor.etherpad/class.EtherpadClient.php
  246. +9 −0 core/src/plugins/editor.imagick/class.IMagickPreviewer.php
  247. +10 −0 core/src/plugins/editor.pixlr/class.PixlrEditor.php
  248. +9 −0 core/src/plugins/editor.video/class.VideoReader.php
  249. +11 −0 core/src/plugins/editor.zoho/class.ZohoEditor.php
  250. +12 −4 core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php
  251. +13 −1 core/src/plugins/gui.ajax/class.AJXP_ClientDriver.php
  252. +1 −1 core/src/plugins/gui.ajax/manifest.xml
  253. +3 −0 core/src/plugins/gui.ios/class.IOSGuiPlugin.php
  254. +2 −0 core/src/plugins/gui.light/class.LightGuiPlugin.php
  255. +5 −0 core/src/plugins/gui.mobile/class.MobileGuiPlugin.php
  256. +7 −0 core/src/plugins/gui.user/class.UserGuiController.php
  257. +7 −0 core/src/plugins/index.elasticsearch/class.AjxpElasticSearch.php
  258. +8 −0 core/src/plugins/index.lucene/class.AjxpLuceneIndexer.php
  259. +12 −5 core/src/plugins/log.sql/class.sqlLogDriver.php
  260. +2 −2 core/src/plugins/log.syslog/class.sysLogDriver.php
  261. +7 −2 core/src/plugins/log.text/class.textLogDriver.php
  262. +10 −0 core/src/plugins/meta.comments/class.CommentsMetaManager.php
  263. +9 −0 core/src/plugins/meta.exif/class.ExifMetaManager.php
  264. +12 −0 core/src/plugins/meta.filehasher/class.FileHasher.php
  265. +9 −0 core/src/plugins/meta.git/class.GitManager.php
  266. +5 −0 core/src/plugins/meta.monitor_fs/class.FSMonitoringManager.php
  267. +6 −0 core/src/plugins/meta.mount/class.FilesystemMounter.php
  268. +10 −0 core/src/plugins/meta.quota/class.QuotaComputer.php
  269. +10 −1 core/src/plugins/meta.simple_lock/class.SimpleLockManager.php
  270. +11 −0 core/src/plugins/meta.svn/class.SvnManager.php
  271. +13 −0 core/src/plugins/meta.syncable/class.ChangesTracker.php
  272. +15 −3 core/src/plugins/meta.user/class.UserMetaManager.php
  273. +9 −0 core/src/plugins/meta.watch/class.MetaWatchRegister.php
  274. +5 −0 core/src/plugins/metastore.s3/class.s3MetaStore.php
  275. +7 −0 core/src/plugins/metastore.serial/class.SerialMetaStore.php
  276. +5 −0 core/src/plugins/metastore.xattr/class.xAttrMetaStore.php
  277. +5 −1 core/src/plugins/mq.serial/class.AJXP_SerialMessageExchanger.php
  278. +5 −1 core/src/plugins/mq.sql/class.AJXP_SqlMessageExchanger.php
  279. +6 −0 core/src/plugins/shorten.bitly/class.BitlyShortener.php
  280. +6 −0 core/src/plugins/shorten.multi/class.multiShortener.php
  281. +3 −0 core/src/plugins/uploader.flex/class.FlexUploadProcessor.php
  282. +9 −0 core/src/plugins/uploader.html/class.SimpleUploadProcessor.php
  283. +9 −0 core/src/plugins/uploader.http/class.HttpDownloader.php
  284. +13 −4 core/src/plugins/uploader.jumploader/class.JumploaderProcessor.php
  285. +9 −0 core/src/plugins/uploader.plupload/class.PluploadProcessor.php
  286. +3 −0 core/src/publicLet.inc.php
  287. +9 −2 core/src/rest.php
  288. +3 −0 core/src/runTests.php
View
@@ -20,6 +20,16 @@
*
* Description : Command line access of the framework.
*/
+use Pydio\Auth\Core\AJXP_Safe;
+use Pydio\Auth\Core\AuthService;
+use Pydio\Conf\Core\ConfService;
+use Pydio\Core\AJXP_Controller;
+use Pydio\Core\AJXP_Exception;
+use Pydio\Core\AJXP_XMLWriter;
+use Pydio\Core\Plugins\AJXP_PluginsService;
+use Pydio\Core\SystemTextEncoding;
+use Pydio\Log\Core\AJXP_Logger;
+
if (php_sapi_name() !== "cli") {
die("This is the command line version of the framework, you are not allowed to access this page");
}
@@ -70,10 +70,6 @@
// example in log.serial. Do not forget the trailing slash
// define("AJXP_FORCE_LOGPATH", "/var/log/ajaxplorer/");
-// KEY-VALUE-CACHE
-define("AJXP_KVCACHE_PREFIX", "pydio-unique-id");
-define("AJXP_KVCACHE_IGNORE", true);
-
// DEBUG OPTIONS
define("AJXP_CLIENT_DEBUG" , false);
define("AJXP_SERVER_DEBUG" , false);
@@ -96,8 +92,18 @@
// MAKE SURE YOU HAVE PHP.5.3, OPENSSL, AND THAT IT DOES NOT DEGRADE PERFORMANCES
define("USE_OPENSSL_RANDOM", false);
+$corePlugAutoloads = glob(AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/core.*/vendor/autoload.php", GLOB_NOSORT);
+if ($corePlugAutoloads !== false && count($corePlugAutoloads)) {
+ foreach($corePlugAutoloads as $autoloader){
+ require_once ($autoloader);
+ }
+}
+
function AjaXplorer_autoload($className)
{
+ // Temp : super dummy autoloader, take only class name
+ $className = array_pop(explode("\\", $className));
+
if($className == "dibi"){
require_once(AJXP_BIN_FOLDER."/dibi/dibi.php");
}
@@ -124,6 +130,10 @@ function AjaXplorer_autoload($className)
}
spl_autoload_register('AjaXplorer_autoload');
+include_once (AJXP_BIN_FOLDER."/compat.php");
+
+use Pydio\Core\AJXP_Utils;
+
AJXP_Utils::safeIniSet("session.cookie_httponly", 1);
if (is_file(AJXP_CONF_PATH."/bootstrap_conf.php")) {
@@ -18,6 +18,8 @@
*
* The latest code can be found at <http://pyd.io/>.
*/
+namespace Pydio\Core;
+
defined('AJXP_EXEC') or die( 'Access not allowed');
/**
* Generic caching system that can be used by the plugins. Use the static factory getItem() to generate
@@ -18,6 +18,13 @@
*
* The latest code can be found at <http://pyd.io/>.
*/
+namespace Pydio\Core;
+
+use Pydio\Auth\Core\AuthService;
+use Pydio\Conf\Core\ConfService;
+use Pydio\Core\Plugins\AJXP_PluginsService;
+use Pydio\Log\Core\AJXP_Logger;
+
defined('AJXP_EXEC') or die( 'Access not allowed');
/**
* Core controller for dispatching the actions.
@@ -28,7 +35,7 @@
class AJXP_Controller
{
/**
- * @var DOMXPath
+ * @var \DOMXPath
*/
private static $xPath;
/**
@@ -46,13 +53,13 @@ class AJXP_Controller
* Initialize the queryable xPath object
* @static
* @param bool $useCache Whether to cache the registry version in a memory cache.
- * @return DOMXPath
+ * @return \DOMXPath
*/
private static function initXPath($useCache = false)
{
if (!isSet(self::$xPath)) {
$registry = ConfService::getFilteredXMLRegistry(false, false, $useCache);
- self::$xPath = new DOMXPath($registry);
+ self::$xPath = new \DOMXPath($registry);
}
return self::$xPath;
}
@@ -95,18 +102,18 @@ public static function findRestActionAndApply($actionName, $path)
if (count($paramValues) < count($paramNames)) {
$paramNames = array_slice($paramNames, 0, count($paramValues));
}
- $paramValues = array_map(array("SystemTextEncoding", "toUTF8"), $paramValues);
+ $paramValues = array_map(array("Pydio\\Core\\SystemTextEncoding", "toUTF8"), $paramValues);
$httpVars = array_merge($_GET, $_POST, array_combine($paramNames, $paramValues));
return self::findActionAndApply($actionName, $httpVars, $_FILES, $action);
}
/**
* @static
- * @param Array $parameters
- * @param DOMNode $callbackNode
- * @param DOMXPath $xPath
- * @throws Exception
+ * @param array $parameters
+ * @param \DOMNode $callbackNode
+ * @param \DOMXPath $xPath
+ * @throws \Exception
*/
public static function checkParams(&$parameters, $callbackNode, $xPath)
{
@@ -121,7 +128,7 @@ public static function checkParams(&$parameters, $callbackNode, $xPath)
$defaultNode = $param->attributes->getNamedItem("default");
$mandatory = ($param->attributes->getNamedItem("mandatory")->nodeValue == "true");
if ($mandatory && !isSet($parameters[$name])) {
- throw new Exception("Missing parameter '".$name."' of type '$type'");
+ throw new \Exception("Missing parameter '".$name."' of type '$type'");
}
if ($defaultNode != null && !isSet($parameters[$name])) {
$parameters[$name] = $defaultNode->nodeValue;
@@ -140,7 +147,7 @@ public static function checkParams(&$parameters, $callbackNode, $xPath)
* @param String $actionName
* @param array $httpVars
* @param array $fileVars
- * @param DOMNode $action
+ * @param \DOMNode $action
* @return mixed
*/
public static function findActionAndApply($actionName, $httpVars, $fileVars, &$action = null)
@@ -397,14 +404,14 @@ public static function runCommandInBackground($cmd, $logFile)
/**
* Find a callback node by its xpath query, filtering with the applyCondition if the xml attribute exists.
* @static
- * @param DOMXPath $xPath
- * @param DOMNode $actionNode
+ * @param \DOMXPath $xPath
+ * @param \DOMNode $actionNode
* @param string $query
* @param string $actionName
* @param array $httpVars
* @param array $fileVars
* @param bool $multiple
- * @return DOMElement|bool|DOMElement[]
+ * @return \DOMElement|bool|\DOMElement[]
*/
private static function getCallbackNode($xPath, $actionNode, $query ,$actionName, $httpVars, $fileVars, $multiple = true)
{
@@ -430,7 +437,7 @@ private static function getCallbackNode($xPath, $actionNode, $query ,$actionName
* Check in the callback node if an applyCondition XML attribute exists, and eval its content.
* The content must set an $apply boolean as result
* @static
- * @param DOMElement|DOMNode $callback
+ * @param \DOMElement|\DOMNode $callback
* @param string $actionName
* @param array $httpVars
* @param array $fileVars
@@ -449,10 +456,10 @@ private static function appliesCondition($callback, $actionName, $httpVars, $fil
/**
* Applies a callback node
* @static
- * @param DOMElement|Array $callback The DOM Node or directly an array of attributes
+ * @param \DOMElement|array $callback The DOM Node or directly an array of attributes
* @param String $actionName
- * @param Array $httpVars
- * @param Array $fileVars
+ * @param array $httpVars
+ * @param array $fileVars
* @param null $variableArgs
* @param bool $defer
* @throws AJXP_Exception* @internal param \DOMXPath $xPath
@@ -516,7 +523,7 @@ public static function applyHook($hookName, $args, $forceNonDefer = false)
if(!$callbacks->length) return ;
self::$hooksCache[$hookName] = array();
/**
- * @var $callback DOMElement
+ * @var $callback \DOMElement
*/
foreach ($callbacks as $callback) {
$defer = ($callback->getAttribute("defer") === "true");
@@ -541,7 +548,7 @@ public static function applyHook($hookName, $args, $forceNonDefer = false)
if($dontBreakOnException){
try{
self::applyCallback($hookCallback, $fake1, $fake2, $fake3, $args, $defer);
- }catch(Exception $e){
+ }catch(\Exception $e){
AJXP_Logger::error("[Hook $hookName]", "[Callback ".$plugId.".".$methodName."]", $e->getMessage());
}
}else{
@@ -583,8 +590,8 @@ public static function registerIncludeHook($hookName, $callback)
/**
* Check the rightsContext node of an action.
* @static
- * @param DOMNode $actionNode
- * @param DOMXPath $xPath
+ * @param \DOMNode $actionNode
+ * @param \DOMXPath $xPath
* @param string $right
* @return bool
*/
@@ -18,13 +18,17 @@
*
* The latest code can be found at <http://pyd.io/>.
*/
+namespace Pydio\Core;
+
+use Pydio\Conf\Core\ConfService;
+
defined('AJXP_EXEC') or die( 'Access not allowed');
/**
* Custom exception (legacy from php4 when there were no exceptions)
* @package Pydio
* @subpackage Core
*/
-class AJXP_Exception extends Exception
+class AJXP_Exception extends \Exception
{
public function __construct($messageString, $messageId = false)
{
@@ -41,7 +45,7 @@ public function __construct($messageString, $messageId = false)
public function errorToXml($mixed)
{
- if (is_a($mixed, "Exception")) {
+ if ($mixed instanceof \Exception) {
throw $this;
} else {
throw new AJXP_Exception($mixed);
@@ -18,6 +18,9 @@
*
* The latest code can be found at <http://pyd.io/>.
*/
+namespace Pydio\Core;
+use Pydio\Core\Plugins\AJXP_PluginsService;
+
defined('AJXP_EXEC') or die( 'Access not allowed');
/**
@@ -89,7 +92,7 @@ public function concatListAndPack($src, $out, $mode)
// Pack and write to file
require_once("packer/class.JavaScriptPacker.php");
- $packer = new JavaScriptPacker($jscode, $mode , true, false);
+ $packer = new \JavaScriptPacker($jscode, $mode , true, false);
$packed = $packer->pack();
if ($mode == "None") { // css case, hack for I.E.
$packed = str_replace("solid#", "solid #", $packed);
@@ -113,12 +116,12 @@ public function compactEach($list, $mode){
$jscode = file_get_contents($in);
$fullcode .= $jscode;
// Pack and write to file
- $packer = new JavaScriptPacker($jscode, $mode , true, false);
+ $packer = new \JavaScriptPacker($jscode, $mode , true, false);
$packed = $packer->pack();
file_put_contents($out, $packed);
// Pack and write to file
- $packer = new JavaScriptPacker($fullcode, $mode , true, false);
+ $packer = new \JavaScriptPacker($fullcode, $mode , true, false);
$packed = $packer->pack();
file_put_contents($outfull, $packed);
}
@@ -1,107 +0,0 @@
-<?php
-/*
- * Copyright 2007-2013 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
- * This file is part of Pydio.
- *
- * Pydio is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Pydio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Pydio. If not, see <http://www.gnu.org/licenses/>.
- *
- * The latest code can be found at <http://pyd.io/>.
- */
-defined('AJXP_EXEC') or die( 'Access not allowed');
-
-
-/**
- * Class AJXP_KeyValueCache
- *
- * Simple Key/Value cache stored in memory, independant of the implementation.
- * Currently APC only, we should replace with the Doctrine/cache library (see https://github.com/doctrine/cache )
- * We do implement their Cache Interface for future migration.
- */
-class AJXP_KeyValueCache {
-
- protected function makeId($id){
- if(defined('AJXP_KVCACHE_PREFIX')){
- return AJXP_KVCACHE_PREFIX . " - ".$id;
- }
- return $id;
- }
-
- /**
- * Fetches an entry from the cache.
- *
- * @param string $id The id of the cache entry to fetch.
- *
- * @return mixed The cached data or FALSE, if no cache entry exists for the given id.
- */
- public function fetch($id){
- if(!function_exists('apc_fetch')) return FALSE;
- if(defined('AJXP_KVCACHE_IGNORE') && AJXP_KVCACHE_IGNORE) return FALSE;
- $result = apc_fetch($this->makeId($id), $success);
- if($success) return $result;
- else return false;
- }
- /**
- * Tests if an entry exists in the cache.
- *
- * @param string $id The cache id of the entry to check for.
- *
- * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.
- */
- public function contains($id){
- if(!function_exists('apc_fetch')) return FALSE;
- if(defined('AJXP_KVCACHE_IGNORE') && AJXP_KVCACHE_IGNORE) return FALSE;
- apc_fetch($this->makeId($id), $success);
- return $success;
- }
- /**
- * Puts data into the cache.
- *
- * @param string $id The cache id.
- * @param mixed $data The cache entry/data.
- * @param int $lifeTime The cache lifetime.
- * If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
- *
- * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
- */
- public function save($id, $data, $lifeTime = 0){
- if(!function_exists('apc_store')) return false;
- if(defined("AJXP_KVCACHE_IGNORE") && AJXP_KVCACHE_IGNORE) return false;
- $res = apc_store($this->makeId($id), $data, $lifeTime);
- if($res !== false) return true;
- return false;
- }
-
- /**
- * Deletes a cache entry.
- *
- * @param string $id The cache id.
- *
- * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
- */
- public function delete($id){
- if(!function_exists('apc_delete')) return true;
- return apc_delete($this->makeId($id));
- }
-
- /**
- * Flush a whole cache
- */
- public function deleteAll(){
- if(function_exists('apc_clear_cache')){
- apc_clear_cache('user');
- }
- }
-
-
-}
Oops, something went wrong.

0 comments on commit f99f31e

Please sign in to comment.