Joseph Tate avatar Joseph Tate committed e513ee5 Merge

Branch merge

Comments (0)

Files changed (5)

c5t/core/controllers/files.py

             main_orm_session.flush_all()
             main_orm_session.close_all()
 	    
-            redirect('./')
+            redirect('./edit')
         else:
             date = None
             user = tmpl_context.user
             main_orm_session.flush_all()
             main_orm_session.close_all()
 	    
-            redirect('./')  
+            redirect('./edit')  

c5t/core/controllers/page.py

           raw_parent_id = kw.get('parent_id', None)
           parent_id = raw_parent_id and ObjectId(raw_parent_id) or None
           kw['parent_id'] = parent_id                  
-        elif parent_page_id == 'top':
+        elif parent_page_id == 'top' or parent_page_id is None:
           kw['parent_id'] = None
         else:
           kw['parent_id'] = parent_page_id         
 
         page_id = kw.get('page_id')
         page_type = kw.get('page_type')
-        if page_type is 'News':
+        if page_type == 'News':
           page = News.query.get(_id=ObjectId(page_id))
         else:
           page = Page.query.get(_id=ObjectId(page_id))

c5t/core/lib/helpers.py

 
 def strip_tags(html):
     s = MLStripper()
+    if html is None:
+        return "No Content"
     try:
         s.feed(html)
     except Exception, e:

c5t/core/model/content.py

     def filepath(self):
         short_path = '%s/%s' % (self.parent.path(), self.title)
 
-        if self.public:
-            return os.path.join(config['files.public.path'], short_path)
-        else:
-            return os.path.join(config['files.private.path'], short_path)
+        #if self.public:
+        return os.path.join(config['files.public.path'], short_path)
+        #else:
+        #    return os.path.join(config['files.private.path'], short_path)
 
 class Image(File):
     class __mongometa__:

c5t/core/templates/calendar/event/get_all.mak

 %if cal:
   <a href="../edit">[edit]</a>
   <a href="../delete">[delete]</a>
-%endif
+%endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.