diff --git a/application/AppController.php b/application/AppController.php index e2d4dc7fe..7a0cd74d1 100644 --- a/application/AppController.php +++ b/application/AppController.php @@ -78,7 +78,7 @@ public function preDispatch() ); $login=array( "titleUploadLogin"=>$this->t('Please log in'), - "contentUploadLogin"=>utf8_encode($this->t('You need to be logged in to be able to upload files.')) + "contentUploadLogin"=>$this->t('You need to be logged in to be able to upload files.') ); $browse=array( @@ -91,6 +91,7 @@ public function preDispatch() 'rename'=>$this->t('Rename'), 'move'=>$this->t('Move'), 'copy'=>$this->t('Copy'), + 'element'=>$this->t('element'), 'community' => array( 'invit'=>$this->t('Invite collaborators'), 'advanced'=>$this->t('Advanced properties'), diff --git a/application/controllers/BrowseController.php b/application/controllers/BrowseController.php index 1a51f78dd..438c77985 100644 --- a/application/controllers/BrowseController.php +++ b/application/controllers/BrowseController.php @@ -143,20 +143,16 @@ public function getelementinfoAction() switch ($element) { case 'community': - $community=$this->Community->load($id); + $community=$this->Community->load($id); $jsonContent=array_merge($jsonContent,$community->_toArray()); + $jsonContent['creation']=$this->Component->Date->formatDate(strtotime($community->getCreation())); + $members=$community->getMemberGroup()->getUsers(); + $jsonContent['members']=count($members); break; case 'folder': $folder=$this->Folder->load($id); $jsonContent=array_merge($jsonContent,$folder->_toArray()); - if(isset($jsonContent['date'])) - { - $jsonContent['creation']=$jsonContent['date']; - } - else - { - $jsonContent['creation']=date('c'); - } + $jsonContent['creation']=$this->Component->Date->formatDate(strtotime($jsonContent['date'])); break; case 'item': $item=$this->Item->load($id); @@ -175,6 +171,7 @@ public function getelementinfoAction() $jsonContent['translation']['Created']=$this->t('Created'); $jsonContent['translation']['File']=$this->t('File'); $jsonContent['translation']['Uploaded']=$this->t('Uploaded by'); + $jsonContent['translation']['Private']=$this->t('This community is private'); echo JsonComponent::encode($jsonContent); }//end getElementInfo diff --git a/application/controllers/DownloadController.php b/application/controllers/DownloadController.php index 9064e5061..22fa69372 100644 --- a/application/controllers/DownloadController.php +++ b/application/controllers/DownloadController.php @@ -89,7 +89,7 @@ public function indexAction() if(empty($folders)&&empty($revisions)) { - throw new Zend_Exception("Permissions problem"); + exit(); } if(empty($folders)&&count($revisions)==1) { diff --git a/application/controllers/InstallController.php b/application/controllers/InstallController.php index 4afabd8c7..92115738b 100644 --- a/application/controllers/InstallController.php +++ b/application/controllers/InstallController.php @@ -41,6 +41,7 @@ function indexAction() $this->view->writable=is_writable(BASE_PATH.'/application/configs'); $this->view->convertfound=$this->Component->Utility->IsImageMagickWorking(); $this->view->basePath=BASE_PATH; + setcookie("recentItems", '', time()+60*60*24*30,'/'); //30 days if(!empty($_POST)&&$this->view->writable) { $this->_redirect("/install/step2"); diff --git a/application/layouts/layout.phtml b/application/layouts/layout.phtml index e249acfea..bf09a43e2 100644 --- a/application/layouts/layout.phtml +++ b/application/layouts/layout.phtml @@ -126,7 +126,7 @@ - +
@@ -163,7 +163,7 @@ echo "'+arrayElement.translation.Created+' | '; html+=''+arrayElement.creation+' | '; html+=' '; + if(arrayElement['type']=='community') + { + html+='
Member'; + if(parseInt(arrayElement['members'])>1) + { + html+='s'; + } + html+= ' | '; + html+=''+arrayElement['members']+' | '; + html+='
'+arrayElement['nbitstream']+' | '; html+='