Permalink
Browse files

Fixing to work with K3

  • Loading branch information...
1 parent 1c0206a commit 219d2286dfa483c5982207ef454d3ef00b64a497 Deepwinter committed Apr 22, 2011
Showing with 15 additions and 1,475 deletions.
  1. +4 −0 application/bootstrap.php
  2. +0 −18 modules/mop_auth/controllers/mop_auth.php
  3. +0 −7 modules/mop_auth/views/logged_in_as.php
  4. +2 −1 modules/mopcms/classes/model/content.php
  5. +5 −5 modules/mopcms/classes/mop/cmsinterface.php
  6. BIN modules/mopcms/views/images/admin/bg_row.gif
  7. BIN modules/mopcms/views/images/admin/bg_row_alt.gif
  8. BIN modules/mopcms/views/images/admin/bg_white60.png
  9. BIN modules/mopcms/views/images/admin/bg_white80.png
  10. BIN modules/mopcms/views/images/admin/bgk80.png
  11. BIN modules/mopcms/views/images/admin/bgk88.png
  12. BIN modules/mopcms/views/images/admin/bgk90.png
  13. BIN modules/mopcms/views/images/admin/bgk94.png
  14. BIN modules/mopcms/views/images/admin/icon_add_category.gif
  15. BIN modules/mopcms/views/images/admin/icon_addpage.gif
  16. BIN modules/mopcms/views/images/admin/icon_addpage.jpg
  17. BIN modules/mopcms/views/images/admin/icon_cancel.gif
  18. BIN modules/mopcms/views/images/admin/icon_cancel.png
  19. BIN modules/mopcms/views/images/admin/icon_cancel_hover.png
  20. BIN modules/mopcms/views/images/admin/icon_confirm.gif
  21. BIN modules/mopcms/views/images/admin/icon_confirm.png
  22. BIN modules/mopcms/views/images/admin/icon_confirm_hover.png
  23. BIN modules/mopcms/views/images/admin/icon_delete.gif
  24. BIN modules/mopcms/views/images/admin/icon_delete.png
  25. BIN modules/mopcms/views/images/admin/icon_delete_hover.png
  26. BIN modules/mopcms/views/images/admin/icon_download.png
  27. BIN modules/mopcms/views/images/admin/icon_folder.gif
  28. BIN modules/mopcms/views/images/admin/icon_folder_hover.gif
  29. BIN modules/mopcms/views/images/admin/icon_folderadd.gif
  30. BIN modules/mopcms/views/images/admin/icon_folderadd_hover.gif
  31. BIN modules/mopcms/views/images/admin/icon_folderopen.gif
  32. BIN modules/mopcms/views/images/admin/icon_folderopen_hover.gif
  33. BIN modules/mopcms/views/images/admin/icon_gif.gif
  34. BIN modules/mopcms/views/images/admin/icon_jpg.gif
  35. BIN modules/mopcms/views/images/admin/icon_none.gif
  36. BIN modules/mopcms/views/images/admin/icon_pdf.gif
  37. BIN modules/mopcms/views/images/admin/icon_png.gif
  38. BIN modules/mopcms/views/images/admin/icon_published.gif
  39. BIN modules/mopcms/views/images/admin/icon_published_hover.gif
  40. BIN modules/mopcms/views/images/admin/icon_sort.png
  41. BIN modules/mopcms/views/images/admin/icon_sort_hover.png
  42. BIN modules/mopcms/views/images/admin/icon_trash.gif
  43. BIN modules/mopcms/views/images/admin/icon_unpublished.gif
  44. BIN modules/mopcms/views/images/admin/icon_unpublished_hover.gif
  45. BIN modules/mopcms/views/images/admin/icon_upload.png
  46. BIN modules/mopcms/views/images/admin/icon_view.png
  47. BIN modules/mopcms/views/images/admin/navbg.gif
  48. BIN modules/mopcms/views/images/admin/spinner.gif
  49. BIN modules/mopcms/views/images/admin/switch_handle.png
  50. BIN modules/mopcms/views/images/admin/switch_track.png
  51. BIN modules/mopcms/views/images/bar.gif
  52. BIN modules/mopcms/views/images/bg_row.gif
  53. BIN modules/mopcms/views/images/bg_row_alt.gif
  54. BIN modules/mopcms/views/images/bg_white60.png
  55. BIN modules/mopcms/views/images/bg_white80.png
  56. BIN modules/mopcms/views/images/bgk80.png
  57. BIN modules/mopcms/views/images/bgk88.png
  58. BIN modules/mopcms/views/images/bgk90.png
  59. BIN modules/mopcms/views/images/bgk94.png
  60. BIN modules/mopcms/views/images/failed.png
  61. BIN modules/mopcms/views/images/file.png
  62. BIN modules/mopcms/views/images/guideBg.gif
  63. BIN modules/mopcms/views/images/icon_add_category.gif
  64. BIN modules/mopcms/views/images/icon_addpage.gif
  65. BIN modules/mopcms/views/images/icon_addpage.jpg
  66. BIN modules/mopcms/views/images/icon_cancel.gif
  67. BIN modules/mopcms/views/images/icon_cancel.png
  68. BIN modules/mopcms/views/images/icon_cancel_hover.png
  69. BIN modules/mopcms/views/images/icon_confirm.gif
  70. BIN modules/mopcms/views/images/icon_confirm.png
  71. BIN modules/mopcms/views/images/icon_confirm_hover.png
  72. BIN modules/mopcms/views/images/icon_delete.gif
  73. BIN modules/mopcms/views/images/icon_delete.png
  74. BIN modules/mopcms/views/images/icon_delete_hover.png
  75. BIN modules/mopcms/views/images/icon_doc.gif
  76. BIN modules/mopcms/views/images/icon_download.png
  77. BIN modules/mopcms/views/images/icon_folder.gif
  78. BIN modules/mopcms/views/images/icon_folder_hover.gif
  79. BIN modules/mopcms/views/images/icon_folderadd.gif
  80. BIN modules/mopcms/views/images/icon_folderadd_hover.gif
  81. BIN modules/mopcms/views/images/icon_folderopen.gif
  82. BIN modules/mopcms/views/images/icon_folderopen_hover.gif
  83. BIN modules/mopcms/views/images/icon_gif.gif
  84. BIN modules/mopcms/views/images/icon_jpg.gif
  85. BIN modules/mopcms/views/images/icon_none.gif
  86. BIN modules/mopcms/views/images/icon_pdf.gif
  87. BIN modules/mopcms/views/images/icon_png.gif
  88. BIN modules/mopcms/views/images/icon_published.gif
  89. BIN modules/mopcms/views/images/icon_published_hover.gif
  90. BIN modules/mopcms/views/images/icon_sort.png
  91. BIN modules/mopcms/views/images/icon_sort_hover.png
  92. BIN modules/mopcms/views/images/icon_trash.gif
  93. BIN modules/mopcms/views/images/icon_unpublished.gif
  94. BIN modules/mopcms/views/images/icon_unpublished_hover.gif
  95. BIN modules/mopcms/views/images/icon_upload.png
  96. BIN modules/mopcms/views/images/icon_view.png
  97. BIN modules/mopcms/views/images/navbg.gif
  98. BIN modules/mopcms/views/images/progress.gif
  99. BIN modules/mopcms/views/images/spinner.gif
  100. BIN modules/mopcms/views/images/success.png
  101. BIN modules/mopcms/views/images/switch_handle.png
  102. BIN modules/mopcms/views/images/switch_track.png
  103. BIN modules/mopcms/views/images/uploading.png
  104. +3 −1 modules/mopcore/classes/controller/ajax.php
  105. +1 −1 modules/mopcore/classes/mop.php
  106. +0 −103 modules/mopmvc/helpers/moputil.php
  107. BIN modules/tools/controllers/.dumper.php.swp
  108. +0 −193 modules/tools/controllers/builder.php
  109. +0 −187 modules/tools/controllers/builder.php.generatecms
  110. +0 −151 modules/tools/controllers/configsite.php
  111. +0 −293 modules/tools/controllers/dumper.php
  112. +0 −172 modules/tools/controllers/frontend.php
  113. +0 −42 modules/tools/controllers/mopsetup.php
  114. +0 −47 modules/tools/controllers/testbed.php
  115. +0 −22 modules/tools/controllers/tests.php
  116. +0 −7 modules/usermanagement/config/cms.php
  117. +0 −225 modules/usermanagement/controllers/usermanagement.php
  118. 0 staging/application/media/.gitignore
@@ -113,7 +113,11 @@
'mopcore' => MODPATH.'mopcore',
'mopcms' => MODPATH.'mopcms',
'mopui' => MODPATH.'mopui',
+ 'mopextras' => MODPATH.'mopextras',
'navigation' => MODPATH.'navigation',
+ 'tools' => MODPATH.'tools',
+ 'usermanagement' => MODPATH.'usermanagement',
+
));
@@ -1,18 +0,0 @@
-<?
-/*
- * Class: MOP_Auth_Controller
- * Reponsible for the 'logged in as' object on the MOP backend pages
- */
-class MOP_Auth_Controller extends Controller {
-
- /*
- * Function: createIndexView()
- * Implements abstract function in base assigning the main view
- */
- public function createIndexView(){
- $this->view = new View('logged_in_as');
- if(Session::instance()->get('auth_user')){
- $this->view->username = $_SESSION['auth_user']->username;
- }
- }
-}
@@ -1,7 +0,0 @@
-<div class="loginstatus">
- <div class="controls">
- <?if(isset($username)):?>
- You are logged in as: <?=$username;?> <a class="button" href="<?=Kohana::config('config.site_path');?>auth/logout/">logout</a>
- <?endif;?>
- </div>
-</div>
@@ -45,8 +45,8 @@ public function __get($column){
//check for dbmap
$object = ORM::Factory('page', parent::__get('page_id'));
//echo 'FROM '.$object->id.'<br>';
+
$column = mop::dbmap( $object->template_id, $column);
- //echo 'which maps to'.$column;
if(!$column){
throw new Kohana_Exception('Column :column not found in content model', array(':column', $column));
}
@@ -71,6 +71,7 @@ public function __get($column){
return $returnval;
}
+
/*
Function: __set
@@ -90,7 +90,7 @@ public function action_savefield($id){
$page->save();
$page->contenttable->$_POST['field'] = mopcms::convertNewlines($_POST['value']);
$page->contenttable->save();
- $page = ORM::Factory('page')->find($id);
+ $page = ORM::Factory('page')->where('id', '=', $id)->find();
return array('value'=>$page->contenttable->$_POST['field'], 'slug'=>$page->slug);
}
else if(in_array($_POST['field'], array('dateadded'))){
@@ -139,7 +139,7 @@ public function action_savefield($id){
throw new Kohana_User_Exception('Invalid POST', 'Invalid POST Arguments');
}
- $page = ORM::Factory('page')->find($id);
+ $page = ORM::Factory('page')->where('id', '=', $id)->find();
//echo $_POST['field'];
$value = $page->contenttable->$_POST['field'];
$this->response->data(array('value'=>$value));
@@ -153,7 +153,7 @@ public function action_savefield($id){
Returns: Published status (0 or 1)
*/
public function action_togglePublish($id){
- $page = ORM::Factory('page')->find($id);
+ $page = ORM::Factory('page')->where('id', '=', $id)->find();
if($page->published==0){
$page->published = 1;
} else {
@@ -220,7 +220,7 @@ public function action_undelete($id) {
* Returns: nothing
*/
private function cascade_delete($id){
- $page = ORM::Factory('page')->find($id);
+ $page = ORM::Factory('page')->where('id', '=', $id)->find();
$page->activity = 'D';
$page->sortorder = 0;
$page->slug = new Database_Expr('NULL');
@@ -244,7 +244,7 @@ private function cascade_delete($id){
* Returns: Nothing
*/
private function cascade_undelete($page_id){
- $page = ORM::Factory('page')->find($id);
+ $page = ORM::Factory('page')->where('id', '=', $id)->find();
$page->activity = new Database_Expr('NULL');
$page->slug = mopcms::createSlug($page->contenttable->title, $page->id);
$page->save();
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
@@ -28,12 +28,14 @@ public function action_data($uri)
$data = $subRequest->execute()->data();
} catch (Exception $e) {
//return HTML from exception
- $message = $e->getString() . $e->getTrace();
+ $message = $e->getMessage() . $e->getTrace();
$ajaxResponse = array(
'returnValue' => TRUE,
'response' => $message
);
+ $this->responase->body(json_encode($data));
+ // throw $e;
return;
}
$ajaxResponse = array(
@@ -119,7 +119,7 @@ public static function config($arena, $xpath, $contextNode=null){
}
public static function dbmap($template_id, $column=null){
- if(!isset(self::$dbmaps[$template_id])){
+ if(!isset(self::$dbmaps[$template_id])){
$dbmaps = ORM::Factory('objectmap')->where('template_id', '=', $template_id)->find_all();
self::$dbmaps[$template_id] = array();
foreach($dbmaps as $map){
@@ -1,103 +0,0 @@
-<?
-
-/*
- * Class: moputil
- * Utility helper class
- */
-Class moputil {
-
- /*
- * Function: getMicroSeconds()
- * Returns a microseconds of current time as a 3 place float
- * Returns: Microseconds
- */
- public static function getMicroSeconds(){
- list($usec, $sec) = explode(" ", microtime());
- return number_format((float)$usec, 3);
- }
-
- /*
- * Function getMicroTimestamp()
- * Creates a timestamp including microseconds
- * Returns: Microsecond timestamp
- */
- public static function getMicroTimestamp(){
- $timestamp = date('YmdHis') . substr(moputil::getMicroSeconds(), 1) ;
- Kohana::log('info', 'TIMESTAMP: '.$timestamp);
- return $timestamp;
- }
-
- /*
- * Function: img($file, $prefix, $alt, $extra = null){
- * Echos an image tag as built from a mop file object.
- * Parameters:
- * $file - mop file object
- * $prefix - the prefix to output
- * $alt - alt tag phrase
- * $extra - extra stuff to go inside the tag attributes area
- * Returns: if file exists, return the img src tag code, otherwise return null
- */
- public static function img($file, $prefix, $alt, $extra = null){
- if(!$file->$prefix->fullpath
- || !file_exists($file->$prefix->fullpath)){
- return null;
- }
- $img = sprintf('<img src="%s" width="%s" height="%s" alt="%s" %s>',
- $file->$prefix->fullpath,
- $file->$prefix->width,
- $file->$prefix->height,
- $alt,
- $extra);
- return $img;
- }
-
- /*
- * Function: checkRoleAccess($role)
- * Checks whether the currently logged in user has a certain role
- * Parameters:
- * $role - the role to check against
- * Returns: true or false
- */
- public static function checkRoleAccess($role){
-
- if($role && !Auth::instance()->logged_in($role)){
- return false;
- } else {
- return true;
- }
- }
-
- /*
- * Function: decode_recurse($value)
- */
- private static function decode_recurse($value){
- //handle object?
- if(!is_array($value)){
- return html_entity_decode($value);
- } else {
- for($i=0, $keys=array_keys($value), $count=count($value); $i<$count; $i++){
- $value[$keys[$i]] = moputil::decode_recurse($value[$keys[$i]]);
- }
- return $value;
- }
- }
-
- public static $modulos;
- public static $modulosOptionsCount;
- public static function modulo($identifier, $options){
- self::$modulosOptionsCount = count( $options );
- if(!is_array(self::$modulos)){
- self::$modulos = array();
- }
- if(!isset(self::$modulos[$identifier])){
- self::$modulos[$identifier] = 0;
- }
- $index = self::$modulos[$identifier];
- self::$modulos[$identifier]++;
- return $options[$index%self::$modulosOptionsCount];
-
- }
-
-
-
-}
Binary file not shown.
Oops, something went wrong.

0 comments on commit 219d228

Please sign in to comment.