Skip to content

Instantly share code, notes, and snippets.

View sebbdk's full-sized avatar
Developing ad libitum

Sebastian Vargr sebbdk

Developing ad libitum
View GitHub Profile
<?php
echo $this->element('Crud/form', array(
'model' => 'FaxekondiVideo',
'columns' => array(
'name',
'description' => array('type' => 'textarea'),
1) 'video_asset_file_id' => array('element' => array('Assets.admin_form_selector', array('settings' => array('image' => false))))
2) 'video_asset_file_id' => array('element' => 'Assets.admin_form_selector', 'settings' => array('image' => false))
//'image_asset_file_id' => array('element' => 'Assets.admin_form_selector')
),
Called like so:
echo $this->element('Crud/index', array(
'model' => 'ContentPage',
'columns' => array(
'name' => function($View, $item, $model) { return $View->Html->link($item[$model]['name'], array('action' => 'index', $item[$model]['id'])); },
'is_active',
'is_default',
),
'row_actions' => array(
-> git reset HEAD --hard
HEAD is now at ba21012 added content plugin
www-data @ access.office.nodesnoc.net [ /home/kj/www/kondi/htdocs/core ] (2.0 *%<>)
-> git submodule update --init --recursive
www-data @ access.office.nodesnoc.net [ /home/kj/www/kondi/htdocs/core ] (2.0 *%<>)
-> git pull origin 2.0
From github.com:nodesagency/core
* branch 2.0 -> FETCH_HEAD
Auto-merging .gitmodules
Auto-merging Plugin/Assets
$e = new Facebook\User('sebbdk');
$data = $e->fetch()->first_name;
$this->Email->from = 'J-pakkeleg STATUS <kj+tuborg@nodes.dk>';
$this->Email->subject = 'PAKKELEG STATUS MAIL';
$this->Email->replyTo = 'kj+tuborg@nodes.dk';
$this->Email->return = 'web0@example.com';
$this->Email->to = 'Kasper <kj@nodes.dk>';
$this->Email->sendAs = "html";
$this->Email->send($msg);
$menuItems = Configure::read('Backend.menu');
if(!empty($menuItems)){
echo '<ul class="nav nav-pills">';
foreach($menuItems as $name => $link){
echo '<li class="active">';
echo $this->Html->link($name, $link);
echo '</li>';
}
echo '</ul><hr />';
}
remote: --> Error: --> stderr: /usr/lib/ruby/1.8/timeout.rb:64:in `io_select': execution expired (Timeout::Error)
remote: --> Error: --> stderr: from /var/www/manager/htdocs/bin/sftp-transfer-file:225:in `join'
remote: --> Error: --> stderr: from /var/www/manager/htdocs/bin/sftp-transfer-file:225
remote: --> Error: --> stderr: from /var/www/manager/htdocs/bin/sftp-transfer-file:225:in `each'
remote: --> Error: --> stderr: from /var/www/manager/htdocs/bin/sftp-transfer-file:225
remote: --> Error: /usr/lib/ruby/1.8/timeout.rb:64:in `io_select': execution expired (Timeout::Error)
remote: from /var/www/manager/htdocs/bin/sftp-transfer-file:225:in `join'
remote: from /var/www/manager/htdocs/bin/sftp-transfer-file:225
remote: from /var/www/manager/htdocs/bin/sftp-transfer-file:225:in `each'
remote: from /var/www/manager/htdocs/bin/sftp-transfer-file:225
$this->MapPoint->deleteAll(array(
'MapPoint.map_id' => $this->data[0]['MapPoint']['map_id']
));
the error:
{"success":false,"data":{"exception":{"class":"MissingPluginException","trace":"#0 \/var\/www\/kondi\/htdocs\/vendors\/cakephp\/lib\/Cake\/Core\/App.php(357): CakePlugin::path('maps')\n#1 \/var\/www\/kondi\/htdocs\/vendors\/cakephp\/lib\/Cake\/Core\/App.php(225): App::pluginPath('maps')\n#2 \/var\/www\/kondi\/htdocs\/vendors\/cakephp\/lib\/Cake\/Core\/App.php(535): App::path('Model', 'maps')\n#3 [internal function]: App::load('Map')\n#4 [internal function]: spl_autoload_call('Map')\n#5 \/var\/www\/kondi\/htdocs\/vendors\/cakephp\/lib\/Cake\/Utility\/ClassRegistry.php(136): class_exists('Map')\n#6 \/var\/www\/kondi\/htdocs\/vendors\/cakephp\/lib\/Cake\/Model\/Model.php(1009): ClassRegistry::init(Array)\n#7 \/var\/www\/kondi\/htdocs\/vendors\/cakephp\/lib\/Cake\/Model\/Model.php(835): Model->_constructLinkedModel('Map', 'Map', 'maps')\n#8 \/var\/www\/kondi\/htdocs\/vendors\/cakephp\/lib\/Ca
public function admin_add(){
if($this->request->is('post')) {
//$dataSource = $this->MapPoint->getDataSource();
//$dataSource->begin($this->MapPoint);
$this->MapPoint->deleteAll(array(
'MapPoint.map_id' => $this->data[0]['MapPoint']['map_id']
));
die("test!");
$this->MapPoint->save(array(
'id' => $mapPointId,
'mobile_id' => $mobileId,
'claimed' => date('Y-m-d H:i:s'),
'is_active' => 0
));