Permalink
Browse files

Remove invalid todo's

  • Loading branch information...
1 parent 78b4900 commit be95f98c8439e5fbb27f75efce2acfca7f87bd30 @cdujeu cdujeu committed Sep 12, 2016
@@ -62,8 +62,6 @@ public function parseSpecificContributions(ContextInterface $ctx, \DOMNode &$con
/**
* @param ContextInterface $ctx
*/
- protected function initRepository(ContextInterface $ctx)
- {
- // TODO: Implement initRepository() method.
+ protected function initRepository(ContextInterface $ctx){
}
}
@@ -499,48 +499,7 @@ protected function parseUrl($url, $forceLogin = false)
* @param AJXP_Node $node
* @return array
*/
- public static function getResolvedOptionsForNode($node)
- {
- /*
- $context = $node->getContext();
- $repository = $node->getRepository();
- $credentials = MemorySafe::tryLoadingCredentialsFromSources($context);
- $options = [
- "TYPE" => "ftp",
- "USER" => $credentials["user"],
- "PASSWORD" => $credentials["password"]
- ];
- $optKeys = ["FTP_HOST", "PATH", "FTP_SECURE", "FTP_PORT", "FTP_DIRECT", "CHARSET"];
- if ($repository->getContextOption($node->getContext(), "DYNAMIC_FTP") == "TRUE" && isSet($_SESSION["AJXP_DYNAMIC_FTP_DATA"])){
- $sessionData = $_SESSION["AJXP_DYNAMIC_FTP_DATA"];
- foreach($optKeys as $key){
- $options[$key] = $sessionData[$key];
- }
- }else{
- foreach($optKeys as $key){
- $options[$key] = $repository->getContextOption($context, $key);
- }
- }
- $options["FTP_SECURE"] = ($options["FTP_SECURE"] === "TRUE");
- $options["FTP_DIRECT"] = ($options["FTP_DIRECT"] === "TRUE");
- $options["FTP_PORT"] = ($options["FTP_PORT"] !== null ? intval($options["FTP_PORT"]): $options["FTP_SECURE"] ? 22 : 21);
-
- // Test Connexion and server features
- // TODO: not working, we have to make the options more restful
- global $_SESSION;
- $cacheKey = $repository->getId()."_ftpCharset";
- if (!isset($_SESSION[$cacheKey]) || !strlen($_SESSION[$cacheKey]) || $forceLogin) {
- $features = $this->getServerFeatures($node->getContext());
- $ctxCharset = SessionService::getContextCharset($node->getRepositoryId());
- if(empty($ctxCharset)) {
- SessionService::setContextCharset($node->getRepositoryId(), $features["charset"]);
- $_SESSION[$cacheKey] = $features["charset"];
- }else{
- $_SESSION[$cacheKey] = $ctxCharset;
- }
- }
- */
-
+ public static function getResolvedOptionsForNode($node){
return ["TYPE" => "php"];
}
@@ -427,9 +427,7 @@ public function url_stat($path, $flags)
* @param AJXP_Node $node
* @return array
*/
- public static function getResolvedOptionsForNode($node)
- {
- // TODO: Should find node, and return associated repository real resolved options
+ public static function getResolvedOptionsForNode($node){
return ["TYPE" => "php"];
}
}
@@ -89,8 +89,6 @@ public function switchAction(ServerRequestInterface &$request, ResponseInterface
/**
* @param ContextInterface $ctx
*/
- protected function initRepository(ContextInterface $ctx)
- {
- // TODO: Implement initRepository() method.
+ protected function initRepository(ContextInterface $ctx) {
}
}
@@ -189,8 +189,6 @@ public function listLayers($host, &$NodesList, $nodeList, $xPath, $replaceCallba
/**
* @param ContextInterface $ctx
*/
- protected function initRepository(ContextInterface $ctx)
- {
- // TODO: Implement initRepository() method.
+ protected function initRepository(ContextInterface $ctx) {
}
}
@@ -34,7 +34,6 @@
</client_settings>
<registry_contributions>
<actions>
- <!-- TODO : handle action names and authorization (and disable sharing mask) -->
<action name="share_react">
<gui text="292" title="292" src="share.png" iconClass="mdi mdi-share-variant" hasAccessKey="false">
<context selection="true" dir="true" recycle="hidden" actionBar="true" actionBarGroup="get,info_panel_share" contextMenu="true"/>
@@ -147,9 +147,7 @@ public static function publicletToJson(ContextInterface $ctx, $shareId, $shareMe
public static function migrateLegacyMeta(ContextInterface $ctx, $shareCenter, $shareStore, $shareRightManager, $dryRun = true){
$metaStoreDir = AJXP_DATA_PATH."/plugins/metastore.serial";
$publicFolder = ConfService::getGlobalConf("PUBLIC_DOWNLOAD_FOLDER");
- // TODO 1: Check all metastores of all repositories?
- // TODO 2: load $publicFolder/.ajxp_publiclet_counters.ser and reassign download counts
- $metastores = glob($metaStoreDir."/ajxp_meta_0");
+ $metastores = glob($metaStoreDir."/ajxp_meta_*");
if($dryRun){
print("RUNNING A DRY RUN FOR META MIGRATION");
}
@@ -163,8 +161,6 @@ public static function migrateLegacyMeta(ContextInterface $ctx, $shareCenter, $s
$data = unserialize(file_get_contents($store));
foreach($data as $filePath => &$metadata){
-
-
foreach($metadata as $userName => &$meta){
if(!UsersService::userExists($userName)){
continue;
@@ -995,7 +995,7 @@ public function switchAction(ServerRequestInterface &$requestInterface, Response
$this->getShareStore()->getMetaManager()->setNodeMeta($ajxpNode, $metadata, true);
}
}else{
- // TODO: testUserCanEditShare ?
+ $this->getShareStore()->testUserCanEditShare(($ctx->hasUser()?$ctx->getUser()->getId():null), $hash);
$this->getShareStore()->updateShareProperty($hash, $httpVars["p_name"], $httpVars["p_value"]);
}
@@ -40,9 +40,13 @@
*/
class CoreAccessHandler extends Plugin
{
+ /**
+ * @param ContextInterface $ctx
+ * @param array $options
+ */
public function init(ContextInterface $ctx, $options = [])
{
- parent::init($ctx, $options); // TODO: Change the autogenerated stub
+ parent::init($ctx, $options);
MetaStreamWrapper::register();
}

0 comments on commit be95f98

Please sign in to comment.